Cursor Follower

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;
}

Close    To Top
  • Prev Article-Flash:
  • Next Article-Flash: None
  • Now: Tutorial for Web and Software Design > Flash > Special Effect > Flash Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction