![flash外文翻譯 英文文獻(xiàn) 外文文獻(xiàn)_第1頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/16/d07d0ad5-ca25-4883-b311-fdb41527cce0/d07d0ad5-ca25-4883-b311-fdb41527cce01.gif)
![flash外文翻譯 英文文獻(xiàn) 外文文獻(xiàn)_第2頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/16/d07d0ad5-ca25-4883-b311-fdb41527cce0/d07d0ad5-ca25-4883-b311-fdb41527cce02.gif)
![flash外文翻譯 英文文獻(xiàn) 外文文獻(xiàn)_第3頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/16/d07d0ad5-ca25-4883-b311-fdb41527cce0/d07d0ad5-ca25-4883-b311-fdb41527cce03.gif)
![flash外文翻譯 英文文獻(xiàn) 外文文獻(xiàn)_第4頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/16/d07d0ad5-ca25-4883-b311-fdb41527cce0/d07d0ad5-ca25-4883-b311-fdb41527cce04.gif)
![flash外文翻譯 英文文獻(xiàn) 外文文獻(xiàn)_第5頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/16/d07d0ad5-ca25-4883-b311-fdb41527cce0/d07d0ad5-ca25-4883-b311-fdb41527cce05.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、動作腳本,摘自自維基百科,自由的百科全書2009年5月10actionscriptdesigned by gary grossman1998年9月 英文譯文: 動作腳本actionscript是 macromedia(現(xiàn)已被adobe收購)為其flash產(chǎn)品開發(fā)的,最初是一種簡單的腳本語言,現(xiàn)在最新版本3.0,是一種完全的面向?qū)ο蟮木幊陶Z言,功能強大,類庫豐富,語法類似javascript,多用于flash互動性、娛樂性、實用性開發(fā),網(wǎng)頁制作和ria應(yīng)用程序開發(fā)。actionscript 是一種基于ecmascript的腳本語言,可用于編寫adobe flash動畫和應(yīng)用程序。 由于actio
2、nscript和javascript都是基于ecmascript語法的,理論上它們互相可以很流暢地從一種語言翻譯到另一種。不過javascript的文檔對象模型(dom)是以瀏覽器窗口,文檔和表單為主的,actionscript的文檔對象模型(dom)則以swf格式動畫為主,可包括動畫,音頻,文字和事件處理。 歷史 在mac os x 10.2操作系統(tǒng)上的macromedia flash mx專業(yè)版里,這些代碼可以創(chuàng)建一個與mac os x啟動過程中看見的類似的動畫。actionscript第一次以它目前的語法出現(xiàn)是flash 5版本,這也是第一個完全可對flash編程的版本。這個版本被命名為
3、actionscript1.0。flash 6通過增加大量的內(nèi)置函數(shù)和對動畫元素更好的編程控制更進(jìn)一步增強了編程環(huán)境的功能。flash 7(mx 2004)引進(jìn)了actionscript2.0,它增加了強類型(strong typing)和面向?qū)ο筇卣?,如顯式類聲明, 繼承,接口和嚴(yán)格數(shù)據(jù)類型。actionscript1.0和2.0使用相同的編譯形式編譯成flash swf文件(即shockwave flash files,或 small web format).時間表flash player 2:第一個支持腳本的版本,包括控制時間軸的gotoandplay, gotoandstop, nex
4、tframe和nextscene等動作。 flash player 3:增強了載入外部swf文件的基本腳本支持(loadmovie)。 flash player 4:第一個完全實現(xiàn)腳本功能(稱為動作)的播放器。這些腳本擁有簡練的語法和對循環(huán),條件,變量和其它基本語言結(jié)構(gòu)的支持。 flash player 5:第一個擁有真正意義上的actionscript的版本。依據(jù)ecmascript并采用基于原型編程,并允許完全的 過程式編程和面向?qū)ο缶幊獭?flash player 6:增加了事件處理模型,并且支持switch。 flash player 7: flash player 7 提供一些新特性
5、如支持css顯示文本和增強顯示效果。 macromedia flash編譯器和flash player 7同時支持基于ecmascript 4 netscape proposal的類編程語言actionscript 2.0。不過actionscript 2.0能交叉編譯成actionscript 1.0的字節(jié)碼,因此它能運行于flash player 6。 flash player 8:增加用于運行時圖象數(shù)據(jù)控制和文件上傳的新類庫及apis,actionscript 2.0功能更為完善。 flash player 8.5(計劃于2006春發(fā)布release版本,currently in pub
6、lic beta):增加actionscript 3.0和一個稱為avm2(actionscript virtual machine 2)新的虛擬機,它可以與前版本avm1共存以便支持舊內(nèi)容。增強性能是該版本的主要目標(biāo)。 flash player 9 2007發(fā)表,這是adobe收購macromedia后的第一個版本,并且也是mac os x上第一個universal版本的flash player。1 語言語法在actionscript 2.0 類、與函式館物件(如影片片段)可與類聯(lián)系在一起。類總寫在外在文件檔案內(nèi),并且這些文件必須有.as后綴。類是增設(shè)部分對actionscrip語言來說,可
7、讓程式員自行開發(fā),雖然有許多內(nèi)建類譬如movieclip類可被用來動態(tài)地在屏幕上畫出向量已經(jīng)滿足需求了。類檔案可用來使您編程更加容易,并且類檔案如果需要的話可在許多專案間轉(zhuǎn)移。flash actionscript實現(xiàn)的特點如下,javascript程式員也許感興趣:一切設(shè)計是異步的;callback是普遍存在的,但事件對象不存在。 xml的實現(xiàn)從flash 5便存在了。flash可送和收xml,該項功能可用來透過網(wǎng)絡(luò)服務(wù)器創(chuàng)造網(wǎng)上多玩者游戲。 actionscript 代碼常常直接寫在flash開發(fā)環(huán)境。該環(huán)境提供參考、代碼提示和句法強調(diào)。原代碼常常與電影一起存在.fla檔案里。自外部文件檔透
8、過#include語法導(dǎo)入actionscript代碼也相當(dāng)常見。在這種情況下,外部檔案也許被flash集成開發(fā)環(huán)境內(nèi)建編譯器,或motion twin actionscript2編譯器(mtasc)編譯。參見外部鏈接。評論編程人員們說macromedia actionscript 2.0編譯器有點慢,常?;ê脦追昼姴啪幾g100個類,然而開放源碼編譯器mtasc可以利用;它快多了。 actionscript非常寬大的語法常常讓編程人員們皺眉,因為它常常讓不干凈代碼難以閱讀。在flash里使用許多向量可能拖慢執(zhí)行許多應(yīng)用程序的機器的效能,因為flash每幀每幀重畫每個向量。flash 8引進(jìn)了c
9、acheasbitmap 變量,它暫時把向量轉(zhuǎn)換到位圖,這種做法幫助降低了延滯。 flash的actionscript vm傾向在觸發(fā)內(nèi)部的暫停處理前就非??爝_(dá)到它的運算極限,特別在麥金塔版的flash播放器上更嚴(yán)重。例如,簡單從1算到5000會威脅某些用戶flash播放器的能力。 在flash 8里許多人不喜歡引入(import)某些類直到要用到那些類前最后一刻。不幸的是,actionscript 3.0相當(dāng)倚賴引入類,沒有導(dǎo)入撰寫腳本(scripting)實際上不太可能。 .swf檔案格式挺容易反組譯,使它非常難以保持源代碼機密。 樣本actionscript 2.0 樣本下面打印hell
10、o world。值得注意的是這只能在整合環(huán)境下執(zhí)行,因為trace函式只有支援整合環(huán)境。trace(hello world!);下面代碼利用onmousemove事件當(dāng)鼠標(biāo)移動時輸出現(xiàn)行鼠標(biāo)位置。同樣的這只有在整合環(huán)境下執(zhí)行。onmousemove = function () trace(x: +_root._xmouse); trace(y: +_root._ymouse);這個較先進(jìn)的范例創(chuàng)造一個包括數(shù)字與字串的陣列,并利用原形函式(prototype function)與函式遞歸給變量名num指定一個數(shù),給變量str指定一個字串。然后,利用movieclip應(yīng)用程序接口,文字區(qū)域被顯示在
11、屏幕上,文字區(qū)域里頭寫入了變量值。var my_array:array = new array(hello, actionscript, 3, 7, 11, flash);atotype.picknumber = function():number var rand:number = random(this.length); return (typeof (thisrand) = number) ? thisrand : this.picknumber();atotype.pickstring = function():string var rand:numbe
12、r = 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);txt.text = array = +my_array+nrandom number = +num+nrandom string = +str;actionscr
13、ipt 3.0 樣本下面先進(jìn)的hello world程序目前需要在flex 2.0公開alpha測試版整合環(huán)境中編譯。package import flash.display.textfield; import flash.display.movieclip; import flash.filters.dropshadowfilter; public class helloworld extends movieclip public function helloworld() var shad:dropshadowfilter = new dropshadowfilter(2, 45, 0x0
14、00000, 25, 3, 3, 2, 2); var txt:textfield = new textfield(); txt.textcolor = 0xffffff; 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); 英文原文:actionscripta
15、ctionscript 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 b
16、asic robotics, 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
17、added functionality 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 vers
18、ions of the 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 fl
19、ash 4 in 1999, 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
20、 the term 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
21、swfs (loadmovie). 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 version of actionscript. used
22、prototype-based programming based on ecmascript, and allowed full procedural programming and object-oriented programming. flash 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 onde
23、mand 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 (
25、initially 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 ji
26、t 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
27、a 3d 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 a
28、llows for custom creation of audio in flash, something that has never been possible before. 2 timeline 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 wa
29、s the 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 ret
30、urn 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 lang
31、uage 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 typ
32、e system 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 1.0 mechan
33、ism 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 prototype object an
34、d 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 user demand fo
35、r 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 be compiled
36、 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 adding a typ
37、e 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 partially to the e
38、cmascript 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 virtual ma
39、chine. 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 features:co
40、mpile-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 new type o
41、f 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 displ
42、ay list for complete control of what gets displayed at runtime. completely conforming implementation of the ecmascript fourth edition draft specification. flash liteflash lite 1.0: flash lite is the flash technology specifically developed for mobile phones and consumer electronics devices. supports
43、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. syntaxacti
44、onscript 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 the screen (measured in pixels), that is 100 pixels wide and high. then the text
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 16 太陽 教案 統(tǒng)編版五年級語文上冊
- 2024年九年級道德與法治下冊 第一單元 我們共同的世界 第一課 同住地球村 第2框 復(fù)雜多變的關(guān)系說課稿 新人教版
- 2 學(xué)會寬容 第一課時 說課稿-2023-2024學(xué)年道德與法治六年級下冊統(tǒng)編版
- 2025如何寫農(nóng)村土地承包合同范文
- 2025服裝代理商合同協(xié)議書范本
- 2《花的學(xué)?!氛f課稿-2024-2025學(xué)年統(tǒng)編版語文三年級上冊
- 隧道拆除專項施工方案
- 2024年五年級數(shù)學(xué)上冊 二 小數(shù)乘法 2小數(shù)的乘法第2課時 小數(shù)乘小數(shù)說課稿 冀教版
- 軍訓(xùn)訓(xùn)合同范例
- 黔江辦公室鋁扣板施工方案
- 做投標(biāo)文件培訓(xùn)
- 9.4+跨學(xué)科實踐:制作簡易活塞式抽水機課件+-2024-2025學(xué)年人教版物理八年級下冊
- 建筑工程工作計劃
- 2025年中國國際投資促進(jìn)中心限責(zé)任公司招聘管理單位筆試遴選500模擬題附帶答案詳解
- 瓶裝液化氣送氣工培訓(xùn)
- 外科護(hù)理課程思政課程標(biāo)準(zhǔn)
- 船舶航行安全
- 道德經(jīng)全文完整版本
- 9.2溶解度(第1課時飽和溶液不飽和溶液)+教學(xué)設(shè)計-2024-2025學(xué)年九年級化學(xué)人教版(2024)下冊
- 2024年審計局公務(wù)員招錄事業(yè)單位招聘考試招錄139人完整版附答案【研優(yōu)卷】
- 濰坊市人民醫(yī)院招聘真題
評論
0/150
提交評論