AS3 mouse follow

June 19, 2010

CS4

  • Create New Flash File ActionScript 3.0
  • Select the Selection Tool V
  • Go to Properties tab and press Edit button and set the width of your document to 400 pixels and the height to 300 pixels.
  • Set the frame rate FPS to 30.
  • Change the layer name to background ( double click on it ).
  • Select the rectangle tool and create a 400×300 sized rectangle without any stroke.
  • Align it to the center of the stage ( Ctrl+k).
  • Now add a radial fill for the rectangle as follow in the picture below.
  • Create a new layer and change the name to “follower”.
  • In the follower layer draw a white cirle without any stroke and size 25×25.
  • Convert the circle to a movie clip with as follow in the picture below.
  • Change the Instance Name to “follower”.
  • Create the last  layer and change the name to “as3
  • Press F9 to open AS3 panel.
  • Copy / Paste the following code:

Step 2

Step 3

Download Source
, , , , , , ,

One Response to “AS3 mouse follow”

  1. admin Says:

    you need to install TweenMax from http://www.greensock.com/tweenmax/

Leave a Reply