毕业论文外文翻译-动作脚本_第1页
毕业论文外文翻译-动作脚本_第2页
毕业论文外文翻译-动作脚本_第3页
毕业论文外文翻译-动作脚本_第4页
毕业论文外文翻译-动作脚本_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、武汉科技大学本科毕业设计外文翻译动作脚本,摘自自维基百科,自由的百科全书ActionScript Designed by Gary Grossman武汉科技大学本科毕业设计外文翻译英文译文:动作脚本ActionScript 是 Macromedia(现已被 Adobe 收购)为其 Flash 产品开发的,最初是一种简单的脚本语言,现在最新版本 3.0 ,是一种完全的面向对象的编程语言,功能强大,类库丰富,语法类似 JavaScript ,多用于 Flash 互动性、娱乐性、实用性开发,网页制作和 RIA 应用程序开发。ActionScript是一种基于 ECMAScript 的脚本语言, 可用

2、于编写 Adobe Flash 动画和应用程序。 由于 ActionScript和 JavaScript都是基于 ECMAScript 语法的,理论上它们互相可以很流畅地从一种语言翻译到另一种。不过 JavaScript 的文档对象模型(DOM)是以浏览器窗口,文档和表单为主的, ActionScript 的文档对象模型( DOM)则以 SWF格式动画为主,可包括动画,音频,文字和事件处理。历史在 Mac OS X 10.2 操作系统上的 Macromedia Flash MX 专业版里,这些代码可以创建一个与 MAC OS X启动过程中看见的类似的动画。 ActionScript 第一次以它

3、目前的语法出现是 Flash 5 版本,这也是第一个完全可对 Flash 编程的版本。这个版本被命名为 ActionScript1.0 。 Flash 6 通过增加大量的内置函数和对动画元素更好的编程控制更进一步增强了编程环境的功能。 Flash 7(MX 2004) 引进了 ActionScript2.0 ,它增加了强类型( strong typing )和面向对象特征,如显式类声明, 继承,接口和严格数据类型。ActionScript1.0和 2.0 使用相同的编译形式编译成Flash SWF文件(即Shockwave Flash files,或 Small Web Format).时间表

4、FlashPlayer2 :第一 个支 持脚 本的版本,包括控 制时 间轴的gotoAndPlay,gotoAndStop, nextFrame和 nextScene 等动作。Flash Player 3:增强了载入外部SWF文件的基本脚本支持( loadMovie )。Flash Player 4:第一个完全实现脚本功能(称为动作)的播放器。这些脚本拥有简武汉科技大学本科毕业设计外文翻译练的语法和对循环,条件,变量和其它基本语言结构的支持。Flash Player 5:第一个拥有真正意义上的 ActionScript的版本。依据 ECMAScript并采用基于原型编程,并允许完全的过程式编程

5、和面向对象编程。Flash Player 6:增加了事件处理模型,并且支持switch 。Flash Player 7: Flash Player 7提供一些新特性如支持 CSS显示文本和增强显示效果。 Macromedia Flash编译器和 Flash Player 7同时支持基于 ECMAScript 4Netscape Proposal 的类编程语言 ActionScript 2.0。不过 ActionScript 2.0能交叉编译成 ActionScript 1.0的字节码,因此它能运行于Flash Player 6 。Flash Player 8:增加用于运行时图象数据控制和文件上

6、传的新类库及APIs ,ActionScript 2.0功能更为完善。Flash Player 8.5 (计划于 2006 春发布 release 版本, currently in publicbeta ):增加 ActionScript 3.0和一个称为 AVM2(ActionScript Virtual Machine 2)新的虚拟机,它可以与前版本AVM1共存以便支持旧内容。增强性能是该版本的主要目标。Flash Player 9 2007发表,这是 adobe 收购 Macromedia 后的第一个版本,并且也是 Mac OS X上第一个 Universal 版本的 Flash Pla

7、yer 。1语言语法在 ActionScript 2.0 类、与函式馆物件(如影片片段)可与类联系在一起。类总写在外在文件档案内,并且这些文件必须有 .as 后缀。类是增设部分对 ActionScrip语言来说,可让程式员自行开发, 虽然有许多内建类譬如 MovieClip 类可被用来动态地在屏幕上画出向量已经满足需求了。 类档案可用来使您编程更加容易, 并且类档案如果需要的话可在许多专案间转移。Flash ActionScript实现的特点如下, JavaScript程式员也许感兴趣:一切设计是异步的; callback是普遍存在的,但事件对象不存在。XML的实现从 Flash 5便存在了。

