From Wikipedia, the free encyclopedia
Jump to: navigation, search



These code samples, while they are arguable not necessary, are definitely overblown.

Creating an entire package, assigning a variable, and then returning a variable, to bind text for a Flex label control?

Uhh, no.

There needs to be fewer code examples and in lieu of that there needs to be a good explanation about packages and how Actionscript co-exists with the Flash IDE and MXML.

The examples aren't that helpful and are actually pretty bad. No other language page has "oh, here's 15 different ways to get to Hello World"

-- —Preceding unsigned comment added by (talk) 16:05, 11 June 2008 (UTC)

What's up with the "commenting code" and other similar sections? Is this a "how to program" guide or just information about actionscript? I already know how to program, thanks - just needed some quick info about which language family actionscript belonged to, and so on.

Totally agree - the "Coding style" section needs to go.

I agree. Further, AS1 and AS2 are substantially different. The page in its current form has mixed paraphs describing each, but a newcomer (presumably target audience) has no way of distingu doom!ishing. We should perhaps re-organise using such as the "Java programming language" (1st half) as better organisational structure and tone? we could then break out to sub-pages covering the differing 'best-practices' and or language characteristics of both versions?

I agree too. I removed it. Also, I wonder (this wasnt answered on the main page): what minimum version of Flash supports ActionScript 2?

That's a trick question of sorts. Flash MX 2004 is the first authoring environent to support AS2. However, AS1 is Flash MX is very similar; the only notable difference I've seen is that it does not have a formal class declaration syntax. Instead, you have to declare a class as a function object and then put whatever you want available to subclasses in classname.prototype. Flash Player 7 :) will run AS with AS2-style class declarations. However, MX 2004 can export SWF's compatable with older versions of the player, regardless of the actionscript used. However, I've read that these "backported" SWF's are very slow. -- anon

- Flash MX2004 was the first version to support AS2.
- The big difference of AS2 is the type checking at compile time.
- AS2 can be compiled as AS1 prototype code (with some very subtle issues in classes inheritance).
PS: this article needs serious clean-up - especially the samples & external links section!

If I remember rightly, no version of the flash player actually supports AS2.0 - it compiles down to AS1.0 code when you build the movie. As such, you can use AS2.0 to generate movies compatible with flash player 6. The AS2.0 code is mainly used to give better errors when compiling and to allow programmers more intuitive ways of creating classes than AS1.0
ActionScript 3.0 is (I think) the first new language supported by the player (9+) since AS1.0: they built a completely new flash player into 9 alongside one to handle the older code.


I think that this article deserves a clean-up. It does not talk much about its syntax nor its history. It has three poorly written examples mixing AS 2.0 and AS 1.0, and the article itself is just completely stretched in width. Also it does not use proper wiki formatting (it just looks messy, really) If I get one or two votes I'll get onto cleaning it up, although I don't know much about the history of ActionScript itself. --TrashLock 17:02, 28 December 2005 (UTC)

Note:Many AS programmers mix the two versions, it makes things a lot easier. Yeah, there should be some examples of stuff such as OOP and that, but I think the examples are good as they are--

[02/24/06] I agree with the first poster that the code in the current examples is very poor (in particular, the Array example with prototyping). I would recommend updating the example to current best practices, removing prototyping and removing the bad reference to _root.

