Toxiclab.org

GetUrl By Picture

19.4.2006, 12:56
Submited in: Flash | Total Views: 65788

See how to create a picture gallery with getURL in flash using the Action Script. You will also learn how to convert image into a button, how to apply over effect on it and more.

Example:



Before you open Flash and go to work, find somewhere ten pictures and set its dimensions to 50x50px in photoshop or any other graphic program (could be done in flash also).

Step 1

Open flash, press Ctrl+R (Import to Stage) and import that pictures! Note! If flash aske you: This file appears to be part of a sequance of images. Do you want to import all of the images in the sequance? Click No, and import all pictures in first frame of layer 1. Double click after that on layer 1 to rename its name in pictures. See the picture below.





Step 2


Place after that the pictures on the positions like it is shown of the picture below!



Step 3

Select the first picture, press F8 key (Convert to symbol) to convert this picture into a Button. See the picture below.
 


Step 4

Double-click on the movie clip on stage with the Selection tool (V).



You should now be inside the movie clip

Step 5

Click on the frame below the over state and add a keyframe by pressing F8 key on the keyboard or choose: insert > timeline > keyframe.



Step 6

Create a new layer (layer2) and click again below the over state and add a keyframe by pressing F8 key on the keyboard. After that take the Rectangle Tool (R), click on Stroke Color and choose black color, for Fill color choose No color,  and do like it is shown on the picture below.







Step 7

Go back on the main scene (Scene1), take the Selection Tool (V), click once on the button to select it, open Action Script Pannel (F9) and paste this script:

on (release) {
getURL ("http://www.toxiclab.org/tutorial.asp?ID=62", "_blank");
}

We're done for first button ("picture")! Repeat all previous steps for all other pictures!

Enjoy!

Download example

Are you a website owner?
Click here to register and submit your tutorials!

Browse by category


Most popular tutorials