8、 Flash 可送和收 XML,该项功能可用来透过网络服务器创造网上多玩者游戏。ActionScript代码常常直接写在Flash 开发环境。该环境提供参考、代码提示和句法强调。原代码常常与电影一起存在.fla档案里。自外部文件档透过#include语法导入 ActionScript代码也相当常见。在这种情况下,外部档案也许被Flash 集成开发环境内建编译器,或Motion Twin ActionScript2编译器( MTASC)编译。参见外部链接。武汉科技大学本科毕业设计外文翻译评论编程人员们说 Macromedia ActionScript 2.0 编译器有点慢,常常花好几分钟才编译

9、100 个类,然而开放源码编译器 MTASC可以利用;它快多了。ActionScript 非常宽大的语法常常让编程人员们皱眉,因为它常常让不干净代码难以阅读。在 Flash 里使用许多向量可能拖慢执行许多应用程序的机器的效能,因为 Flash 每帧每帧重画每个向量。 Flash 8 引进了 cacheAsBitmap 变量,它暂时把向量转换到位图,这种做法帮助降低了延滞。Flash的 ActionScript VM倾向在触发内部的暂停处理前就非常快达到它的运算极限,特别在麦金塔版的 Flash 播放器上更严重。例如,简单从 1 算到 5000 会威胁某些用户 Flash 播放器的能力。在 Fl

10、ash 8 里许多人不喜欢引入( import )某些类直到要用到那些类前最后一刻。不幸的是, ActionScript 3.0 相当倚赖引入类,没有导入撰写脚本( scripting )实际上不太可能。.swf 档案格式挺容易反组译,使它非常难以保持源代码机密。样本ActionScript 2.0样本下面打印 Hello World。值得注意的是这只能在整合环境下执行,因为 trace 函式只有支援整合环境。trace(Hello world!);下面代码利用 onMouseMove事件当鼠标移动时输出现行鼠标位置。 同样的这只有在整合环境下执行。onMouseMove = function

11、 () trace(X: +_root._xmouse);trace(Y: +_root._ymouse);这个较先进的范例创造一个包括数字与字串的阵列,并利用原形函式(prototypefunction )与函式递归给变量名 num指定一个数,给变量 str 指定一个字串。然后,利用 MovieClip 应用程序接口, 文字区域被显示在屏幕上, 文字区域里头写入了变量值。var my_Array:Array = new Array(Hello, ActionScript, 3, 7, 11, Flash);武汉科技大学本科毕业设计外文翻译var rand:Number = random(th

12、is.length);return(typeof(thisrand)= number) ? thisrand: this.pickNumber();var rand:Number = random(this.length);return(typeof(thisrand)= string)? thisrand: this.pickString();var num:Number = my_Array.pickNumber();var str:String = my_Array.pickString();_root.createTextField(txt, 1, 10, 10, 530, 390);

13、txt.text = Array = +my_Array+nRandom Number = +num+nRandom String = +str;ActionScript 3.0样本下面先进的 Hello World译。程序目前需要在Flex 2.0公开 Alpha 测试版整合环境中编package public class HelloWorld extends MovieClip public function HelloWorld() var shad:DropShadowFilter = new DropShadowFilter(2, 45, 0 x000000, 25, 3, 3, 2

14、, 2);var txt:TextField = new TextField();txt.textColor = 0 xFFFFFF;txt.filters = shad;txt.width = 120;txt.x = Math.random()*300;txt.y = Math.random()*300;txt.selectable = false;txt.text = Hello World! +Math.round(txt.x)+,+Math.round(txt.y)+;武汉科技大学本科毕业设计外文翻译addChild(txt);英文原文 :ActionScriptActionScrip

15、t is a scripting language based on ECMAScript. ActionScript is used primarily for the development of websites and software using the Adobe Flash Player platform (in the form of SWF files embedded into Web pages), but is also used in some database applications (such as Alpha Five), and in basic robot

16、ics, as with the Make Controller Kit. Originally developed by Macromedia, the language is now owned by Adobe (which acquired Macromedia in 2005). ActionScript was initially designed for controlling simple 2D vector animations made in Adobe Flash (formerly Macromedia Flash). Later versions added func

17、tionality allowing for the creation of Web-based games and rich Internet applications with streaming media (such as video and audio).HistoryActionScript started as a scripting language for Macromedias Flash authoring tool, now developed by Adobe Systems as Adobe Flash. The first three versions of th

18、e Flash authoring tool provided limited interactivity features. Early Flash developers could attach a simple command, called an action, to a button or a frame. The set of actions was basic navigation controls, with commands such as play, stop, getURL, and gotoAndPlay.With the release of Flash 4 in 1

