Control a Timeline with Mouse Position

Attach MovieClip

Let's get the movieClip on the stage using attach.Movie, which you've done before. First, find your clip in the Library, the right-click and choose Linkage:

  1. Select Export for ActionScript
  2. Make the Identifier main (if it isn't already)
  3. Click OK

Now create the init function:

  1. Click Statements > User-Defined functions > function
  2. Create the name init

Now add the attachMovie action to that init function. Remember, this action goes {inside the function braces}:

  1. Click ActionScript 2.0 Classes > Movie > MovieClip > Methods > attachMovie
  2. Type _root in the Object box (we want this movieClip to go right on the stage)
  3. Type the Linkage Name main and Deselect Expression
  4. Type the New Name main and Deselect Expression
  5. Set a Depth of 1

Next, we'll use some script to set the x,y position the clip.