ActionScript: Difference between revisions

Content deleted Content added
No edit summary
Chrisdolan (talk | contribs)
coding
Line 1:
'''ActionScript''' is an [[ECMAScript]]-based programming language used for buildingcontrolling [[Macromedia Flash]] movies and applications. Since both ActionScript and [[JavaScript]] are based on the same ECMAScript syntax, fluency in one easily translates to the other. However, the client model is dramatically different: while JavaScript deals with [[Window]]s, [[Document]]s and [[Form]]s, ActionScript deals with [[MovieClip]]s, [[TextField]]s and [[Sound]]s.
 
ActionScript achieved something resembling it's current syntax (retroactively named ActionScript 1.0) in Flash 5, the first version of Flash to be thoroughly programmable. Flash 6 broadened the power of the [[programming environment]] by adding many more built-in functions and allowing more programatic control of movie elements. Flash 7 introduced ActionScript 2.0, which adds strong typing and explicit [[class declaration]]s. ActionScript 1.0 and 2.0 share the same compiled form within Flash SWFs.
Line 6:
* Everything is designed to be asynchronous; [[callback]]s are ubiquitous, but [[Event]] objects do not exist.
* The [[XML]] implementation has been solid since Flash 5. Flash can send and receive XML asynchronously.
 
ActionScript code is frequently written directly in the Flash authoring environment, which offers useful reference and powerful aids for syntax checking. In this case, the source code is saved along with the rest of the movie in a .fla file. It is also common for ActionScript code to be imported from external text files via #include statements. In this case, the external files are often given .as extensions, but this is not a universal convention.