HOME
The Info List - ActionScript


--- Advertisement ---



ActionScript
ActionScript
is an object-oriented programming language originally developed by Macromedia
Macromedia
Inc. (later acquired by Adobe Systems). It is a derivation of HyperTalk, the scripting language for HyperCard.[2] It is now a dialect of ECMAScript (meaning it is a superset of the syntax and semantics of the language more widely known as JavaScript), though it originally arose as a sibling, both being influenced by HyperTalk. ActionScript
ActionScript
is used primarily for the development of websites and software targeting the Adobe Flash Player
Adobe Flash Player
platform, used on Web pages in the form of embedded SWF files. ActionScript
ActionScript
3 is also used with Adobe AIR
Adobe AIR
system for the development of desktop and mobile applications. The language itself is open-source in that its specification is offered free of charge[3] and both an open source compiler (as part of Apache Flex) and open source virtual machine (Mozilla Tamarin) are available. ActionScript
ActionScript
is also used with Scaleform GFx
Scaleform GFx
for the development of 3D video game user interfaces and HUDs.

Contents

1 Overview 2 History

2.1 Timeline by player version 2.2 Timeline by ActionScript
ActionScript
version 2.3 Flash Lite 2.4 AIR

3 Syntax

3.1 ActionScript
ActionScript
2.0 3.2 ActionScript
ActionScript
3.0

4 Data structures

4.1 Data types 4.2 Using data types

5 Code protection 6 References 7 External links

Overview[edit] ActionScript
ActionScript
was initially designed for controlling simple 2D vector animations made in Adobe Flash
Adobe Flash
(formerly Macromedia
Macromedia
Flash). Initially focused on animation, early versions of Flash content offered few interactivity features and thus had very limited scripting capability. Later versions added functionality allowing for the creation of Web-based games and rich Internet applications with streaming media (such as video and audio). Today, ActionScript
ActionScript
is suitable for mobile development through Adobe AIR, use in some database applications, and in basic robotics, as with the Make Controller Kit. Flash MX 2004 introduced ActionScript
ActionScript
2.0, a scripting language more suited to the development of Flash applications. It is often possible to save time by scripting something rather than animating it, which usually also enables a higher level of flexibility when editing. Since the arrival of the Flash Player 9 alpha (in 2006) a newer version of ActionScript
ActionScript
has been released, ActionScript
ActionScript
3.0. This version of the language is intended to be compiled and run on a version of the ActionScript Virtual Machine that has been itself completely re-written from the ground up (dubbed AVM2).[4] Because of this, code written in ActionScript
ActionScript
3.0 is generally targeted for Flash Player 9 and higher and will not work in previous versions. At the same time, ActionScript
ActionScript
3.0 executes up to 10 times faster than legacy ActionScript
ActionScript
code due to the Just-In-Time compiler enhancements.[5] Flash libraries can be used with the XML
XML
capabilities of the browser to render rich content in the browser. This technology is known as Asynchronous Flash and XML, much like AJAX. Adobe offers its Flex product line to meet the demand for Rich Internet Applications built on the Flash runtime, with behaviors and programming done in ActionScript. ActionScript
ActionScript
3.0 forms the foundation of the Flex 2 API. History[edit]

This section needs to be updated. In particular: "Adobe is planning a release in the early part of the second half of 2013" It's 2017 now.. Please update this article to reflect recent events or newly available information. (December 2017)

ActionScript
ActionScript
started as an object-oriented language for Macromedia's Flash authoring tool, now developed by Adobe Systems
Adobe Systems
as Adobe Flash. The first three versions 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 Flash 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 the term "actions" to describe this set of commands. Timeline by player version[edit]