19、999, this simple set of actions became a small scripting language. New capabilities introduced for Flash 4 included variables, expressions, operators, if statements, and loops. Although referred to internally as ActionScript, the Flash 4 user manual and marketing documents continued to use the term

20、actions to describe this set of commands .Timeline by playerFlash Player 2: The first version with scripting support. Actions included gotoAndPlay, gotoAndStop, nextFrame and nextScene for timeline control.Flash Player 3: Expanded basic scripting support with the ability to load external SWFs (loadM

21、ovie).Flash Player 4: First player with a full scripting implementation (called Actions). The scripting was a flash based syntax and contained support for loops, conditionals, variables and other basic language constructs.武汉科技大学本科毕业设计外文翻译Flash Player 5: Included the first programming based on ECMASc

22、ript, object-oriented programming.version of ActionScript. Used prototype-based and allowed full procedural programming andFlash Player 6: Added an event handling model, accessibility controls and support for switch. The first version with support for the AMF and RTMP protocols which allowed for ond

23、emand audio/video streaming.Flash Player 7: Additions include CSS styling for text and support for ActionScript 2.0, a programming language based on the ECMAScript 4 Netscape Proposal with class-based inheritance. However, ActionScript 2.0 can cross compile to ActionScript 1.0 byte-code, so that it

24、can run in Flash Player 6.Flash Player 8: Further extended ActionScript 1/ActionScript 2 by adding new class libraries with APIs for controlling bitmap data at run-time, file uploads and live filters for blur and dropshadow.Example of ActionScript 2.0 running on Macromedia Flash 8.Flash Player 9 (in

25、itially called 8.5): Added ActionScript 3.0 with the advent of a new virtual machine, called AVM2 (ActionScript Virtual Machine 2), which coexists with the previous AVM1 needed to support legacy content. Performance increases were a major objective for this release of the player including a new JIT

26、compiler. Support for binary sockets, E4X XML parsing, full-screen mode and Regular Expressions were added. This is the first release of the player to be titled Adobe Flash Player.Flash Player 10 (initially called Astro): Added basic 3D manipulation, such as rotating on the X, Y, and Z axis, and a 3

27、D drawing API. Ability to create custom filters using Adobe Pixel Bender. Several visual processing tasks are now offloaded to the GPU which gives a noticeable decrease to rendering time for each frame, resulting in higher frame rates, especially with H.264 video. There is a new sound API which allo

28、ws for custom creation of audio in flash, something that has never been possible before. 2Timeline by ActionScript version20002003: ActionScript 1.0 With the release of Flash 5 in September 2000, the actions from Flash 4 were enhanced once more and named ActionScript for the first time.3 This was th

29、e first version of ActionScript with influences from JavaScript and the ECMA-262 (Third Edition) standard, supporting the said standards object model and many of its core data types. Local variables may be declared with the var statement, and user-defined functions with parameter passing and return

30、values can also be created. Notably, ActionScript could now also be typed with a text editor rather than being assembled by choosing actions from drop-down lists and dialog box controls. With the next release of its authoring tool, Flash MX, and its corresponding player, Flash Player 6, the language

31、 remained essentially unchanged; there were only minor changes, such as the addition of the switch statement and the strict equality (=) operator, which brought it closer to being ECMA-262-compliant. Two important features of ActionScript that distinguish it from later versions are its loose type sy

32、stem and its reliance on prototype-based inheritance. Loose typing refers to the ability of a variable to hold any type of data. This allows for rapid script development and is particularly well-suited for武汉科技大学本科毕业设计外文翻译small-scale scripting projects. Prototype-based inheritance is the ActionScript

33、 1.0 mechanism for code reuse and object-oriented programming. Instead of a class keyword that defines common characteristics of a class, ActionScript 1.0 uses a special object that serves as a prototype for a class of objects. All common characteristics of a class are defined in the classs prototyp

34、e object and every instance of that class contains a link to that prototype object.20032006: ActionScript 2.0 The next major revision of the language, ActionScript 2.0, was introduced in September 2003 with the release of Flash MX 2004 and its corresponding player, Flash Player 7. In response to use

35、r demand for a language better equipped for larger and more complex applications, ActionScript 2.0 featured compile-time type checking and class-based syntax, such as the keywords class and extends. (While this allowed for a more structured object-oriented programming approach, the code would still

36、be compiled to ActionScript 1.0 bytecode, allowing it to be used on the preceding Flash Player 6 as well. In other words, the class-based inheritance syntax was a layer on top of the existing prototype-based system.) With ActionScript 2.0, developers could constrain variables to a specific type by a

