A Flash Actionscript is a bit of computer programming that can be built into your animation using a limited set of commands.
NOTE: These tutorials are all based on ActionsScript 2.0 (AS2)

You MUST have created your flash file as an AS2 for these instructions to work -
If need be, Change your file to to Actionscript 2


FLASH - ActionScripts

Actionscript01.gif

Hit the [F9] Key

to open up the ACTIONSCRIPT palette
Actionscripts can be attached and stored in on of two places:
  • FRAMES in your timline, or
  • OBJECTS (like symbol instances) on your stage

You have to CLICK on the FRAME or OBJECT to see it's actionscripts appear in the Actionscript editing window


SIMPLE USEFUL ACTIONSCRIPTS

  • STOP can stop the playback of an animation - very useful at the end of movie so it doesn't loop over and over
  • STOPALLSOUNDS will shut down any sounds currently playing

YOUR FIRST ACTIONSCRIPT - Try creating a STOP at the end of your movie
Actionscript001.jpg
To STOP your movie, you need to a STOP statement in the very last keyframe of the animation. There's only three steps:
# Create an ACTIONS layer in the last scene of your timeline
  1. Select the LAST frame of your movie in the ACTIONS layer and hit [F7] to create an empty keyframe
  2. Hit [F9] to open up the Actions palette, and type in STOP()
This is your FIRST actionscript "statement" that you should learn!

ADVANCED ACTIONSCRIPTS
  • ON (RELEASE) can be attached to a button to give it superpowers
    • (PLAY) will allow the button to continue from a STOP point
    • GOTOANDSTOP will jump to a specific SCENE or LABEL and freeze there
    • GOTOANDPLAY will jump to a specific SCENE or LABEL and resume playing from there


Other Useful Actionscripts
  • MovieControl
    • STOP
    • GOTO
  • Browser/Network
    • LOADMOVIE
  • Movie Clip Control
    • SETPROPERTY


Actionscript 1&2
  • Deprecated
    • Actions
      • Telltarget
  • Global Functions
    • Timeline Control
      • gotoAndStop