动画制作外文翻译文献.docx

上传人:b****5 文档编号:3325886 上传时间:2022-11-21 格式:DOCX 页数:9 大小:22.44KB
下载 相关 举报
动画制作外文翻译文献.docx_第1页
第1页 / 共9页
动画制作外文翻译文献.docx_第2页
第2页 / 共9页
动画制作外文翻译文献.docx_第3页
第3页 / 共9页
动画制作外文翻译文献.docx_第4页
第4页 / 共9页
动画制作外文翻译文献.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

动画制作外文翻译文献.docx

《动画制作外文翻译文献.docx》由会员分享,可在线阅读,更多相关《动画制作外文翻译文献.docx(9页珍藏版)》请在冰豆网上搜索。

动画制作外文翻译文献.docx

动画制作外文翻译文献

动画制作外文翻译文献

(文档含中英文对照即英文原文和中文翻译)

 

译文:

动作脚本

ActionScript是Macromedia(现已被Adobe收购)为其Flash产品开发的,最初是一种简单的脚本语言,现在最新版本3.0,是一种完全的面向对象的编程语言,功能强大,类库丰富,语法类似JavaScript,多用于Flash互动性、娱乐性、实用性开发,网页制作和RIA应用程序开发。

ActionScript是一种基于ECMAScript的脚本语言,可用于编写AdobeFlash动画和应用程序。

由于ActionScript和JavaScript都是基于ECMAScript语法的,理论上它们互相可以很流畅地从一种语言翻译到另一种。

不过JavaScript的文档对象模型(DOM)是以浏览器窗口,文档和表单为主的,ActionScript的文档对象模型(DOM)则以SWF格式动画为主,可包括动画,音频,文字和事件处理。

历史

在MacOSX10.2操作系统上的MacromediaFlashMX专业版里,这些代码可以创建一个与MACOSX启动过程中看见的类似的动画。

ActionScript第一次以它目前的语法出现是Flash5版本,这也是第一个完全可对Flash编程的版本。

这个版本被命名为ActionScript1.0。

Flash6通过增加大量的内置函数和对动画元素更好的编程控制更进一步增强了编程环境的功能。

Flash7(MX2004)引进了ActionScript2.0,它增加了强类型(strongtyping)和面向对象特征,如显式类声明,继承,接口和严格数据类型。

ActionScript1.0和2.0使用相同的编译形式编译成FlashSWF文件(即ShockwaveFlashfiles,或'SmallWebFormat').

时间表

FlashPlayer2:

第一个支持脚本的版本,包括控制时间轴的gotoAndPlay,gotoAndStop,nextFrame和nextScene等动作。

FlashPlayer3:

增强了载入外部SWF文件的基本脚本支持(loadMovie)。

FlashPlayer4:

第一个完全实现脚本功能(称为动作)的播放器。

这些脚本拥有简练的语法和对循环,条件,变量和其它基本语言结构的支持。

FlashPlayer5:

第一个拥有真正意义上的ActionScript的版本。

依据ECMAScript并采用基于原型编程,并允许完全的过程式编程和面向对象编程。

FlashPlayer6:

增加了事件处理模型,并且支持switch。

FlashPlayer7:

FlashPlayer7提供一些新特性如支持CSS显示文本和增强显示效果。

MacromediaFlash编译器和FlashPlayer7同时支持基于ECMAScript4NetscapeProposal的类编程语言ActionScript2.0。

不过ActionScript2.0能交叉编译成ActionScript1.0的字节码,因此它能运行于FlashPlayer6。

FlashPlayer8:

增加用于运行时图象数据控制和文件上传的新类库及APIs,ActionScript2.0功能更为完善。

FlashPlayer8.5(计划于2006春发布release版本,currentlyinpublicbeta):

增加ActionScript3.0和一个称为AVM2(ActionScriptVirtualMachine2)新的虚拟机,它可以与前版本AVM1共存以便支持旧内容。

增强性能是该版本的主要目标。

FlashPlayer92007发表,这是adobe收购Macromedia后的第一个版本,并且也是MacOSX上第一个Universal版本的FlashPlayer。

[1]

语言

语法

在ActionScript2.0类、与函式馆物件(如影片片段)可与类联系在一起。

类总写在外在文件档案内,并且这些文件必须有.as后缀。

类是增设部分──对ActionScrip语言来说,可让程式员自行开发,虽然有许多内建类譬如MovieClip类──可被用来动态地在屏幕上画出向量──已经满足需求了。

类档案可用来使您编程更加容易,并且类档案如果需要的话可在许多专案间转移。

FlashActionScript实现的特点如下,JavaScript程式员也许感兴趣:

一切设计是异步的;callback是普遍存在的,但事件对象不存在。

XML的实现从Flash5便存在了。

Flash可送和收XML,该项功能可用来透过网络服务器创造网上多玩者游戏。