37、dding a type annotation so that type mismatch errors could be found at compile-time. ActionScript 2.0 also introduced class-based inheritance syntax so that developers could create classes and interfaces, much as they would in class-based languages such as Java and C+. This version conformed partial

38、ly to the ECMAScript Fourth Edition draft specification.2006today: ActionScript 3.0 In June 2006, ActionScript 3.0 debuted with Adobe Flex 2.0 and its corresponding player, Flash Player 9. ActionScript 3.0 was a fundamental restructuring of the language, so much so that it uses an entirely different

39、 virtual machine. Flash Player 9 contains two virtual machines, AVM1 for code written in ActionScript 1.0 and 2.0, and AVM2 for content written in ActionScript 3.0. Actionscript 3.0 added limited support for hardware acceleration ( DirectX, OpenGL ).The update to the language introduced several new

40、features:Compile-time and runtime type checkingtype information exists at both compile-time and runtime.Improved performance from a class-based inheritance system separate from the prototype-based inheritance system.Support for packages, namespaces, and regular expressions.Compiles to an entirely ne

41、w type of bytecode, incompatible with ActionScript 1.0 and 2.0 bytecode.Revised Flash Player API, organized into packages.Unified event handling system based on the DOM event handling standard.Integration of ECMAScript for XML (E4X) for purposes of XML processing.Direct access to the Flash runtime d

42、isplay list for complete control of what gets displayed at runtime.CompletelyconformingimplementationoftheECMAScriptfourtheditiondraft武汉科技大学本科毕业设计外文翻译specification.Flash LiteFlash Lite 1.0: Flash Lite is the Flash technology specifically developed for mobile phones and consumer electronics devices.

43、Supports Flash 4 ActionScript.Flash Lite 1.1: Flash 4 ActionScript support and additional device APIs added.Flash Lite 2.0 and 2.1: Added support for Flash 7 ActionScript 2.0 and some additional fscommand2 API.Flash Lite 3: Added support for Flash 8 ActionScript 2.0 and also FLV video playback.Synta

44、xActionScript code is free form and thus may be created with whichever amount or style of whitespace that the author desires. The basic syntax is derived from ECMAScript.ActionScript 2.0The following code, which works in any compliant player, creates a text field at depth 0, at position (0, 0) on th

45、e screen (measured in pixels), that is 100 pixels wide and high. Then the text parameter is set to the Hello, world! string, and it is automatically displayed in the player:createTextField(greet, 0, 0, 0, 100, 100);greet.text = Hello, world;When writing external ActionScript 2.0 class files the abov

46、e example could be written in a file named Greeter.as as following.public function Greeter() public function onLoad() :Voidvar txtHello:TextField = this.createTextField(txtHello, 0, 0, 0, 100, 100.); txtHello.text = Hello, world;ActionScript 3.0ActionScript 3.0 has a similar syntax to ActionScript 2

47、.0 but a different set of APIs for creating objects. Compare the script below to the previous ActionScript 2.0 version:var greet:TextField = new TextField();greet.text = Hello World;this.addChild(greet);Minimal ActionScript 3.0 programs may be somewhat larger and more complicated due to the increase

48、d separation of the programming language and the Flash IDE.武汉科技大学本科毕业设计外文翻译Presume the following file to be Greeter.as:package com.examplepublic class Greeter extends Spritepublic function Greeter()var txtHello:TextField = new TextField();txtHello.text = Hello World;addChild(txtHello);(See also: Spr

49、ite)Finally, an example of using ActionScript when developing Flex applications, again presuming the following content to be in a file named Greeter.as:packagepublic class Greeterpublic static function sayHello():Stringvar greet:String = Hello, world!;return greet;五分钟搞定 5000字毕业论文外文翻译,你想要的工具都在这里!在科研过程中阅读翻译外文文献是一个非常重要的环节,许多领域高水平的文献都是外文文献, 借鉴一些外文文献翻译的经验是非常必要的。由于特殊原因我翻译外文文献的机会比较多,慢慢地就发现了外文文献翻译过程中的三大利器:Google翻译 频道、金山词霸(完武汉科技大学本科毕业设计外文翻译整版本)和 CNKI翻译助手 。具体操作过程如下:1.先打开金山词霸自动取词功能,然后阅读文献;2.遇到无法理解的长句时,可以交给 Google 处理,处理后的结果猛一看,不堪入目,可是经过大脑的再处理后句子的意思基本就明了了;3.如果通过 Google 仍然无法理解,感觉就是不同,那肯定是对其中某个 常用单词 理解有误,因

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论