版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
动画制作外文翻译文献动画制作外文翻译文献(文档含中英文对照即英文原文和中文翻译)译文:动作脚本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");Atotype.pickNumber=function():Number{varrand:Number=random(this.length);return(typeof(this[rand])=="number")?this[rand]:this.pickNumber();};Atotype.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);}}}原文:ActionScriptActionScriptisascriptinglanguagebasedonECMAScript.ActionScriptisusedprimarilyforthedevelopmentofwebsitesandsoftwareusingtheAdobeFlashPlayerplatform(intheformofSWFfilesembeddedintoWebpages),butisalsousedinsomedatabaseapplications(suchasAlphaFive),andinbasicrobotics,aswiththeMakeControllerKit.OriginallydevelopedbyMacromedia,thelanguageisnowownedbyAdobe(whichacquiredMacromediain2005).ActionScriptwasinitiallydesignedforcontrollingsimple2DvectoranimationsmadeinAdobeFlash(formerlyMacromediaFlash).LaterversionsaddedfunctionalityallowingforthecreationofWeb-basedgamesandrichInternetapplicationswithstreamingmedia(suchasvideoandaudio).HistoryActionScriptstartedasascriptinglanguageforMacromedia'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.TimelinebyplayerFlashPlayer2: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]TimelinebyActionScriptversion2000–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,ActionScript1.0usesaspecialobjectthatservesasa"prototype"foraclassofobjects.Allcommoncharacteristicsofaclassaredefinedintheclass'sprototypeobjectandeveryinstanceofthatclasscontainsalinktothatprototypeobject.2003–2006:ActionScript2.0Thenextmajorrevisionofthelanguage,ActionScript2.0,wasintroducedinSeptember2003withthereleaseofFlashMX2004anditscorrespondingplayer,FlashPlayer7.Inresponsetouserdemandforalanguagebetterequippedforlargerandmorecomplexapplications,ActionScript2.0featuredcompile-timetypecheckingandclass-basedsyntax,suchasthekeywordsclassandextends.(Whilethisallowedforamorestructuredobject-orientedprogrammingapproach,thecodewouldstillbecompiledtoActionScript1.0bytecode,allowingittobeusedontheprecedingFlashPlayer6aswell.Inotherwords,theclass-basedinheritancesyntaxwasalayerontopoftheexistingprototype-basedsystem.)WithActionScript2.0,developerscouldconstrainvariablestoaspecifictypebyaddingatypeannotationsothattypemismatcherrorscouldbefoundatcompile-time.ActionScript2.0alsointroducedclass-basedinheritancesyntaxsothatdeveloperscouldcreateclassesandinterfaces,muchastheywouldinclass-basedlanguagessuchasJavaandC++.ThisversionconformedpartiallytotheECMAScriptFourthEditiondraftspecification.2006–today:ActionScript3.0InJune2006,ActionScript3.0debutedwithAdobeFlex2.0anditscorrespondingplayer,FlashPlayer9.ActionScript3.0wasafundamentalrestructuringofthelanguage,somuchsothatitusesanentirelydifferentvirtualmachine.FlashPlayer9containstwovirtualmachines,AVM1forcodewritteninActionScript1.0and2.0,andAVM2forcontentwritteninActionScript3.0.Actionscript3.0addedlimitedsupportforhardwareacceleration(DirectX,OpenGL).Theupdatetothelanguageintroducedseveralnewfeatures:Compile-timeandruntimetypechecking—typeinformationexistsatbothcompile-timeandruntime.Improvedperformancefromaclass-basedinheritancesystemseparatefromtheprototype-basedinheritancesystem.Supportforpackages,namespaces,andregularexpressions.Compilestoanentirelynewtypeofbytecode,incompatiblewithActionScript1.0and2.0bytecode.RevisedFlashPlayerAPI,organizedintopackages.UnifiedeventhandlingsystembasedontheDOMeventhandlingstandard.IntegrationofECMAScriptforXML(E4X)forpurposesofXMLprocessing.DirectaccesstotheFlashruntimedisplaylistforcompletecontrolofwhatgetsdisplayedatruntime.CompletelyconformingimplementationoftheECMAScriptfourtheditiondraftspecification.FlashLiteFlashLite1.0:FlashLiteistheFlashtechnologyspecificallydevelopedformobilephonesandconsumerelectronicsdevices.SupportsFlash4ActionScript.FlashLite1.1:Flash4ActionScriptsupportandadditionaldeviceAPIsadded.FlashLite2.0and2.1:AddedsupportforFlash7ActionScript2.0andsomeadditionalfscommand2API.FlashLite3:AddedsupportforFlash8ActionScript2.0andalsoFLVvideoplayback.SyntaxActionScriptcodeisfreeformandthusmaybecreatedwithwhicheveramountorstyleofwhitespacethattheauthordesires.ThebasicsyntaxisderivedfromECMAScript.ActionScript2.0Thefollowingcode,whichworksinanycompliantplayer,createsatextfieldatdepth0,atposition(0,0)onthescreen(measuredinpixels),thatis100pixelswideandhigh.Thenthetextparameterissettothe"Hello,world!"string,anditisautomatical
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024房地产代理销售公司房地产代理销售合同范本
- 员工守则培训内容
- 公司文化建设与团队凝聚力提升考核试卷
- 公共电影院设备巡检管理考核试卷
- 施工安全培训脚手架工程考核试卷
- 清真认证合同模板
- 承包学校维修合同范例
- 父母赠与夫妻一方合同模板
- 消费金融借款合同范例
- 热力局供暖合同范例
- 宁夏回族自治区银川市2025届高三上学期第三次月考数学试卷含答案
- 2024-2030年中国家禽饲养行业发展前景预测和投融资分析报告
- 2024-2030年中国净菜加工行业市场营销模式及投资规模分析报告
- 2024-2025学年广东省佛山市九年级(上)期中数学试卷(含答案)
- 湖南省长沙市雅礼教育集团2024-2025学年高一上学期期中考试数学试题 含解析
- 中国视觉小说行业现状调查与竞争趋势分析研究报告(2024-2030版)
- 托育服务中心项目可行性研究报告
- 北京科技大学第二批非教学科研岗位招考聘用高频500题难、易错点模拟试题附带答案详解
- 国开2024年秋《机电控制工程基础》形考任务3答案
- (高清版)JTGT 5440-2018 公路隧道加固技术规范
- 一+《展示国家工程++了解工匠贡献》(教学课件)-【中职专用】高二语文精讲课堂(高教版2023·职业模块)
评论
0/150
提交评论