ActionScript代码常常直接写在Flash开发环境。

该环境提供参考、代码提示和句法强调。

原代码常常与电影一起存在.fla档案里。

自外部文件档透过#include语法导入ActionScript代码也相当常见。

在这种情况下,外部档案也许被Flash集成开发环境内建编译器,或MotionTwinActionScript2编译器(MTASC)编译。

参见外部链接。

评论

编程人员们说MacromediaActionScript2.0编译器有点慢,常常花好几分钟才编译100个类,然而开放源码编译器MTASC可以利用;它快多了。

ActionScript非常宽大的语法常常让编程人员们皱眉,因为它常常让不干净代码难以阅读。

在Flash里使用许多向量可能拖慢执行许多应用程序的机器的效能,因为Flash每帧每帧重画每个向量。

Flash8引进了cacheAsBitmap变量,它暂时把向量转换到位图,这种做法帮助降低了延滞。

Flash的ActionScriptVM倾向在触发内部的暂停处理前就非常快达到它的运算极限,特别在麦金塔版的Flash播放器上更严重。

例如,简单从1算到5000会威胁某些用户Flash播放器的能力。

在Flash8里许多人不喜欢引入(import)某些类直到要用到那些类前最后一刻。

不幸的是,ActionScript3.0相当倚赖引入类,没有导入撰写脚本(scripting)实际上不太可能。

.swf档案格式挺容易反组译,使它非常难以保持源代码机密。

样本

ActionScript2.0样本

下面打印HelloWorld。

值得注意的是这只能在整合环境下执行,因为trace函式只有支援整合环境。

