Creating a Magnifying Glass - Step Four: The Glass
Posted by : PhilS on Aug 01, 2008
Now we will hide the big map, except for the glass area.
- Create a new layer above the Big map layer called: Glass
- Draw a circle in this layer with a diameter of about: 145 pixels
- With your Arrow tool select the outside stroke of the circle.
Stroke selected
Go to: Edit - Cut
Note: You will paste the stroke later to create the glass rim.
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.
- Give the circle a Instance name: myCircle
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
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