Now: Tutorial for Web and Software Design > Flash > Special Effect > Flash Content
> Cursor Follower [Bookmark it]
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;
}

[Bookmark][Print] [Close][To Top]
  • Prev Article-Flash:

  • Next Article-Flash: None
  • Related Materias
    Layers in Flash
    My First Flash Animation
    Getting URL
    Self-Animating Objects and
    Load Parameters From a Tex
    Do-It-Yourself Slider
    Do-It-Yourself Scrollbar
    Using Illustrator Symbols 
    Applying Masking to a Pict
    Colouring In
    Topics
    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
    Graphic Design Tutorial
     

    Coreldraw Tutorial

      Illustrator Tutorial
      3D Graphics Articles
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial&Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial&Articles
     

    XML Style Tutorial

      AJAX Tutorial
      XML Mobile
    Flash Tutorial&Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial&Articles
     

    Linux Tutorial

      Symbian Tutorial
      MacOS Tutorial