(26/3/06) Myself and a couple of others edited the page a couple of months ago, and removed a lot of the crap that people had put (obviously they didn't understand AS well enough to teach people how to use it). It still needs a big redo though.

(28/01/07) I agree also, I think Flash Lite 1.0/1.1/2.0 lite, should be moved down the list, because it didnt appear, until much later, like example, Flash Lite 1, was an export option, which first appeared in Flash 6 MX, the criticism section, is just hear-say, I dont see much point for it, I thought Microsoft bought Futureshock from Macromedia, and Macromedia, went onto create Flash?

Did Actionscript(Advanced Actionscript), first appeared in Flash 4, cause I used Flash 4, and it did have Actionscript, I cannot remember the syntax, the only real big change, I can remember, from Flash 4, to Flash 5, was some windows, and added, an extra pointer, for changing the shape of objects.


IS okay in this context. Wikipedia is not censored from minors, and many Flash apps use this kind of code. So shut up--

Yes, Wikipedia is not censored from minors and yes some people do like to see this kind of code. However, this is a community project with high visibility a some common sense wouldn't hurt. I'm reverting your changes to indicate that I too support a more neutral wording, not as a personal affront. Best Jbetak 18:58, 29 December 2005 (UTC)
But we need something that is common,AND conforms to common sense. Until then, I reverted your edits--
How about this:
A smple check for large American cities entered in a textbox with an instance name of "imput"
cities = new Array(New York,San Francisco,Los Angeles/*sp?*/,Las Vegas,Chicago); //Note:Arrays NEVER use quotes
var american:Boolean = false
for(x in cities) {
     if(imput.text == cities[x]){//X refers to an item in an array, 0 is fuck, 1 is bitch, etc.
            american; //same as goodBoy = false
            trace("'"+ cities[x]+"' is a noted American city,Look on Wikipedia for info on it")
!american ? trace("Where is that?"); :null //Same as if(goodBoy){trace("[[ditto]]")}//From an earlier edit
That looks great! Would you mind putting it in the article when it's ready? Cheers Jbetak 19:24, 29 December 2005 (UTC)

Who the f*ck says arrays never use quotes? What kind of coding habit is that? I think the people writing this article don't know enough about ActionScript enough to write it. --TrashLock 21:02, 29 December 2005 (UTC)

The examples up now are fine.--
Was the example in this talk paragraph ever in the article? That's the worst, most ugly-written and immature nonsense I've ever read. And of course you need quotes to indicate that the entries in the array are strings. —Michiel Sikma,
One word. Nonsense. rofl I have never seen such a code in my life =D And yes, variables do use quotes to indicate a string. --seifip 21:42, 4 August 2006 (UTC)

This article suffers from too many cooks in the kitchen.[edit]

Is this article a tutorial? A history of development? A technical description of the language? A technical summary of the language? A non-technical summary of the language? The article tries to be all of these, and fails.

"Features of the Flash ActionScript implementation that JavaScript programmers may find interesting:[citation needed]" Why is a citation needed? Does the citation need to provide support for "JavaScript programmers may find interesting" (author can cite himself), for the points that follow (cite the online ActionScript reference manuals), or both?

"ActionScript code is frequently written directly in the Flash authoring environment, which offers reference, code hints and syntax highlighting.[citation needed]" Cite the frickin' manuals! Or cite the product! The information can be gathered by reading the manuals or actually using Flash Studio.

In the Criticism section: "This article or section does not cite its references or sources." How should one go about citing the umpteen billion news group posts griping about ActionScript?

I suggest that someone rewrite the entire article. Start by determining exactly what the article should and should not cover. Then write the content. Don't place "citation needed" tags on statements that are easily verifiable by reading the manuals or actually using the product. Eliminate "some say" type crap. Replace with actual examples of problems, so nobody can demand that there be a citation of the umpteen billion news group posts.

Or, just say this:

ActionScript is a programming language for scripting Adobe Flash movies. 06:37, 6 November 2006 (UTC) He is right. This article is a piece of junk. The problem is that actionscrpit is so easy to use that everyone assumes that they are experts on it.

I did brief editing to this article before and agree that it really just needs a remake. It's too littered to be easily "fixed". —msikma <user_talk:msikma> 12:57, 6 November 2006 (UTC)
By the way, the "citation needed" is there because the statements are flawed. They are unencyclopedic. If there are "things that some programmers find interesting", then there should be a reputable source that makes this statement. And even if the manual is the source to some of these statements, then the manual should be added as source to that particular statement. It's got to do with Wikipedia:Verifiability. —msikma <user_talk:msikma> 12:59, 6 November 2006 (UTC)

Wow. This. Is. Terrible. I am an amateur ActionScript coder, so decided to check out the Wikipedia article on it, but wasn't very happy about what I found. One, this page has bad structure. Everything is all over the place. Two, this is NOT A TUTORIAL! Stop giving me a random description on how to declare variables and objects! Three, some stuff in this article is just plain irrelevant, like the MXML piece at the end. I mean, what was that for? This page needs a major rewrite. I'm Jake9 "Da' Pie!" 21:13, 12 February 2009 (UTC)

Rewrite; what should this article be about?[edit]

Discuss the type of language ActionScript is,
The history of the language, but no extensive difference examples of AS 1.0, 2.0, 3.0.
Discuss the syntax, show "hello world" example. Discuss differences AS 1.0, 2.0, 3.0.
Related languages
See also
Further reading

This is my first draft of what the rewrite of this article should be about. Embrace and extend it. —msikma <user_talk:msikma> 13:13, 6 November 2006 (UTC)

Now Open Source[edit]


Just want to bring to the attention of the authors of this article that the Adobe ActionScript VM source has been release under a open source license together with Mozilla. [1]

Gary van der Merwe (Talk) 15:49, 7 November 2006 (UTC)

Scripting Language?[edit]

Is ActionScript 2.0/3.0 still considered a Scripting Language rather than a Programming Language?! Just because it has the word Script in its name doesn't mean anything (anymore)! I think people should reconsider this! Java also is not a Scripting Language! --sys2074 18:02, 14 December 2006 (UTC)

Scripting languages are of course just a special kind of programming language. The term applies to ActionScript because it was originally designed to enable programmatic control within a specific domain (Flash animations), not to write stand-alone programs. Numberp 02:26, 31 January 2007 (UTC)
Yes but we already reached ActionScript 3.0 which is even more similiar to Java than JavaScript ever could be. Just my two cents.
This info should be placed in article. I agree with sys2074. ActionScript is not a Scripting Language. Fırat KÜÇÜK 04:54, 8 July 2007 (UTC)
There's a recent and fairly lengthy discussion (with referenced sources) about why one might call ActionScript 3 a scripting language in this thread on kirupaForum. (Disclosure: I posted a few times in that thread) Krilnon (talk) 07:56, 5 December 2010 (UTC)

Proposed content for ActionScript Overview[edit]


This is some proposed content for the ActionScript wikipedia page. I hope that this provides some of the details people are looking for so that this page can be completed and the community approves of it. There are also more overview articles and details on the ActionScript Technolgy Center here:

ActionScript language spec:

ActionScript 3.0 Language Reference:

ActionScript 2.0 Language Reference:

Sincerely, Emmy Huang Product Manager, Adobe Flash Player 06:52, 20 April 2007 (UTC)


ActionScript is a programming language that was originally developed to provide interactivity in Adobe Flash Player animations. Starting as a handful of simple navigation commands, called "actions", in Flash 1 that developers could attach to buttons or movie frames, ActionScript has since grown into a powerful object-oriented language capable of implementing complex Rich Internet Applications.


ActionScript started as a scripting language for the Macromedia Flash authoring tool. 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 limited to basic navigation controls, such as commands like "play", "stop", "Get URL", and "Goto and play".

With the release of Flash 4 in 1999, this simple set of actions matured into 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, now enhanced, set of commands.

ActionScript 1.0[edit]

ActionScript's true "coming out" party came with the release of Flash 5 in September 2000. This is the first version of ActionScript that drew inspiration from JavaScript and the ECMA-262 standard. ActionScript in Flash 5 supported:

  • The ECMA-262 object model and many of its core data types;
  • Local variables declared with the 'var' statement;
  • The ECMA-262 Math object;
  • User-defined functions with parameter passing and return values;
  • The ability to type scripts with a text editor instead of choosing actions from drop-down lists and dialog box controls.

ActionScript remained essentially unchanged in the next version of the authoring tool, Flash MX, and its corresponding player, Flash Player 6. Minor changes, such as the addition of the 'switch' statement and the 'strict equality' operator, brought ActionScript closer to the ECMA-262 standard. This is the version of the language that would later become known as ActionScript 1.0.

Two important features of ActionScript 1.0 that distinguish it from later versions of ActionScript are its dynamic type system and its reliance on prototype-based inheritance. Dynamic 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 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 class's prototype object and every instance of that class contains a link to that prototype object.

ActionScript 2.0[edit]

The next major revision of ActionScript, ActionScript 2.0, came 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 2.0 featured compile-time type checking and class-based syntax, such as the keywords 'class' and 'extends'. With 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 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++.

ActionScript 3.0[edit]

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 machine. Flash Player 9 contains two virtual machines, AVM1 for code writting in ActionScript 1.0/2.0 and AVM2 for content written in ActionScript 3.0. ActionScript 3.0 provides not only a significant enhancement in performance, but also a more robust programming model that lends itself to complex Rich Internet Application development.

Version-Specific Data Points[edit]

ActionScript 1.0[edit]
ActionScript 2.0[edit]
ActionScript 3.0[edit]


ActionScript 2.0[edit]

class com.example.Hello extends MovieClip
        public function Hello() {
                var txtHello:TextField = createTextField("txtHello", 1, 0, 0, 100, 100);
                txtHello.text = "Hello World";

ActionScript 3.0[edit]

package com.example
        import flash.text.TextField;
        import flash.display.Sprite;
        public class Hello extends Sprite {

                public function Hello(){
                        var txtHello:TextField = new TextField();
                        txtHello.text = "Hello World";


This example:

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 WRONG. It probably doesn't even compile with strict mode flag on. Even if it does, the statement "delete item1;" does absolutely nothing. Operator delete's sole purpose is to delete properties on dynamic objects. To make references eligible for garbage collection you set their values to null (e.g. "item1 = null;"). When it comes to XML, (and only because XML happens to be a dynamic class) you can use operator delete to remove nodes from the object, but never to do what the article claims. If anyone has any doubts, read the official documentation.

Maybe there's other mistakes in there, but I did not read the whole thing. Also, there seems to be a little too much code on this page. Just thought I'd point that out. (talk) 23:15, 16 May 2012 (UTC)


See also[edit]



External Links[edit]

Feedback on the proposed rewrite[edit]

I think that this article and the rewrite are too confusing. What if some one doesn't know what EMCAScript or Syntax is? I think it should be written more clearly. Waterbender Kara ☺

I too think that it should. I started the rewrite but didn't have enough time to make it useful. The article as it is right now is almost completely useless. —msikma (user, talk) 15:02, 24 April 2007 (UTC)
Hi - is the text I proposed still too confusing? There is already a reference entry for ECMAScript on Wikipedia.

-- 22:16, 25 April 2007 (UTC) Emmy, Product Manager, Adobe Flash Player

I do not think that the proposed rewrite is too technical, this is not supposed to be an introduction to programming languages. Compare the proposed rewrite with articles on JavaScript, Java or other programming/scripting languages.

Membla 13:25, 3 May 2007 (UTC)

I did some minor structural changes on the proposed rewrite and added section headers for missing sections - lets start filling them! Membla 00:45, 4 May 2007 (UTC)

On behalf of Adobe, I would like to TRULY and SINCERELY thank all the wiki folks that worked on making this article better, specifically msikma and membla for pushing this last bit through. I'm excited to see it posted. ;-)

best, Emmy Product Manager, Adobe Flash Player -- 01:26, 11 May 2007 (UTC)

I think the rewrite is starting to look pretty solid. Perhaps getting it live would get more users to contribute as well. What do you say? I'll publish the rewrite in a couple of days in case no one opposes this. Membla 19:58, 22 May 2007 (UTC)

I'm planning on doing some copyediting to the page. While it's much better than the original already, there are some parts that need rewording (I find that some parts may seem a bit pro-ActionScript, which might get complaints from users who find it unbalanced). There's also no "criticism" section yet, which is vital to any article. It doesn't need to be large, but I think that it should be there. Then, lastly, there's references; I'll just tag whichever claims need source citing. —msikma (user, talk) 06:18, 23 May 2007 (UTC)
I don't like the ActionScript 2.0 example. One of the best things about 2.0 is the fact that it isn't necessary to use classes or functions. I don't believe that code snippet really symbolizes the usability of ActionScript2.0 Tkgd2007 (talk) 09:29, 17 February 2008 (UTC)

I agree. Personally, I'm not sure if it's right to have the Hello World Application within a class. Why not just show the package, like this:
ActionScript 2.0

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

ActionScript 3.0

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

Or, for ActionScript 3.0, we could use:

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


Please help out completing the following infobox. Membla 13:52, 3 May 2007 (UTC)

Almost done. We just need to find a release date of ActionScript 3.0. —msikma (user, talk) 21:51, 3 May 2007 (UTC)
Found that and made some other additions, what about other paradigms? Membla 00:28, 4 May 2007 (UTC)
Paradigm Object-oriented
Designed by Gary Grossman
Developer Macromedia, Adobe Systems
First appeared 1998
Stable release
3.0 / June 27, 2006
Typing discipline Strongly, Statically, Safely typed
OS Cross-platform
Major implementations
Adobe Flash, Adobe Flex
Influenced by
JavaScript, Java

Time line by player[edit]

Can somebody clarify this? There's a single list which near the top has "Flash Lite 2.1: Added support for Flash 7 ActionScript 2.0." and then much later "Flash Player 7: ... also support ActionScript 2.0,". MarkMLl 21:34, 5 October 2007 (UTC)

Too Complete or...[edit]

The article that appear here, I think is too complete in the Syntax section, It should removed (my suggestion). Or, if you still want to add the syntax section, use the new article page such as Syntax in ActionScript. The reason is: For the common reader (non-programmer) that article should make them confused (for me It's okay because I'm a programmer). So I encourage you to make article separation. Basically other element on the ActionScript article is good enough. Oh yeah, almost forgot. Can you add the comparison between the ActionScript and JavaScript? Because it appear that you said that ActionScript was influenced by JavaScript. Ivan Akira (talk) 11:36, 17 March 2008 (UTC)

Type safety[edit]

It is claimed that ActionScript is type safe. As it is very difficult to prove Type safety for a language, is it claimed by Adobe, or has it been proved ? Hervegirod (talk) 19:45, 19 April 2008 (UTC)

IME AS 3.0 is not type safe by any stretch of imagination. In the safe-unsafe spectrum it falls somewhere between Python and Java. —Preceding unsigned comment added by (talk) 21:14, 6 December 2008 (UTC)

External Links[edit]

For the tutorials / resource sites link to in the external links section, may I suggest Foundation Flash? I thought I would throw it into the mix for public debate, as per E.L. Guidelines, because I feel it does fit all the guidelines (main intent is not commercial and so forth).

Your thoughts please? --Jarry1250 (talk) 20:18, 27 November 2008 (UTC)

Is this a documentation?[edit]

I recently went to read this article and I found that half the article is made up of code samples. There is very little actual content in the article. Wikipedia is not a documentation, so this needs to be cleaned up. I'll start removing unneeded stuff when I have the time, but it would be great if I had some help. Thanks. — FatalError 20:50, 28 November 2008 (UTC)

More Encyclopedia, Less Tutorial[edit]

This article is filled with useless junk. This article tries to be an encyclopedia entry, an ActionScript reference, a tutorial, and a few more things. I think the syntax section should be completely rewritten, to something more like this:


ActionScript is based on ECMAScript, a standard for object-oriented programming. EMCAScript is what powers JavaScript. ActionScript 1 and 2 run on the same virtual machine, VM1. They use classes and methods to interact with the Flash environment. ActionScript 3.0 brought ActionScript closer to the EMCAScript standard, and ran on a new virtual machine, VM2.

Honestly, a better idea would be to get rid of the Syntax section and replace it with a more organized system, but feel free to add on to this (rather small) base. I'm Jake9 "Da' Pie!" 22:59, 7 May 2009 (UTC)

ان الحمد لله نستغين= به ونستهديه ونسترضيه انه من بهديه الله فهو المهتد ومن يضلل فلن تجد له وليا مرشدا وان شر الامور مدثاتها وكل محدثه بدع وكل بدعة ضلاله وكل ضلاله فى النار ان النار حرها شدي ومقامعاه حديد وقعرها بعيد اوقد عليها الف عام حتى احمرت والف عام حتى ابيضت والف عام حتى اسودت فهى سوداء قاتمه مظلمه مزجت بغضب من الله —Preceding unsigned comment added by (talk) 09:01, 8 November 2009 (UTC)


You really have two states of Action Script, pre ActionScript 3.0, and post ActionScript 3.0. They should be talked about separately, and in their own sections. For instance

-brief overview-
-Pre ActionScript 3.0-

-ActionScript 3.0-

Actionscript 3.0, syntax wise is something like 98% like JavaScript, as previously stated the syntax section needs to be drawn back, I don't think it should be removed because syntax is core to any programming language. —Preceding unsigned comment added by JonathanDMWagner (talkcontribs) 20:16, 10 February 2010 (UTC)

date of initiation[edit]

The date in the infobox lists ActionScript as introduced in 1998; but the text says that "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." Which would be the more accurate date for the "release" of ActionScript? (talk) 02:13, 2 March 2010 (UTC)

External links modified[edit]

Hello fellow Wikipedians,

I have just added archive links to one external link on ActionScript. Please take a moment to review my edit. If necessary, add {{cbignore}} after the link to keep me from modifying it. Alternatively, you can add {{nobots|deny=InternetArchiveBot}} to keep me off the page altogether. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true to let others know.

YesY An editor has reviewed this edit and fixed any errors that were found.

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

If you are unable to use these tools, you may set |needhelp=<your help request> on this template to request help from an experienced user. Please include details about your problem, to help other editors.

Cheers. —cyberbot IITalk to my owner:Online 17:25, 19 October 2015 (UTC)