Flash 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 (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 prototype-based programming based on ECMAScript,[6] and allowed full procedural programming and object-oriented programming. Design based development. 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 on demand audio/video streaming. Flash Player 7: Additions include CSS styling for text and support for ActionScript
ActionScript
2.0, a programming language based on the ECMAScript 4 Netscape Proposal[7] with class-based inheritance. However, ActionScript
ActionScript
2.0 can cross compile to ActionScript
ActionScript
1.0 byte-code, so that it can run in Flash Player 6. Flash Player 8: Further extended ActionScript
ActionScript
1/ ActionScript
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. Flash Player 9 (initially called 8.5): Added ActionScript
ActionScript
3.0 with the advent of a new virtual machine, called ActionScript Virtual Machine 2 (AVM2), 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 compiler. Support for binary sockets, E4X XML
XML
parsing, full-screen mode and Regular Expressions were added. This is the first release of the player to be titled Adobe Flash Player.[8] Flash Player 10 (initially called Astro): Added basic 3D manipulation, such as rotating on the X, Y, and Z axis, a 3D drawing API, and texture mapping. 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
H.264
video. There is a new sound API which allows for custom creation of audio in flash, something that has never been possible before.[9] Furthermore, Flash Player 10 supports Peer to Peer (P2P) communication with Real Time Media Flow Protocol (RTMFP). Flash Player 11: The major addition in this version are advanced (graphic card accelerated) 3D capabilities for Windows Desktop, Mac Desktop, iOS, Android, and other major platforms. Significant compatibility improvements have been added for the iOS platform, and other non-desktop platforms. Other features include H.264
H.264
encoding for cameras, Native JSON
JSON
support, Cubic Bézier Curves, a secure random number generator, LZMA compression for swf files, workers to offload some code execution to other processor threads, graphics card accelerated camera feed rendering, memory intrinsics and performance analysis, and the ActionScript
ActionScript
Compiler 2.0, as well as some other minor additions.[10] Flash Player 11.2: released in March 2012, focused on adding features that are key for the gaming and video markets. Some of the features in the release include the following: Mouse-lock support. Right and middle mouse-click support. Context menu disabling. Hardware-accelerated graphics/Stage 3D support for Apple iOS and Android via Adobe AIR. Support for more hardware accelerated video cards (from January 2008) in order to expand availability of hardware-accelerated content. New Throttle event API (dispatches event when Flash Player throttles, pauses, or resumes content). Multithreaded video decoding pipeline on PCs, which improves overall performance of video on all desktop platforms. Notification of use of premium features in the debug players; content runs unrestricted in the release players. Flash Player 11.3: released in June 2012, focused on enabling features and functionality key for the gaming market, as well as addressing popular feature requests from developers. Some of the features in this release include the following: Keyboard input support in full-screen mode. Improved audio support for working with low-latency audio. Ability to progressively stream textures for Stage 3D content. Protected mode for Flash Player in Firefox. Frame label events. Support for compressing BitmapData to JPEG and PNG formats. Support for Mac OS X App Store application sandboxing requirements. Text streaming support for Stage 3D. Expanded information about GPU
GPU
driver details. Bitmap draw with quality API (new). Release outside mouse event API. Flash Player silent update support for Mac OS. Stylus support for Android 4.0 devices (Adobe AIR). USB debugging for iOS (Adobe AIR). iOS simulator support (Adobe AIR). Flash Player 11.4: released in August 2012, focused on enabling features and functionality that are key for the gaming market, as well as addressing popular feature requests from developers. Some of the features in this release include the following: ActionScript
ActionScript
workers (enables concurrent ActionScript
ActionScript
execution on separate threads). Support for advanced profiling. LZMA compression support for ByteArray. Support for hardware-accelerated video cards for Stage 3D expanded to 2006. Improved ActionScript
ActionScript
performance when targeting Apple iOS. Performance index API to inform about performance capabilities of current environment. Support for compressed textures with alpha support. Support for StageVideo.attachCamera API. Support for push notifications for iOS (Adobe AIR). Flash Player 11.5: released in November 2012, focused on performance improvement and stability. Some of the features in this release include the following: Shared ByteArray support for ActionScript workers. Debug stack trace in release builds of Flash Player. Various bug fixes Flash Player 11.6: released in March 2013, focuses on performance improvements, security enhancements, and stability. Some of the features in this release include the following: Ability to query graphics vector data at runtime. Full-screen permission dialog user interface improvements. Ability to load SWFs at runtime when deploying as an AIR application in AOT mode on iOS. Finer grained control over supported display resolution on iOS devices when deploying as an AIR application. HiDPI support for Flash Professional. ActionScript
ActionScript
3 access to fast memory operations/intrinsics Flash Player 11.7: released in June 2013, code-named "Geary." This release focuses on premium video, gaming, security, and stability. Some of the features planned for this release include the following: Android captive runtime debugging. Support for the OUYA controller. Remote hosting of SWF files on iOS. Preventing backup of shared objects on iOS for better iCloud support. Flash Player 11.8 (code name Harrison): Adobe is planning a release in the early part of the second half of 2013, code-named "Harrison." This release focuses on premium video, gaming, security, and stability. Some of the features in this release include the following: Recursive stop API on MovieClips. GamePad support on desktop browsers and Android

Timeline by ActionScript
ActionScript
version[edit] 2000–2004: ActionScript
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.[11] This was the first version of ActionScript
ActionScript
with influences from JavaScript
JavaScript
and the ECMA-262 (Third Edition) standard, supporting the said standard's 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 values can also be created. Notably, ActionScript
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 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
ActionScript
that distinguish it from later versions are its loose type 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
ActionScript
1.0 mechanism for code reuse and object-oriented programming. Instead of a class keyword that defines common characteristics of a class, ActionScript
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 class's prototype object and every instance of that class contains a link to that prototype object. 2003–2006: ActionScript
ActionScript
2.0 The next major revision of the language, ActionScript
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 for a language better equipped for larger and more complex applications, ActionScript
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 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
ActionScript
2.0, developers could constrain variables to a specific type by adding a type annotation so that type mismatch errors could be found at compile-time. ActionScript
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 ECMAScript Fourth Edition draft specification. 2006–today: ActionScript
ActionScript
3.0 In June 2006, ActionScript
ActionScript
3.0 debuted with Adobe Flex
Adobe Flex
2.0 and its corresponding player, Flash Player 9. ActionScript
ActionScript
3.0 was a fundamental restructuring of the language, so much so that it uses an entirely different virtual machine. Flash Player 9 contains two virtual machines, AVM1 for code written in ActionScript
ActionScript
1.0 and 2.0, and AVM2 for content written in ActionScript 3.0. ActionScript
ActionScript
3.0 added limited support for hardware acceleration (DirectX, OpenGL). The update to the language introduced several new features:

Compile-time and run-time type checking—type 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 of bytecode, incompatible with ActionScript
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
XML
(E4X) for purposes of XML processing. Direct access to the Flash runtime display list for complete control of what gets displayed at runtime. Completely conforming implementation of the ECMAScript fourth edition draft specification. Limited support for dynamic 3D objects. (X, Y, Z rotation, and texture mapping)

Flash Lite[edit]

Flash Lite 1.0: Flash Lite is the Flash technology specifically developed for mobile phones and consumer electronics devices. Supports Flash 4 ActionScript. Flash Lite 1.1: Flash 4 ActionScript
ActionScript
support and additional device APIs added. Flash Lite 2.0 and 2.1: Added support for Flash 7 ActionScript
ActionScript
2.0 and some additional fscommand2 API. Flash Lite 3: Added support for Flash 8 ActionScript
ActionScript
2.0 and also FLV video playback. Flash Lite 4: Added support for Flash 10 ActionScript
ActionScript
3.0 as a browser plugin and also hardware graphics acceleration.

AIR[edit] Adobe AIR
Adobe AIR
supports ActionScript, in addition to some extended contents, such as the Stage3D
Stage3D
engine Adobe has developed. The number of APIs (Application programming interfaces) available to ActionScript 3.0 has also risen dramatically. Syntax[edit] ActionScript
ActionScript
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
ActionScript
2.0[edit] The 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 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
ActionScript
2.0 class files the above example could be written in a file named Greeter.as as following.

class com.example.Greeter extends MovieClip

public function Greeter()

var txtHello:TextField = this.createTextField("txtHello", 0, 0, 0, 100, 100); txtHello.text = "Hello, world";

ActionScript
ActionScript
3.0[edit] ActionScript
ActionScript
3.0 has a similar syntax to ActionScript
ActionScript
2.0 but a different set of APIs for creating objects. Compare the script below to the previous ActionScript
ActionScript
2.0 version:

var greet:TextField = new TextField(); greet.text = "Hello World"; this.addChild(greet);

Minimal ActionScript
ActionScript
3.0 programs may be somewhat larger and more complicated due to the increased separation of the programming language and the Flash IDE. Presume the following file to be Greeter.as:

package com.example

import flash.text.TextField; import flash.display.Sprite;

public class Greeter extends Sprite

public function Greeter()

var txtHello:TextField = new TextField(); txtHello.text = "Hello World"; addChild(txtHello);

(See also: Sprite.) ActionScript
ActionScript
3 can also be used in M XML
XML
files when using Apache's Flex framework:

<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/mx/polysylabi" xmlns:mx="library://ns.adobe.com/flex/mx" layout="vertical" creationComplete="initApp()">

<fx:Script> <![CDATA[ public function initApp():void

// Prints our "Hello, world!" message into title title.text="Hello, World!";

]]> </fx:Script>

<s:Label id="title" fontSize="54" fontStyle="bold"/> </s:Application>

Data structures[edit] Data types[edit] ActionScript
ActionScript
primarily consists of "fundamental" or "simple" data types which are used to create other data types. These data types are very similar to Java data types. Since ActionScript
ActionScript
3 was a complete rewrite of ActionScript
ActionScript
2, the data types and their inheritances have changed. ActionScript
ActionScript
2 top level data types

String - A list of characters such as "Hello World" Number - Any Numeric value Boolean - A simple binary storage that can only be "true" or "false". Object - Object is the data type all complex data types inherit from. It allows for the grouping of methods, functions, parameters, and other objects.

ActionScript
ActionScript
2 complex data types There are additional "complex" data types. These are more processor and memory intensive and consist of many "simple" data types. For AS2, some of these data types are:

MovieClip - An ActionScript
ActionScript
creation that allows easy usage of visible objects. TextField - A simple dynamic or input text field. Inherits the Movieclip type. Button - A simple button with 4 frames (states): Up, Over, Down and Hit. Inherits the MovieClip type. Date - Allows access to information about a specific point in time. Array - Allows linear storage of data. XML
XML
- An XML
XML
object XMLNode - An XML
XML
node LoadVars - A Load Variables object allows for the storing and send of HTTP POST and HTTP GET variables Sound NetStream NetConnection MovieClipLoader EventListener

ActionScript
ActionScript
3 primitive (prime) data types[12]

Boolean - The Boolean data type has only two possible values: true and false or 1 and 0. No other values are valid. int - The int data type is a 32-bit integer between -2,147,483,648 and 2,147,483,647. Null - The Null data type contains only one value, null. This is the default value for the String data type and all classes that define complex data types, including the Object class. Number - The Number data type can represent integers, unsigned integers, and floating-point numbers. The Number data type uses the 64-bit double-precision format as specified by the IEEE Standard for Binary Floating-Point Arithmetic (IEEE-754). values between -9,007,199,254,740,992 (-253) to 9,007,199,254,740,992 (253) can be stored. String - The String data type represents a sequence of 16-bit characters. Strings are stored internally as Unicode characters, using the UTF-16
UTF-16
format. Previous versions of Flash used the UTF-8 format. uint - The uint (Unsigned Integer) data type is a 32-bit unsigned integer between 0 and 4,294,967,295. void - The void data type contains only one value, undefined. In previous versions of ActionScript, undefined was the default value for instances of the Object class. In ActionScript
ActionScript
3.0, the default value for Object instances is null.

ActionScript
ActionScript
3 some complex data types[12]

Array - Contains a list of data. Though ActionScript
ActionScript
3 is a strongly typed language, the contents of an Array may be of any type and values must be cast back to their original type after retrieval. (Support for typed Arrays has recently been added with the Vector class.) Date - A date object containing the date/time digital representation. Error - A generic error object that allows runtime error reporting when thrown as an exception. flash.display:Bitmap - A non-animated bitmap display object. flash.display:MovieClip - Animated movie clip display object; Flash timeline is, by default, a MovieClip. flash.display:Shape - A non-animated vector shape object. flash.display:SimpleButton - A simple interactive button type supporting "up", "over", and "down" states with an arbitrary hit area. flash.display:Sprite - A display object container without a timeline. flash.media:Video - A video playback object supporting direct (progressive download) or streaming (RTMP) transports. As of Flash Player version 9.0.115.0, the H.264/MP4 high-definition video format is also supported alongside standard Flash video (FLV) content. flash.text:TextField - A dynamic, optionally interactive text field object. flash.utils:ByteArray - Contains an array of binary byte data. flash.utils:Dictionary - Dictionaries are a variant of Object that may contain keys of any data type (whereas Object always uses strings for its keys). Function - The core class for all Flash method definitions. Object - The Object data type is defined by the Object class. The Object class serves as the base class for all class definitions in ActionScript. Objects in their basic form can be used as associative arrays that contain key-value pairs, where keys are Strings and values may be any type. RegExp - A regular expression object for strings. Vector - A variant of array supported only when publishing for Flash Player 10 or above. Vectors are typed, dense Arrays (values must be defined or null) which may be fixed-length, and are bounds-checked during retrieval. Vectors are not just more typesafe than Arrays but also perform faster. XML
XML
- A revised XML
XML
object based on the E4X (Standard ECMA-357); nodes and attributes are accessed differently from ActionScript
ActionScript
2.0 object (a legacy class named XMLDocument is provided for backwards compatibility). XMLList - An array-based object for various content lookups in the XML class.

Using data types[edit] The basic syntax is:

var yourVariableName:YourVariableType = new YourVariableType(Param1, Param2, ..., ParamN);

So in order to make an empty Object:

var myObject:Object = new Object();

Or, in an informal way:

var myObject = ;

Some types are automatically put in place:

var myString:String = "Hello!"; // This would automatically set the variable as a string. var myNumber:Number = 5; // This would do the same for a number. var myObject:Object = Param1:"Hi!", Param2:76 ; //This creates an object with two variables. // Param1 is a string with the data of "Hi!", // and Param2 is a number with the data of 76. var myArray:Array = [5,"Hello!", a:5, b:7 ]; //This is the syntax for automatically creating an Array. //It creates an Array with 3 variables. //The first (0) is a number with the value of 5, //the second (1) is a string with the value of "Hello!", //and the third (2) is an object with a:5, b:7 .

Unlike some object-oriented languages, ActionScript
ActionScript
makes no distinction between primitive types and reference types. In ActionScript, all variables are reference types. However, objects that belong to the primitive data types, which includes Boolean, Number, int, uint, and String, are immutable.[13] So if a variable of a supposedly primitive type, e.g. an integer is passed to a function, altering that variable inside the function will not alter the original variable, as a new int Object is created when inside the function. If a variable of another (not primitive) datatype, e.g. XML
XML
is passed to a function, altering that variable inside the function will alter the original variable as well, as no new XML
XML
Object is created. Some data types can be assigned values with literals:

var item1:String="ABC"; var item2:Boolean=true; var item3:Number=12; var item4:Array=["a","b","c"]; var item5:Object= name:"Actionscript",version:"3.0" ; var item6: XML
XML
= <node><child/></node>; //Note that the primitive XML
XML
is not quoted

A reference in ActionScript
ActionScript
is a pointer to an instance of a class. A reference stores the memory address of an object - operations against references will follow the value of the reference to the memory address of the object and carry out the operation on that object. All objects in ActionScript
ActionScript
are accessed through references instead of being accessed directly.

var item1:XML=new XML("<node><child/></node>"); var item2:XML=item1; item2.firstChild.attributes.value=13; //item1 now equals item2 since item2 simply points to what item1 points to. //Both are now: //<node><child value="13"/></node>

Only references to an object may be removed by using the "delete" keyword. Removal of actual objects and data is done by the Flash Player garbage collector which checks for any existing references in the Flash memory space. If none are found (no other reference is made to the orphaned object), it is removed from memory. For this reason, memory management in ActionScript
ActionScript
requires careful application development planning.

var item1:XML=new XML("<node><child/></node>"); delete item1; //If no other reference to item1 is present anywhere else in the application, //it will be removed on the garbage collector's next pass

Code protection[edit] As with all intermediate language compiled code such as Flash and Microsoft .NET, once an SWF file is saved locally, it can be decompiled into its source code and assets. Some decompilers are capable of nearly full reconstruction of the original source file, down to the actual code that was used during creation (although results vary on a case-by-case basis).[14][15][16] In opposition to the decompilers, ActionScript
ActionScript
obfuscators have been introduced, which transform code into a form that breaks decompiler output while preserving the functionality and structure of the program. Higher-quality obfuscators implement lexical transformations such as identifier renaming, control flow transformation, and data abstraction transformation which collectively make it harder for decompilers to generate output likely to be useful to a human. Less robust obfuscators insert traps for decompilers. Such obfuscators either cause the decompiler software to crash unexpectedly or to generate unintelligible source code. The following is an example of ActionScript
ActionScript
3.0 code generated by a decompiler program, before and after obfuscation. Code before obfuscation:

private function getNeighbours(i:int, j:int):Array var a:Array = new Array(); for (var k = 0; k < 8; k++) var ni = i + int(neighbour_map[k][0]); var nj = j + int(neighbour_map[k][1]) ; if (ni < 0 ni >= xsize nj < 0 nj >= ysize) continue; a.push(Cell(cells[ni][nj]));

return a;

Code after obfuscation:

private function getNeighbours(_arg1:int, _arg2:int):Array var _local3:Array = -(((null - !NULL!) % ~(undefined))); var _local4:*; var _local5:*; var _local6:*; _local3 = new Array(); _local4 = 0; for (;//unresolved jump , _arg2 < 8;_local4++) _local5 = (_arg1 + int(!NULL!)); _local6 = (_arg2 + int(!NULL!)); if (true) _arg1 = (((//unresolved nextvalue or nextname << !NULL!) + !NULL!) << undefined); _arg1 = (!(!NULL!) ^ !NULL!); (!NULL! instanceof !NULL!); var _local1 = (((!NULL! as !NULL!) + !NULL!) == this); if (!(!NULL! == !NULL!)) -((true << !NULL!)).push(Cell(cells[_local5][_local6]));

if (!true) (_local6 < 0); (_local6 < 0); (_local5 < 0);

return (_local3);

References[edit]

^ RFC 4329 (limit compatible with EcmaScript) ^ "Apple's lost decade, HyperCard, and what might NOT have been if Apple then was like Apple is today". zdnet.com. 2011-04-17. Retrieved 2014-12-04.  ^ http://help.adobe.com/livedocs/specs/actionscript/3/wwhelp/wwhimpl/js/html/wwhelp.htm ^ Brimelow, Lee (August 18, 2008). "Six reasons to use ActionScript 3.0". Adobe Systems
Adobe Systems
Incorporated. Retrieved June 18, 2010.  ^ Grossman, Gary; Huang, Emmy (June 27, 2006). " ActionScript
ActionScript
3.0 overview". Adobe Systems
Adobe Systems
Incorporated. Retrieved June 18, 2010.  ^ "Standard ECMA-262". Ecma-international.org. Retrieved April 22, 2013.  ^ "ECMAScript". ECMAScript. Archived from the original on February 23, 2001. Retrieved April 22, 2013.  ^ "Flash Player Adobe Flash Player
Adobe Flash Player
11 Overview". Adobe.com. April 9, 2013. Retrieved April 22, 2013.  ^ "Adobe Labs - Adobe Flash Player
Adobe Flash Player
10.1". Labs.adobe.com. Archived from the original on January 5, 2010. Retrieved December 17, 2009.  ^ "Flash Player 11 and AIR 3 Release Notes for Adobe Labs" (PDF). [dead link] ^ "Flash Player 11, AIR 3 Release Notes". helpx.adobe.com. Retrieved 2016-10-07.  ^ a b "Archived copy". Archived from the original on November 2, 2007. Retrieved July 13, 2007.  ^ "Flex 3 - Function parameters". Livedocs.adobe.com. Retrieved December 17, 2009.  ^ "Third party review of another decompiler". Flashmagazine.com. October 21, 2007. Retrieved April 22, 2013.  ^ "Customer comments on one Flash decompiler". Topshareware.com. Retrieved April 22, 2013.  ^ Customer comments on another Flash product Archived August 18, 2006, at the Wayback Machine.

External links[edit]

Wikibooks has a book on the topic of: ActionScript
ActionScript
Programming

Wikibooks has a book on the topic of: Introduction to ActionScript
ActionScript
2.0

Wikiversity has learning resources about ActionScript:Introduction

ActionScript
ActionScript
Technology Center ActionScript
ActionScript
2.0 Language Reference ActionScript
ActionScript
3.0 Language & Component Reference

Language Elements Package Summary Appendixes

Flex 3 LiveDocs: Programming ActionScript
ActionScript
3.0 Adobe - Flash Developer Center Adobe Flex
Adobe Flex
SDK Another non-Adobe ActionScript
ActionScript
3.0 Compiler

v t e

Adobe Flash

File formats

ActionScript
ActionScript
(AS) Action Message Format (AMF) Flash Video
Flash Video
(FLV) Flash XML
XML
Graphics (FXG) Local shared objects (LSOs) MXML Flash Movie (SWF) Flash Code Library (SWC)

Software (list)

Players

Adobe AIR Adobe Flash
Adobe Flash
Player OpenFL Gnash Lightspark Gameswf Tamarin

Animation tools

Adobe Animate Toon Boom Moho GoAnimate Stencyl

Programming tools

FlashDevelop Powerflasher FDT Apache Flex Haxe CrossBridge Adobe Scout FlashFirebug

Libraries

Starling Framework Away3D Flare3D Stage3D PureMVC Ming List of Flex frameworks

Converters

Adobe Flash
Adobe Flash
Media Live Encoder SWFTools swfmill Google Swiffy Adobe Wallaby

Server-side

Adobe Flash
Adobe Flash
Media Server

Obsolete software

Adobe Flash
Adobe Flash
Builder Adobe Flash
Adobe Flash
Catalyst Adobe Flash
Adobe Flash
Lite SWFAddress SWFObject MTASC Scaleform GFx SWiSH Max Swift 3D Papervision3D Ajax Animator Shumway Swfdec OpenLaszlo

Related topics

Comparison of HTML5 and Flash Thoughts on Flash Flash animation

films television

Protected Streaming Real-Time Messaging Protocol Real-Time Media Flow Protocol

Developers

FutureWave Software Macromedia Adobe Systems

v t e

ECMAScript

Dialects

ActionScript Caja JavaScript

engines asm.js

JScript JScript .NET QtScript TypeScript WMLScript

Engines (comparison)

Carakan Futhark InScript JavaScriptCore JScript KJS Linear B Narcissus QtScript Rhino SpiderMonkey

TraceMonkey JägerMonkey

Tamarin V8 ChakraCore

Chakra

JScript .NET Nashorn

Frameworks

Client-side

Ample SDK Chaplin.js Dojo Echo Ext JS Google Web Toolkit jQuery Lively Kernel midori MochiKit MooTools Prototype Pyjs qooxdoo Rialto Rico script.aculo.us SmartClient SproutCore Spry Wakanda Framework

Server-side

AppJet Jaxer Node.js WakandaDB

Multiple

Cappuccino

Objective-J

PureMVC

Libraries

Backbone.js SWFObject SWFAddress Underscore.js

People

Brendan Eich Douglas Crockford John Resig Scott Isaacs

Other

DHTML Ecma International JSDoc JSGI JSHint JSLint JSON JSSS Sputnik SunSpider Asynchronous module definition CommonJS

Lists JavaScript
JavaScript
libraries Ajax frameworks Comparisons JavaScript
JavaScript
frameworks serv

.