Jump to content

Talk:ActionScript

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Ivan Akira (talk | contribs) at 11:37, 17 March 2008 (Updated.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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.

Clean-up

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)[reply]

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--72.49.52.246

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

Profanity

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

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)[reply]
But we need something that is common,AND conforms to common sense. Until then, I reverted your edits--72.49.52.246
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)[reply]

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)[reply]

The examples up now are fine.--72.49.52.246
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)[reply]

This article suffers from too many cooks in the kitchen.

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.

68.144.78.176 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.[reply]

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)[reply]
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)[reply]

Rewrite; what should this article be about?

Overview
Discuss the type of language ActionScript is,
History
The history of the language, but no extensive difference examples of AS 1.0, 2.0, 3.0.
Syntax
Discuss the syntax, show "hello world" example. Discuss differences AS 1.0, 2.0, 3.0.
Criticism
Related languages
References
Footnotes
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)[reply]

Now Open Source

Hi

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)[reply]

Scripting Language?

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)[reply]

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)[reply]
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)[reply]

Proposed content for ActionScript Overview

Hi,

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: http://www.adobe.com/devnet/actionscript/

ActionScript language spec: http://livedocs.macromedia.com/specs/actionscript/3/as3_specification.html

ActionScript 3.0 Language Reference: http://www.adobe.com/go/programmingAS3

ActionScript 2.0 Language Reference: http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part4_ASLR2.html

Sincerely, Emmy Huang Product Manager, Adobe Flash Player http://weblogs.macromedia.com/emmy 192.150.10.200 06:52, 20 April 2007 (UTC)[reply]

Overview

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.

History

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

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

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

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

ActionScript 1.0
ActionScript 2.0
ActionScript 3.0

Syntax

ActionScript 2.0

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

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";
			addChild(txtHello);
		}
	}
}

Criticism

Resources

See also

Notes

References

Feedback on the proposed rewrite

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)[reply]
Hi - is the text I proposed still too confusing? There is already a reference entry for ECMAScript on Wikipedia.

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

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)[reply]

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)[reply]

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 http://weblogs.macromedia.com/emmy --192.150.22.5 01:26, 11 May 2007 (UTC)[reply]

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)[reply]

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)[reply]
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)[reply]

Infobox

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

Almost done. We just need to find a release date of ActionScript 3.0. —msikma (user, talk) 21:51, 3 May 2007 (UTC)[reply]
Found that and made some other additions, what about other paradigms? Membla 00:28, 4 May 2007 (UTC)[reply]
ActionScript
ParadigmObject-oriented
Designed byGary Grossman
DeveloperMacromedia, Adobe Systems
First appeared1998
Stable release
3.0 / June 27, 2006
Typing disciplineStrongly, Statically, Safely typed
OSCross-platform
Major implementations
Adobe Flash, Adobe Flex
Influenced by
JavaScript, Java

Time line by player

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)[reply]

Too Complete or...

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)[reply]