trace("Helloworld!

");

下面代码利用onMouseMove事件当鼠标移动时输出现行鼠标位置。

同样的这只有在整合环境下执行。

onMouseMove=function(){

trace("X:

"+_root._xmouse);

trace("Y:

"+_root._ymouse);

};

这个较先进的范例创造一个包括数字与字串的阵列,并利用原形函式(prototypefunction)与函式递归给变量名num指定一个数,给变量str指定一个字串。

然后,利用MovieClip应用程序接口,文字区域被显示在屏幕上,文字区域里头写入了变量值。

varmy_Array:

Array=newArray("Hello","ActionScript",3,7,11,"Flash");

Array.prototype.pickNumber=function():

Number{

varrand:

Number=random(this.length);

return(typeof(this[rand])=="number")?

this[rand]:

this.pickNumber();

};

Array.prototype.pickString=function():

String{

varrand:

Number=random(this.length);

return(typeof(this[rand])=="string")?

this[rand]:

this.pickString();

};

varnum:

Number=my_Array.pickNumber();

varstr:

String=my_Array.pickString();

_root.createTextField("txt",1,10,10,530,390);

txt.text="Array="+my_Array+"\nRandomNumber="+num+"\nRandomString="+str;

ActionScript3.0样本

下面先进的HelloWorld程序目前需要在Flex2.0公开Alpha测试版整合环境中编译。

package{

importflash.display.TextField;

importflash.display.MovieClip;

importflash.filters.DropShadowFilter;

publicclassHelloWorldextendsMovieClip{

publicfunctionHelloWorld(){

varshad:

DropShadowFilter=newDropShadowFilter(2,45,0x000000,25,3,3,2,2);

vartxt:

TextField=newTextField();

txt.textColor=0xFFFFFF;

txt.filters=[shad];

txt.width=120;

txt.x=Math.random()*300;

txt.y=Math.random()*300;

txt.selectable=false;

txt.text="HelloWorld!

["+Math.round(txt.x)+","+Math.round(txt.y)+"]";

addChild(txt);

}

}

}

 

原文:

ActionScript

ActionScriptisascriptinglanguagebasedonECMAScript.ActionScriptisusedprimarilyforthedevelopmentofwebsitesandsoftwareusingtheAdobeFlashPlayerplatform(intheformofSWFfilesembeddedintoWebpages),butisalsousedinsomedatabaseapplications(suchasAlphaFive),andinbasicrobotics,aswiththeMakeControllerKit.OriginallydevelopedbyMacromedia,thelanguageisnowownedbyAdobe(whichacquiredMacromediain2005).ActionScriptwasinitiallydesignedforcontrollingsimple2DvectoranimationsmadeinAdobeFlash(formerlyMacromediaFlash).LaterversionsaddedfunctionalityallowingforthecreationofWeb-basedgamesandrichInternetapplicationswithstreamingmedia(suchasvideoandaudio).

History

ActionScriptstartedasascriptinglanguageforMacromedia'sFlashauthoringtool,nowdevelopedbyAdobeSystemsasAdobeFlash.ThefirstthreeversionsoftheFlashauthoringtoolprovidedlimitedinteractivityfeatures.EarlyFlashdeveloperscouldattachasimplecommand,calledan"action",toabuttonoraframe.Thesetofactionswasbasicnavigationcontrols,withcommandssuchas"play","stop","getURL",and"gotoAndPlay".

WiththereleaseofFlash4in1999,thissimplesetofactionsbecameasmallscriptinglanguage.NewcapabilitiesintroducedforFlash4includedvariables,expressions,operators,ifstatements,andloops.Althoughreferredtointernallyas"ActionScript",theFlash4usermanualandmarketingdocumentscontinuedtousetheterm"actions"todescribethissetofcommands.

 

Timelinebyplayer

FlashPlayer2:

Thefirstversionwithscriptingsupport.ActionsincludedgotoAndPlay,gotoAndStop,nextFrameandnextScenefortimelinecontrol.

FlashPlayer3:

ExpandedbasicscriptingsupportwiththeabilitytoloadexternalSWFs(loadMovie).

FlashPlayer4:

Firstplayerwithafullscriptingimplementation(calledActions).Thescriptingwasaflashbasedsyntaxandcontainedsupportforloops,conditionals,variablesandotherbasiclanguageconstructs.

FlashPlayer5:

IncludedthefirstversionofActionScript.Usedprototype-basedprogrammingbasedonECMAScript,andallowedfullproceduralprogrammingandobject-orientedprogramming.

FlashPlayer6:

Addedaneventhandlingmodel,accessibilitycontrolsandsupportforswitch.ThefirstversionwithsupportfortheAMFandRTMPprotocolswhichallowedforondemandaudio/videostreaming.

FlashPlayer7:

AdditionsincludeCSSstylingfortextandsupportforActionScript2.0,aprogramminglanguagebasedontheECMAScript4NetscapeProposalwithclass-basedinheritance.However,ActionScript2.0cancrosscompiletoActionScript1.0byte-code,sothatitcanruninFlashPlayer6.

FlashPlayer8:

FurtherextendedActionScript1/ActionScript2byaddingnewclasslibrarieswithAPIsforcontrollingbitmapdataatrun-time,fileuploadsandlivefiltersforbluranddropshadow.

ExampleofActionScript2.0runningonMacromediaFlash8.FlashPlayer9(initiallycalled8.5):

AddedActionScript3.0withtheadventofanewvirtualmachine,calledAVM2(ActionScriptVirtualMachine2),whichcoexistswiththepreviousAVM1neededtosupportlegacycontent.PerformanceincreaseswereamajorobjectiveforthisreleaseoftheplayerincludinganewJITcompiler.Supportforbinarysockets,E4XXMLparsing,full-screenmodeandRegularExpressionswereadded.ThisisthefirstreleaseoftheplayertobetitledAdobeFlashPlayer.

FlashPlayer10(initiallycalledAstro):

Addedbasic3Dmanipulation,suchasrotatingontheX,Y,andZaxis,anda3DdrawingAPI.AbilitytocreatecustomfiltersusingAdobePixelBender.SeveralvisualprocessingtasksarenowoffloadedtotheGPUwhichgivesanoticeabledecreasetorenderingtimeforeachframe,resultinginhigherframerates,especiallywithH.264video.ThereisanewsoundAPIwhichallowsforcustomcreationofaudioinflash,somethingthathasneverbeenpossiblebefore.[2]

TimelinebyActionScriptversion

2000–2003:

ActionScript"1.0"WiththereleaseofFlash5inSeptember2000,the"actions"fromFlash4wereenhancedoncemoreandnamed"ActionScript"forthefirsttime.[3]ThiswasthefirstversionofActionScriptwithinfluencesfromJavaScriptandtheECMA-262(ThirdEdition)standard,supportingthesaidstandard'sobjectmodelandmanyofitscoredatatypes.Localvariablesmaybedeclaredwiththevarstatement,anduser-definedfunctionswithparameterpassingandreturnvaluescanalsobecreated.Notably,ActionScriptcouldnowalsobetypedwithatexteditorratherthanbeingassembledbychoosingactionsfromdrop-downlistsanddialogboxcontrols.Withthenextreleaseofitsauthoringtool,FlashMX,anditscorrespondingplayer,FlashPlayer6,thelanguageremainedessentiallyunchanged;therewereonlyminorchanges,suchastheadditionoftheswitchstatementandthe"strictequality"(===)operator,whichbroughtitclosertobeingECMA-262-compliant.TwoimportantfeaturesofActionScriptthatdistinguishitfromlaterversionsareitsloosetypesystemanditsrelianceonprototype-basedinheritance.Loosetypingreferstotheabilityofavariabletoholdanytypeofdata.Thisallowsforrapidscriptdevelopmentandisparticularlywell-suitedforsmall-scalescriptingprojects.Prototype-basedinheritanceistheActionScript1.0mechanismforcodereuseandobject-orientedprogramming.Insteadofaclasskeywordthatdefinescommoncharacteristicsofaclass,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 学科竞赛

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1