GNU Free Documentation License . .

ActionScript

: ,
ActionScript
:

-, ,

:

1998

():

:

3.0

:

,

:

Adobe Flash, Adobe Flex

:

JavaScript, Java

ActionScript

.as

MIME

application/ecmascript[1]

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 1.0 . - .

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

«», :

  • gotoAndStop();
  • gotoAndPlay();
  • nextFrame();
  • prevFrame();
  • getURL();
3 loadMovie();
4 .
5 ActionScript. ECMAScript - .
6
7
  • AS2, ECMAScript 4 - .
  • CSS .
8
9
  • ECMAScript, ActionScript Virtual Machine AVM2. AVM , ActionScript 3 AVM2.
  • E4X XML.
10
10.2
11
  • API , USB-
  • 3D
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)

mx.* , , Flex fl.* , Flash

[]

[]

[]