Advanced zoom process
1.11.2006, 17:40
Submited in: Flash | Total Views: 63474
Learn this tutorial, and see how to zoom any picture, object.... in flash 8 using the button and Action Script. You will also learn how to use instance name in the properties panel, how to convert some text into a Button and more.
Move your mouse over the zoom type to zoom the picture!
Step 1
Create a new flash document, choose Modify > Document (Ctrl+J) and set Width to 310 and Height to 310 px. Frame rate set to 20fps (Frames per Second).
Step 2
Double click on layer 1 to rename its name in background. Insert a new layer and name it zoom process.
Step 3
Lock background layer, select the zoom process layer, choose File > Import > Import to Stage (Ctrl+R) , and import any picture, object. See the picture below.

Step 4
While your picture is still selected, press F8 on the keyboard (Convert to Symbol) to convert it into a Movie Clip.

Step 5
Then, open the Properties Panel (Ctrl+F3), and under <Instance Name> type zoom.

Step 6
Double click on a new made Movie Clip (picture) or choose right click and Edit in Place.
Step 7
After that, click on frame 120, press F6, open the Action Script Panel (F9), and paste this script:
stop();
Step 8
Go back on layer 1, take the Free Transform Tool (Q) and decrease your picture like it is shown on the picture below.

Step 9
Click again on frame 1, and in Properties Panel (Ctrl+F3) under Tween choose Motion.

Step 10
Go back on the main scene (Scene1), insert a new layer and name it button.

Step 11
Take the Text Tool (T) and type zoom. Them, while your text is still selected, press F8 key to convert it into a Button. See the picture below.

Step 12
While your new made button (text) is still selected, open the Action Script Panel (F9), and paste this script:
on (rollOver) { _root.mouse_over_zoom = true; }
on (rollOut) { _root.mouse_over_zoom = fstartlse; }
Step 13
Insert a new layer and name it Action. Select the first frame, open the Action Script Panel (F9), and paste this script:
_root.zoom.onEnterFrame = function() { if (mouse_over_zoom) { _root.zoom.nextFrame(); } else { _root.zoom.prevFrame(); } };
Test your Movie (Ctrl+Enter)
We're done!
Download example
|