Flash Script - Zoom Lens

1. Open a new movie with a width of 400 and a height of 400, and a frame rate of 40/s.

2. Import into Flash a picture of your choice that has the same length and width as the frame.

3. Convert the picture to a movieclip.

4. Name the current layer Image 80%.

5. Align the picture movieclip exactly in the center of the stage.

6. Using the transforming tool scale the size to 80%.

Flash Script - Zoom Lens

7. Create a New layer name it "lens".

8. In the new layer create a circle.

9. Convert the circle to a movieclip give it an instance name "magnify".

Flash Script - Zoom Lens

10. Go to the timeline of "magnify".

Flash Script - Zoom Lens

11. Create a new layer and drag the picture movie on to the timeline. Align it the center of the stage.

12. Drag the new layer below the old layer, as shown below.

Flash Script - Zoom Lens

13. Make the top layer a mask.

14. Next, go to the main time line, create three key frames as shown below.

Flash Script - Zoom Lens

15. In the first key frame, insert the action:

startDrag ("/magnify", true); 

16. In the second key frame, use the action:

xx = getProperty("/magnify", _x);  yy = getProperty("/magnify", _y);  setProperty ("/magnify/bigpic", _x, 200-xx);  setProperty ("/magnify/bigpic", _y, 200-yy);

17. In the third key frame, insert the action:

gotoAndPlay (1); 

18. Play the movie! If you have followed these steps, you will get the result shown above!

19. By giving the action Mouse.hide() you can hide the mouse cursor.


Category: software Time: 2003-04-28 Views: 1

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.101 (s). 12 q(s)