Home / Tutorials / Special Effects / Creating a Magnifying Glass /

Flash Tutorials

Creating a Magnifying Glass - Step Four: The Glass

Posted by : PhilS on Aug 01, 2008

 

5.0/5

Now we will hide the big map, except for the glass area.

  1. Create a new layer above the Big map layer called: Glass
  2. Draw a circle in this layer with a diameter of about: 145 pixels
  3. With your Arrow tool select the outside stroke of the circle.

Stroke selected

  1. Go to: Edit - Cut

    Note: You will paste the stroke later to create the glass rim.

  2. Right click (Mac Ctrl Click) on the inside of the circle and convert it to a Symbol. Name: Circle Behavior: Movie Clip

    Note: The advantage of creating the movie clip this way is that the circle will be perfectly centered in the movie clip and we need this.

Instance of circle on stage with a centered registration point.

  1. Give the circle a Instance name: myCircle
  2. Add the following code to the circle:

    onClipEvent (enterFrame) { _root.myCircle._x = (_root._xmouse); _root.myCircle._y = (_root._ymouse); }

    The ActionScript is almost identical but this time the circle will stick to the cursor and move with the mouse. There is no: *-1.5

  3. Right click on the Layer name: Circle Select: Mask

Your layers should look like this.

  **Note**: The layer stacking order is critical.

  It is probable a good time to save and test your movie, as all the main parts of the magnifying glass are done.

no comment

Add comment

Please login to post comments.