ActionScript
| : |
-, , |
|---|---|
| : |
1998 |
| (): | |
| : |
3.0 |
| : | |
| : | |
| : |
|
|
|
| MIME |
|
ActionScript - , ECMAScript, , Flash-. ActionScript (ActionScript Virtual Machine), Flash Player. ActionScript , SWF-.
SWF- Flash Player-. Flash Player -, (standalone). exe- (projector), Flash Player swf-.
ActionScript -, , - .
|
|
[]
ActionScript 5 Macromedia Flash, ActionScript . ActionScript 1.0. Flash 6 (MX). 2004 Macromedia ActionScript 2.0 Flash 7 (MX 2004), , . :
- class (),
- interface (),
- extends ( )
- : private, public;
- .
Macromedia Flash Lite .
ActionScript 2.0 ActionScript 1.0. , , ActionScript 1.0.
2006 ActionScript 3.0 Adobe Flex, Adobe Flash 9.
ActionScript 3.0 , ActionScript 2.0 , AVM 2.0 (class-based) - . ActionScript 3.0 , ActionScript 1.0/2.0, 700 ( , ). ActionScript 3.0 , BitMap ( : 10000 ). ActionScript 3.0 , Java C#. (JIT). [2]. , [3] ( AS1)
| 2 |
«», :
|
| 3 | loadMovie(); |
| 4 | . |
| 5 | ActionScript. ECMAScript - . |
| 6 | |
| 7 |
|
| 8 |
|
| 9 | |
| 10 | |
| 10.2 |
|
| 11 |
|
| ActionScript: | |||
|---|---|---|---|
| AS1 | AS1, AS2 | AS1, AS2, AS3 | |
[]
ActionScript ECMAScript.
[] ActionScript 2.0
, (depth) 0, (0, 0) 100 100 . text «Hello, world». action frame
createTextField("greet", 0, 0, 0, 100, 100); greet.text = "Hello, world";
, AS2. .as .fla .
class com.example.Greeter extends MovieClip { public function Greeter() { } public function onLoad() :Void { var txtHello:TextField = this.createTextField("txtHello", 0, 0, 0, 100, 100); txtHello.text = "Hello, world"; } }
[] ActionScript 3.0
Adobe Flex SDK (AS 3.0):
package { import flash.display.Sprite; import flash.text.TextField; public class HelloWorld extends Sprite { public function HelloWorld() { var txtHello:TextField = new TextField(); txtHello.text = "Hello, world"; addChild(txtHello); } } }
[] MXML
, MXML ( XML):
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="vertical" creationComplete="initApp()"> <mx:Script> <![CDATA[ public function initApp():void { // Prints our "Hello, world!" message into "mainTxt". mainTxt.text = Greeter.sayHello(); } ]]> </mx:Script> <mx:Label id="title" fontSize="24" fontStyle="bold" text='"Hello, world!" Example'/> <mx:TextArea id="mainTxt" width="250"/> </mx:Application>
[]
. output , String (AS2 ):
trace("Hello world!");
[]
[] ActionScript 2
[]
| String | , , : «Hello World» |
| Number | , : 0, 0.5, 1150 |
| Boolean | , «true» «false». |
| Object | . , , , |
[]
| MovieClip | , . |
| TextField | . |
| Button | . Movie Clip . 4 : Up, Over, Down Hit. |
| Date | , /. |
| Array | . |
| XML | XML- |
| XMLNode | XML-node |
| LoadVars | HTTP POST HTTP GET |
| Sound | .MP3 |
| NetStream | |
| NetConnection | 2 flash- ( , ) |
| MovieClipLoader | swf .jpg .png |
| EventListener |
[] ActionScript 3
[]
(. Adobe)
| Boolean | , «true» «false». |
| int | 32- 231 2311. |
| uint | 32- 0 2321. |
| Number | 64- 263 2631. |
| null | . . |
| String | 16- . UTF-16. |
| void | undefined. , «». |
[]
(. Adobe)
| Object | . . AS3. |
| Array | . , : ['a', 5, new TextField()] |
| Vector | . Vector.<String> ['a','b',' '] |
| Date | , /. |
| Error | , . |
| Function | . AS3. |
| RegExp | |
| XML | XML-, E4X ( ECMA-357) |
| XMLList | Array- XML-. |
[]
ActionScript 3.0 ( Flash Player 9 API , , C++) 700 , ( C++):
| flash.accessibility | Flash . |
| flash.display | , Flash Player . |
| flash.errors | . |
| flash.external | ExternalInterface, Flash Player. |
| flash.filters | . |
| flash.geom | , , BitmapData . |
| flash.media | , . |
| flash.net | . , URL Flash Remoting. |
| flash.printing | Flash-. |
| flash.profiler | , . |
| flash.system | , , . . |
| flash.text | , , , . |
| flash.ui | , . |
| flash.utils | , ByteArray , Timer . |
| flash.xml | XML XML. ( AS) |
[]
- Adobe Flash , AS. Flash 5 «ACTIONS», (AS1). Flash 6 AS2. Flash 9 AS3.
- Adobe Flash Builder RIA .
- Powerflasher FDT , -, eclipse .
- FlashDevelop , C#, Flash- Flash IDE, Flex SDK, MTASC haxe.
- CodeDrive , , Microsoft Visual Studio.
- SWFTools swf-, ActionScript 3.0 (as3compile) .
[]
- RFC 4329 (limit compatible with EcmaScript)
- http://www.onflex.org/ACDS/AS3TuningInsideAVM2JIT.pdf
- Six reasons to use ActionScript 3.0 | Adobe Developer Connection
[]
| ECMAScript | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ActionScript · Caja · JavaScript () · JScript · JScript .NET · Objective-J · QtScript · WMLScript | |||||||||||||
() |
Carakan · Futhark · InScript · JavaScriptCore (SquirrelFish) · JScript · KJS · Linear B · Narcissus · QtScript · Rhino · YAJI · SpiderMonkey (TraceMonkey, JägerMonkey) · Tamarin · V8 · Chakra | ||||||||||||
| , |
|
||||||||||||
| · · | |||||||||||||
| DHTML · Ecma International · JSAN · JSDoc · JSLint · JSON · JSSS · Sputnik · SunSpider · CommonJS | |||||||||||||