Content deleted Content added
m Added links. |
Jerryobject (talk | contribs) Template:Infobox programming language, WP:REFerence WP:CITation parameters: respaces, cut whitespace characters to standardize, aid work via small screens, needless underscores > spaces, reorders, update-standardize-conform. WP:LINKs: update-standardize, adds, needless WP:PIPEs > WP:NOPIPEs. Adds: Template:Official website, MOS:COMMENT, WP:CATEGORY. |
||
Line 3:
{{Use mdy dates|date=April 2013}}
{{Infobox programming language
| name
| logo
| paradigm
| family = [[ECMAScript]]
| released = {{Start date and age|1998}}
| designer
| developer
| latest release version = 3.0
| latest release date = {{Start date and age|2006|06|27}}
| typing
|
| scope = [[Scope (computer science)|lexical]]
| 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>▼
| influenced by = [[HyperTalk]], [[JavaScript]], [[Java (programming language)|Java]]
| website = [https://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html adobe.com/devnet/actionscript/]▼
▲| influenced
▲| website
}}
{{Infobox file format
Line 23 ⟶ 25:
}}
'''ActionScript''' is an [[
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.
ActionScript 3 is also used with the [[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<ref>{{Cite web |url=http://help.adobe.com/livedocs/specs/actionscript/3/wwhelp/wwhimpl/js/html/wwhelp.htm |title=ActionScript 3 Language Specification |access-date=November 12, 2016 |archive-url=https://web.archive.org/web/20170327122455/http://help.adobe.com/livedocs/specs/actionscript/3/wwhelp/wwhimpl/js/html/wwhelp.htm |archive-date=March 27, 2017 |url-status=dead |df=mdy-all
ActionScript was also used with [[Scaleform GFx]] for the development of three-dimensional video-game user interfaces and [[heads up display]]s.
Line 125 ⟶ 127:
</syntaxhighlight>
Minimal ActionScript 3.0 programs may be somewhat larger and more complicated due to the increased separation of the programming language and the Flash [[integrated development environment
Presume the following file to be {{Mono|Greeter.as}}:
Line 200 ⟶ 202:
* '''EventListener'''
'''ActionScript 3 primitive (prime) data types'''<ref name="adobe1">{{cite web |url=http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000047.html |title=Data type descriptions + Flash CS3 Documentation |access-date=2007-07-13 |archive-url=https://web.archive.org/web/20071102191956/http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000047.html |archive-date=November 2, 2007 |df=mdy-all
* '''Boolean''': The [[Boolean data type]] has only two possible values: true and false or 1 and 0. No other values are valid.
Line 259 ⟶ 261:
// and the third (2) is an object with { a: 5, b: 7 }.
</syntaxhighlight>
Unlike some object-oriented languages, ActionScript makes no distinction between [[Primitive data type|primitive]] types and [[reference (computer science)|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.<ref>{{cite web |url=http://livedocs.adobe.com/flex/3/html/03_Language_and_Syntax_19.html |title=Flex 3 – Function parameters |publisher=Livedocs.adobe.com |access-date=December 17, 2009 |archive-url=https://web.archive.org/web/20090212103954/http://livedocs.adobe.com/flex/3/html/03_Language_and_Syntax_19.html |archive-date=February 12, 2009 |url-status=dead |df=mdy-all
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 is passed to a function, altering that variable inside the function will alter the original variable as well, as no new XML Object is created.
Line 290 ⟶ 292:
==Code protection==
Like most [[bytecode]] file formats, Flash [[SWF]] files can be [[decompilation|decompiled]] into their source code and assets (similarly to how [[.NET Framework|Microsoft .NET]] files can be decompiled). 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).<ref>{{cite web |url=http://www.flashmagazine.com/reviews/detail/review_trillix_flash_decompiler_3/ |title=Third party review of another decompiler |publisher=Flashmagazine.com |date=October 21, 2007 |access-date=April 22, 2013 |archive-url=https://web.archive.org/web/20170620134350/http://www.flashmagazine.com/reviews/detail/review_trillix_flash_decompiler_3/ |archive-date=June 20, 2017 |url-status=dead
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==
{{Reflist
==External links==
Line 301 ⟶ 303:
{{Wikibooks|Introduction to ActionScript 2.0}}
{{Wikiversity|ActionScript:Introduction}}
*
* [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 311 ⟶ 313:
* [https://web.archive.org/web/20100304105648/http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3/ Adobe Flex SDK]
* {{cite web |url=https://www.theverge.com/2017/7/25/16026236/adobe-flash-end-of-support-2020 |title=Adobe will finally kill Flash in 2020 |last=Warren |first=Tom |date=July 25, 2017 |website=The Verge |access-date=December 16, 2020 |archive-url=https://web.archive.org/web/20170725190530/https://www.theverge.com/2017/7/25/16026236/adobe-flash-end-of-support-2020 |archive-date=July 25, 2017 |url-status=live}}
{{Adobe Flash|state=uncollapsed}}
{{ECMAScript}}
Line 325 ⟶ 328:
[[Category:High-level programming languages]]
[[Category:Programming languages compiled to bytecode]]
<!-- Hidden categories below -->
[[Category:Articles with example JavaScript code]]
|