Setup Variables

Now wer'e ready to start coding the ActionScript that really makes this project work. If necessary, return to the main stage, and select the first keyframe. Then, bring up the Actions window (Keyboard Shortcut is F9)

Start by declaring a variable using var. If you haven't done it yet, try to use the Add a new item to the script button:

  1. Type sW = Stage.width in the Variables box
  2. Select Number from the Data Type drop-down-list

Set two more variables: sH = Stage.height and numStars = 30: