Now: Tutorial for Web and Software Design > Flash > Special Effect > Flash Content
> Show Room [Bookmark it]
Show Room

1. Make a new Flash document, and set its size to 300×300.

2. Make four layers, then name them so that you get something like this:

image 1

3. Go to: Insert->New Symbol->Movie Clip, and name it crosshair, simply draw a cross that looks like this (this will be your cursor):

image 2

Make sure the cross is centered with the align tools (go to Window -> Design Panels -> Align):

image 3

4. Drag&drop the crosshair movie clip from the Library (Window -> Library) into the layer: cursor, then give the movie clip an instance name: mc1

image 4

5. Go to Insert -> New Symbol -> Movie Clip, and name it mc2

This is the movie clip that will contain the 'room'. So, drop the 'room' picture in the movie clip mc2. Don't forget to center the 'room' picture with the align tools. Drag&drop it into the layer named mc. Give the movie clip the instance name mc2.

6. And finally, paste this code in the 1st frame of the layer AS:

image 5

speed = .9;
moview = 300;
//set this to the Flash movie's width
movieh = 300;
//set this to the Flash movie's height.
Mouse.hide();
setInterval(CursorMovement, 40);
function CursorMovement() {
mc1._x = speed*(mc1._x-_xmouse)+_xmouse;
mc1._y = speed*(mc1._y-_ymouse)+_ymouse;
mc2._x = (1-mc2._width/moview)*mc1._x+mc2._width/2;
mc2._y = (1-mc2._height/movieh)*mc1._y+mc2._height/2;
}

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

  • Next Article-Flash:
  • Related Materias
    Shape Transformations
    Generating and Publishing 
    Handwriting Flash Movie
    Working with Objects
    Cursor Follower
    Snow Effect With Wind
    Flash 8 Tutorial - Shape T
    Controlling File Size in F
    Introduction to Flash 8
    My First Flash Animation
    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