23
An Overview of An Overview of ActionScript ActionScript The Powerful Scripting Language of Macromedia Flash

An Overview of ActionScript The Powerful Scripting Language of Macromedia Flash

Embed Size (px)

Citation preview

An Overview of ActionScriptAn Overview of ActionScript

The Powerful Scripting Language of Macromedia Flash

History: PurposeHistory: Purpose

Front End DevelopmentCharacter AnimationsRich Application Development

– Web ServicesMotion Graphics

History: AuthorHistory: Author

Macromedia– Flash Engineering Team

Approachable Creative Power

Gary Grossman– Senior Engineering Manager, Macromedia

Flash Team

History: Macromedia FlashHistory: Macromedia Flash

Vector Animation ToolMostly Web Deployed

– Flash PlayerEnjoys a 98% of the World’s browsers

supportEvolved into a rich client delivery

vehicle

Flash and ActionScriptFlash and ActionScript

ActionScript is the Scripting language developed for Flash

Most notably handles interactions and event-handling in flash

Has access to full capabilities of Flash

Flash and ActionScriptFlash and ActionScript

-Macromedia Flash Interface

-- Concept of a timeline

Flash and ActionScriptFlash and ActionScript

Actions Frame

Good Program-ming practice

History: ECMA-262History: ECMA-262

Based on several originating technologies– JavaScript(Netscape)– Jscript(Microsoft)

Invented by Brendan Eich at NetscapeStarted Development: November 1996Approved as international standard: April

1998

History: ECMAScriptHistory: ECMAScript

Scripting LanguageOriginally designed for the WebObject based

– Cluster of Communicating Objects

History: ECMAScriptHistory: ECMAScript

Built-in types:– Undefined– Null– Boolean– Number– String– Object

History: ECMAScriptHistory: ECMAScript

Built-in objects:– Global– Function– Array– String– Boolean– Number– Date– Math

History: ECMAScriptHistory: ECMAScript

Built-in Operators– Unary– Multiplicative– Additive– Relational

ActionScriptActionScript

Flash MX runs ActionScript version 6 (MX)

Differs slightly from the ECMA-262 standard

Differences from ECMAScriptDifferences from ECMAScript

Exception HandlingString to Boolean conversionCase sensitivityFunction ConstructorDate Object

Differences from JavaScriptDifferences from JavaScript

Object ModelUndeclared VariablesInvoking Undeclared Variables

Lexical StructureLexical Structure

WhitespaceStatement TerminatorsCommentsReserved WordsIdentifiersCase Sensitivity

Features: StrengthsFeatures: Strengths

Cross-Platform ConsistencyHigh-level AbstractionMassive Developer baseMassive Web useObject-Oriented

– Inheritance Polymorphism

Features: WeaknessesFeatures: Weaknesses

Limitations– Flash Scripting language

Proprietary Flash PlayerException Handling

Sample ImplementationsSample Implementations

Kartoo Neostream

Interactive

Flash PlayerFlash Player

Not open sourceFlash Player Specification License

– May have been developed in several languages

– Portable C++ source code version– Hint of java

SWF file formatSWF file format

Open Source Designed with the following in mind:

– On-screen Display– Extensibility– Network Delivery– Simplicity– File Independence– Scalability– Speed

SWF file format– http://www.openswf.org/spec

LinksLinks

www.macromedia.com/support/flashwww.flashkit.comwww.ultraschock.comwww.asp101.com/articles/flashwww.flashcom.infowww.macromedia.com/software/flash/fl

ashremoting

ResourcesResources

ActionScript for Flash MX: The Definitive Guide– Colin Moock, O’Reilly Publications

Macromedia Flash Support Site– http://www.macromedia.com/support/flash

ECMA Language Specifications– www.ecma-international.org/publications/

files/ecma-st/Ecma-262.pdf