The Spinner Movie


Get Adobe Flash player
  1. Create a new movie and save it in the same directory as the spinner class: Spinner.as
  2. Draw a star, then double click to select both the fill and the stroke.
  3. Make the star a movie clip with the registration in the center
  4. Click the Advanced button to open up the full window
    export for action script
  5. Click export for ActionScript, then type in Spinner as the base class.
  6. Click the green arrow to make sure that Flash can find the class definition.
  7. Click OK. You will get an error message that no definition for Star.as was found. That is OK.
  8. Run the movie. The star will atomatically spin.
  9. Make multiple copies of the star all over the stage. They will all spin and no code in this movie.

INDEX, Spinning Stars: Objects, A Spinner Class, The Spinner Movie: Using a Class, The Clicker Class, Add new instance at run time, Add new instance at run time DEMO, Create a Flasher class
Next lesson: OOPs: More Classes

Copyright © Zebra0.com
All rights reserved worldwide.

 
 

The Spinner Movie: Using a Class