Content deleted Content added
copyedit, completed sentences |
GreenC bot (talk | contribs) Rescued 1 archive link; Move 1 url. Wayback Medic 2.5 per WP:URLREQ#zdnet.com |
||
(21 intermediate revisions by 19 users not shown) | |||
Line 1:
{{Short description|Object-oriented programming language created for the Flash multimedia platform}}
{{for|the endpoint management interface|IBM BigFix#Action Script{{!}}IBM BigFix § Action Script}}
{{Use mdy dates|date=April 2013}}
{{Infobox programming language
Line 7 ⟶ 8:
| year = 1998
| designer = [[Gary Grossman]]
| developer = [[Macromedia]] (now dissolved into [[Adobe Inc.|Adobe Systems]])
| latest_release_version = 3.0
| latest_release_date = {{start date|2006|06|27}}
| typing = [[strong typing|strong]], [[static typing|static]]
| implementations = [[Adobe Flash Player]], [[Adobe AIR]], [[Apache Flex]], [[Scaleform GFx]]
| influenced_by = [[HyperTalk]], [[JavaScript]], [[Java (programming language)|Java]]
| influenced = [[Haxe]], [[TypeScript]]<ref>{{Cite web |last=Nelson |first=Gary |date=28 April 2020 |title=How ActionScript foreshadowed TypeScript |url=https://javascript.plainenglish.io/how-actionscript-foreshadowed-typescript-149cdb764de9 |access-date=9 July 2022 |website=Medium |language=en}}</ref>
| website = [https://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html adobe.com/devnet/actionscript/]
}}
Line 21 ⟶ 22:
| mime = application/ecmascript<ref>{{IETF RFC|4329}} (limit compatible with EcmaScript)</ref>
}}
'''ActionScript''' is an [[object-oriented programming]] language originally developed by [[Macromedia|Macromedia Inc.]] (later acquired by [[Adobe
ActionScript is used primarily for the development of websites and software targeting the [[Adobe Flash]] platform, originally finding use on [[web page]]s in the form of embedded [[SWF]] files.
Line 30 ⟶ 32:
==Overview==
ActionScript was initially designed for controlling simple two-dimensional vector animations made in Adobe Flash (formerly Macromedia Flash). Initially focused on animation, early versions of Flash content offered few interactivity features, thus had very limited scripting
Flash MX 2004 introduced ActionScript 2.0, a [[scripting language]] more suited to the development of Flash applications. Saving time is often possible 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 has been released, ActionScript 3.0. This version of the language is intended to be compiled and run on a version of the [[
Flash libraries can be used with the XML
==History==
Line 48 ⟶ 50:
* '''Flash Player 4''': The 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 in the first version of ActionScript, it used [[prototype-based programming]] based on ECMAScript,<ref>{{cite web|url=http://www.ecma-international.org/publications/standards/Ecma-262.htm |title=Standard ECMA-262 |publisher=Ecma-international.org |access-date=April 22, 2013}}</ref> 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 statement|switch]]. The first version with support for the [[Action Message Format
* '''Flash Player 7''': Additions to it include Cascading Style Sheets ([[CSS]]) styling for text and support for ActionScript 2.0, a programming language based on the ECMAScript 4 Netscape Proposal
* '''Flash Player 8''' further extended ActionScript 1/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 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 [[Just
* '''Flash Player 10 (initially called Astro)''': Added basic [[3D computer graphics|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 rate]]s, especially with [[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.<ref>{{cite web|url=http://labs.adobe.com/technologies/flashplayer10/ |title=Adobe Labs – Adobe Flash Player 10.1 |publisher=Labs.adobe.com |access-date=December 17, 2009| archive-url= https://web.archive.org/web/20100105125609/http://labs.adobe.com/technologies/flashplayer10/| archive-date= January 5, 2010 | url-status= live}}</ref>
* '''Flash Player 11''': The major addition in this version are the [[Stage3D]]-based advanced (graphic card accelerated) 3D capabilities for Windows Desktop, Mac Desktop, [[iOS]], [[Android (operating system)|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 encoding for cameras, Native [[JSON]] support, Cubic Bézier Curves, a secure random number generator, [[LZMA]] compression for
* '''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 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, it 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 ActionScript workers (enables concurrent 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 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, and support for push notifications for iOS (Adobe AIR).
* '''Flash Player 11.5''': Released in November 2012, it focused on performance improvement and stability. Some of the features in this release include shared ByteArray support for ActionScript workers, debug [[stack trace]] in release builds of Flash Player, and various bug fixes.
* '''Flash Player 11.6''': Released in March 2013, it focuses on performance improvements, security enhancements, and stability. Some of the features in this release include 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,
* '''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 Android captive runtime debugging, support for the [[Ouya|OUYA]] controller, remote hosting of SWF files on iOS, and preventing backup of shared objects on iOS for better iCloud support.
* '''Flash Player 11.8''': Adobe was planning to release this version in the early part of the second half of 2013, code-named "Harrison". This release focused on premium video, gaming, security, and stability. Some of the features in this release would have included recursive stop API on MovieClips and GamePad support on desktop browsers and Android.
===Timeline by ActionScript version===
====2000–2004: 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.<ref>{{Cite web|url=https://helpx.adobe.com/x-productkb/multi/release-notes-flash-player-11.html|title=Flash Player 11, AIR 3 Release Notes|website=helpx.adobe.com|access-date=2016-10-07}}</ref> This was the first version of ActionScript with influences from [[JavaScript]] and the [[ECMA-262]] (Third Edition) standard, supporting the said standard's object model and many of its core [[data type]]s. Local variables may be declared with the {{Mono|var}} statement, and user-defined [[function (computer science)|functions]] with [[parameter (computer science)|parameter]] passing and [[return statement|return]] values can also be created. Notably, 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, [[Adobe Flash Player|Flash Player 6]], the language remained essentially unchanged; there were only minor changes, such as the addition of the {{Mono|switch}} statement and the "strict equality" ({{Mono|1====}}) operator, which brought it closer to being [[ECMA-262]]-compliant. Two important features of ActionScript that distinguish it from later versions are its loose type system and its reliance on prototype-based [[inheritance (
====2003–2006: ActionScript 2.0 ====
The next major revision of the language, ActionScript 2.0, was introduced in September 2003 with the release of Flash MX 2004 and its corresponding player, [[Adobe Flash 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 of programming languages|syntax]], such as the keywords {{Mono|class}} and {{Mono|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 programming|class-based]] inheritance syntax was a layer on top of the existing prototype-based system. With ActionScript 2.0, developers could constrain [[variable (programming)|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 (programming language)|Java]] and [[C++]]. This version conformed partially to the [[ECMAScript]] Fourth Edition draft specification.
====2006–2020: ActionScript 3.0====
Line 88 ⟶ 87:
===Flash Lite===
* '''[[Flash Lite]] 1.0''': Flash Lite is the Flash technology specifically developed for mobile phones and consumer electronics devices.
* '''Flash Lite 1.1''': Flash 4 ActionScript support and additional device APIs added.
* '''Flash Lite 2.0 and 2.1''': Added support for Flash 7 ActionScript 2.0 and some additional fscommand2 API.
Line 181 ⟶ 180:
* '''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 2 complex data types'''
Line 188 ⟶ 187:
* '''MovieClip''' + An ActionScript creation that allows easy usage of visible objects.
* '''TextField''' + A simple dynamic or input text field. Inherits the
* '''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.
Line 209 ⟶ 208:
* '''String''' – The String data type represents a sequence of 16-bit characters. Strings are not stored internally as Unicode characters, using the [[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 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 3.0, the default value for Object instances is
'''ActionScript 3 some complex data types'''<ref name="adobe1"/>
* '''Array''' + Contains a list of data. Though 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
* '''Date''' – A date object containing the date/time digital representation.
* '''Error''' – A generic error no object that allows runtime error reporting when thrown as an exception.
Line 228 ⟶ 227:
* '''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 array]]s that contain key-value pairs, where keys are Not Strings and values may be any type.
* '''RegExp''' – A regular expression object for strings.
* '''Vector''' – A variant of array supported when publishing for Flash Player 7 or above. Vectors are typed, dense Arrays (values must be defined or
* '''XML''' – A revised XML object based on the E4X (Standard ECMA-357); nodes and attributes are accessed differently from 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 TXT class.
Line 282 ⟶ 281:
// <node><child value="13" /></node>
</syntaxhighlight>
Only references to an object may be removed by using the "delete" keyword.
<syntaxhighlight lang="actionscript">
var item1: XML = new XML("<node><child /></node>");
Line 294 ⟶ 293:
In opposition to the decompilers, ActionScript [[obfuscated code|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.{{Citation needed|date=March 2021}}
==References==
Line 357 ⟶ 302:
{{Wikiversity|ActionScript:Introduction}}
* [https://www.adobe.com/devnet/actionscript/ ActionScript Technology Center]
* [http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=Part2_AS2_LangRef_1.html ActionScript 2.0 Language Reference] {{Webarchive|url=https://web.archive.org/web/20130131044759/http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=Part2_AS2_LangRef_1.html |date=January 31, 2013 }}
* [http://help.adobe.com/en_US/AS3LCR/Flash_10.0/ ActionScript 3.0 Language & Component Reference]
** [http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/language-elements.html Language Elements]
Line 372 ⟶ 317:
{{DEFAULTSORT:Actionscript}}
[[Category:ActionScript| ]]
[[Category:Adobe Flash]]
[[Category:Class-based programming languages]]
Line 380 ⟶ 324:
[[Category:1998 software]]
[[Category:High-level programming languages]]
[[Category:Programming languages compiled to bytecode]]
|