website promotion banner
Free Stock Images
  • Create A Free Account
  • Download High-Res Stock Images For Free
  • +5 Million Images
Your Ad Here
Flash & Swish  Home Flash & Swish Flash Tutorials Cursor Follower
rss

Cursor Follower

Author: Stilva.com More by this author


1. To begin with, make a flash document. Set the size to 300×300 pixels.

Place on the root stage a movie clip.

Go to Insert -> New symbol -> Movie Clip, name it haircross.

With the line tool, draw a cross:

image 1

2. Drag&Drop the movie clip from the library (windows -> Library) on to the main stage, and give the movie clip an instance name: mc1.

image 2

3. Now, place the following script in the first frame of the main stage:

image 3

speed = .9;
setInterval(CursorMovement, 40);
function CursorMovement() {
mc1._x = speed*(mc1._x-_xmouse)+_xmouse;
mc1._y = speed*(mc1._y-_ymouse)+_ymouse;
}


Rate this Material: Bad 1 2 3 4 5 Excellent
print this page tell a friend subscribe to newsletter subscribe to rss

Add comments to "Cursor Follower"