Spring 2016 – 43 – Buttons and ActionScript

Objective:

  • Use ActionScript to control the Timeline or add interactivity to animations.
  • Place ActionScript code in frames on the Timeline or in external files.
  • Use keyboard shortcuts to view ActionScript.
  • Add event listeners and stop actions.
Student-Friendly Objective:

  • I can use ActionScript to control the Timeline and add interactivity to animations.

Video Links:

Getting Started: Add a stop() statement in ActionScript 3.0
:
https://www.dummies.com/how-to/content/add-a-stop-statement-in-flash-cs5-actionscript.html

Getting Started: How to use gotoAndPlay() and gotoAndStop() in ActionScript 3.0:
https://www.dummies.com/how-to/content/how-to-use-gotoandplay-and-gotoandstop-in-flash-cs.html

  • ActionScript 3.0
  • Timeline
  • Layers
  • Event Listener
  • Stop Action
  • Button Symbols

Assignment:

  1. Open the “Pac-Man” animation created last week.
  2. Read the information in both of the above links to learn how to apply ActionScript 3.0 to create stop actions and to control the position of the playhead during animation playback.
  3. Use the technique demonstrated in the linked tutorials to create a button called “Rewind” that replays your animation from the beginning.
  4. Use the same technique to create a second button called “Chase” that only plays the portion of your Pac-Man animation where Pac-Man chases the Blue Ghost off the stage.
  5. Save your work. Turn in your animation with functioning Rewind and Chase buttons, titled “Your Name – Pac Man Controls.fla” file to folder “43 – Pac Man Controls” into your period’s subfolder by the end of today.

Assigned: April 25nd, 2016
Due Date: April 26th, 2016