CIS 421Flash>Intro to Actionscript 2.0

Flash CS3 Actionscript 3.0

  • similar to JavaScript
  • actions can be assigned to a specific frame
  • actions attached to frames execute when frame is reached
  • actions attached to objects execute when event is triggered- e.g., buttons clicked to start and stop playing movie, etc.
  • Can type in Actionscripts
  • Flash Actionscript palette also generates actionscript appropriate to selected objects
  • Flash Actionscripts can be stored in external files.

Can also use Actionscript 2.0

  • ActionScript 2.0 is not backwardly compatible.
  • SWF files developed with ActionScript 2.0 will not play in older Flash Players
  • Can be a problem if users do not have current Flash player (Flash 7.0)
  • SWF files will not play if browser does not allow ActiveX.
  • A number of Actions, Functions, Operators, and Properties from earlier versions have been deprecated and no longer work in ActionScript 2.0

top

Advantages of ActionScript 3.0

  • supports strict data typing -- declare variables
  • case sensitive
  • supports XML handling
  • provides objects with advanced methods that save a lot of programming work:
    • moviecliploader
      • Can load and unload a series of small SWF movies into a master SWF file
      • Provides functionality for preloader which displays download progress
  • loadVariables(url, target, [variables]);
    • from an external source, such as a text file
    • getURL("/cgi-bin/form.cgi", "_blank", "GET"):)
    • Can send variables to a URL outside a Flash movie
    • Can create and change objects within ActionScript

top