版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、武漢科技大學本科畢業(yè)設計外文翻譯動作腳本,摘自自維基百科,自由的百科全書ActionScript Designed by Gary Grossman武漢科技大學本科畢業(yè)設計外文翻譯英文譯文:動作腳本ActionScript 是 Macromedia(現已被 Adobe 收購)為其 Flash 產品開發(fā)的,最初是一種簡單的腳本語言,現在最新版本 3.0 ,是一種完全的面向對象的編程語言,功能強大,類庫豐富,語法類似 JavaScript ,多用于 Flash 互動性、娛樂性、實用性開發(fā),網頁制作和 RIA 應用程序開發(fā)。ActionScript是一種基于 ECMAScript 的腳本語言, 可用
2、于編寫 Adobe Flash 動畫和應用程序。 由于 ActionScript和 JavaScript都是基于 ECMAScript 語法的,理論上它們互相可以很流暢地從一種語言翻譯到另一種。不過 JavaScript 的文檔對象模型(DOM)是以瀏覽器窗口,文檔和表單為主的, ActionScript 的文檔對象模型( DOM)則以 SWF格式動畫為主,可包括動畫,音頻,文字和事件處理。歷史在 Mac OS X 10.2 操作系統(tǒng)上的 Macromedia Flash MX 專業(yè)版里,這些代碼可以創(chuàng)建一個與 MAC OS X啟動過程中看見的類似的動畫。 ActionScript 第一次以它
3、目前的語法出現是 Flash 5 版本,這也是第一個完全可對 Flash 編程的版本。這個版本被命名為 ActionScript1.0 。 Flash 6 通過增加大量的內置函數和對動畫元素更好的編程控制更進一步增強了編程環(huán)境的功能。 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:第一個完全實現腳本功能(稱為動作)的播放器。這些腳本擁有簡武漢科技大學本科畢業(yè)設計外文翻譯練的語法和對循環(huán),條件,變量和其它基本語言結構的支持。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的字節(jié)碼,因此它能運行于Flash Player 6 。Flash Player 8:增加用于運行時圖象數據控制和文件上
6、傳的新類庫及APIs ,ActionScript 2.0功能更為完善。Flash Player 8.5 (計劃于 2006 春發(fā)布 release 版本, currently in publicbeta ):增加 ActionScript 3.0和一個稱為 AVM2(ActionScript Virtual Machine 2)新的虛擬機,它可以與前版本AVM1共存以便支持舊內容。增強性能是該版本的主要目標。Flash Player 9 2007發(fā)表,這是 adobe 收購 Macromedia 后的第一個版本,并且也是 Mac OS X上第一個 Universal 版本的 Flash Pla
7、yer 。1語言語法在 ActionScript 2.0 類、與函式館物件(如影片片段)可與類聯系在一起。類總寫在外在文件檔案內,并且這些文件必須有 .as 后綴。類是增設部分對 ActionScrip語言來說,可讓程式員自行開發(fā), 雖然有許多內建類譬如 MovieClip 類可被用來動態(tài)地在屏幕上畫出向量已經滿足需求了。 類檔案可用來使您編程更加容易, 并且類檔案如果需要的話可在許多專案間轉移。Flash ActionScript實現的特點如下, JavaScript程式員也許感興趣:一切設計是異步的; callback是普遍存在的,但事件對象不存在。XML的實現從 Flash 5便存在了。
8、 Flash 可送和收 XML,該項功能可用來透過網絡服務器創(chuàng)造網上多玩者游戲。ActionScript代碼常常直接寫在Flash 開發(fā)環(huán)境。該環(huán)境提供參考、代碼提示和句法強調。原代碼常常與電影一起存在.fla檔案里。自外部文件檔透過#include語法導入 ActionScript代碼也相當常見。在這種情況下,外部檔案也許被Flash 集成開發(fā)環(huán)境內建編譯器,或Motion Twin ActionScript2編譯器( MTASC)編譯。參見外部鏈接。武漢科技大學本科畢業(yè)設計外文翻譯評論編程人員們說 Macromedia ActionScript 2.0 編譯器有點慢,常?;ê脦追昼姴啪幾g
9、100 個類,然而開放源碼編譯器 MTASC可以利用;它快多了。ActionScript 非常寬大的語法常常讓編程人員們皺眉,因為它常常讓不干凈代碼難以閱讀。在 Flash 里使用許多向量可能拖慢執(zhí)行許多應用程序的機器的效能,因為 Flash 每幀每幀重畫每個向量。 Flash 8 引進了 cacheAsBitmap 變量,它暫時把向量轉換到位圖,這種做法幫助降低了延滯。Flash的 ActionScript VM傾向在觸發(fā)內部的暫停處理前就非常快達到它的運算極限,特別在麥金塔版的 Flash 播放器上更嚴重。例如,簡單從 1 算到 5000 會威脅某些用戶 Flash 播放器的能力。在 Fl
10、ash 8 里許多人不喜歡引入( import )某些類直到要用到那些類前最后一刻。不幸的是, ActionScript 3.0 相當倚賴引入類,沒有導入撰寫腳本( scripting )實際上不太可能。.swf 檔案格式挺容易反組譯,使它非常難以保持源代碼機密。樣本ActionScript 2.0樣本下面打印 Hello World。值得注意的是這只能在整合環(huán)境下執(zhí)行,因為 trace 函式只有支援整合環(huán)境。trace(Hello world!);下面代碼利用 onMouseMove事件當鼠標移動時輸出現行鼠標位置。 同樣的這只有在整合環(huán)境下執(zhí)行。onMouseMove = function
11、 () trace(X: +_root._xmouse);trace(Y: +_root._ymouse);這個較先進的范例創(chuàng)造一個包括數字與字串的陣列,并利用原形函式(prototypefunction )與函式遞歸給變量名 num指定一個數,給變量 str 指定一個字串。然后,利用 MovieClip 應用程序接口, 文字區(qū)域被顯示在屏幕上, 文字區(qū)域里頭寫入了變量值。var my_Array:Array = new Array(Hello, ActionScript, 3, 7, 11, Flash);武漢科技大學本科畢業(yè)設計外文翻譯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 測試版整合環(huán)境中編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)+;武漢科技大學本科畢業(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.武漢科技大學本科畢業(yè)設計外文翻譯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武漢科技大學本科畢業(yè)設計外文翻譯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武漢科技大學本科畢業(yè)設計外文翻譯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.武漢科技大學本科畢業(yè)設計外文翻譯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字畢業(yè)論文外文翻譯,你想要的工具都在這里!在科研過程中閱讀翻譯外文文獻是一個非常重要的環(huán)節(jié),許多領域高水平的文獻都是外文文獻, 借鑒一些外文文獻翻譯的經驗是非常必要的。由于特殊原因我翻譯外文文獻的機會比較多,慢慢地就發(fā)現了外文文獻翻譯過程中的三大利器:Google翻譯 頻道、金山詞霸(完武漢科技大學本科畢業(yè)設計外文翻譯整版本)和 CNKI翻譯助手 。具體操作過程如下:1.先打開金山詞霸自動取詞功能,然后閱讀文獻;2.遇到無法理解的長句時,可以交給 Google 處理,處理后的結果猛一看,不堪入目,可是經過大腦的再處理后句子的意思基本就明了了;3.如果通過 Google 仍然無法理解,感覺就是不同,那肯定是對其中某個 常用單詞 理解有誤,因
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度杭州二手住宅買賣合同5篇
- 2024年菌菇購銷合同
- 2024汽修場地租賃與維修企業(yè)環(huán)保設施建設服務合同范本3篇
- 2024版床上用品買賣合同
- 2024年貨車運輸業(yè)務合作合同書版B版
- 2024版對講機合同書
- 二零二五個人專利權抵押貸款合同范本
- 二零二五年冷鏈物流配送及冷鏈設備維修合同3篇
- 二零二五年度二手房銷售策略規(guī)劃合同范本3篇
- 戶外廣告位租用合同
- 第五單元整體教學設計-統(tǒng)編版高中語文必修下冊
- 2025年蛇年春聯帶橫批-蛇年對聯大全新春對聯集錦
- 小班音樂教案:小瓢蟲飛教案及反思
- 生活中的代數智慧樹知到課后章節(jié)答案2023年下成都師范學院
- 監(jiān)獄物業(yè)投標方案 (技術方案)
- 盲眼鐘表匠:生命自然選擇的秘密
- 雷達的分類及雷達信號處理詳解
- 焊接檢驗作業(yè)指導書
- 甘河工業(yè)園區(qū)穩(wěn)定化固化車間和危廢暫存庫項目環(huán)評報告
- 《新時代勞動教育教程與實踐(第2版)》課程標準
- 21ZJ111 變形縫建筑構造
評論
0/150
提交評論