Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

PAL #9: Introduction to ActionScript


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

PAL #9: Introduction to ActionScript

  1. 1. PAL #9: Introduction to ActionScript
  2. 2.  The Actions panel is a script wizard, text editor, and code-checker, all in one. To open the Actions panel, choose ‘Window > Actions’, or press F9 (Windows) or Option+F9 (Mac OS). On many laptops, you will need to add the function (fn) key: Fn+Option+F9.
  3. 3.  Code Snippets allow us to get up-and-running with ActionScript quickly and easily. Open your project with morphing shapes; export and playback the movie. You’ll notice that it continually loops over and over. Let’s use ActionScript to stop the playback at the end of the movie.
  4. 4.  Select the final frame of the animation. Open the Code Snippets and select the ‘Timeline Navigation’ options and ‘Stop at this Frame’. This will add a statement called stop(); at the end of the movie. Test the movie. Note that it now stops at the end of the movie.
  5. 5.  Create a brand new project. Add three button ‘Components’, naming the three ‘Red’, ‘Green’ and ‘Blue’. Place a large box in the background with the colour red. Create a new keyframe with the box colour changed to green. Create a final keyframe with the box colour changed to blue. Test the playback; what happens with the movie?
  6. 6.  Use ‘Code Snippets’ to make the movie work correctly. Remember, you’ll need to stop the movie on the first frame before you add the other actions, else you’ll still have issues with playback.