Toxiclab.org

Photo model button with url

9.10.2009, 13:32
Submited in: Flash | Total Views: 11955

In this thoroughly explained, detailed flash lesson, I will show you how to create photo model button with url using the action script code and some special flash tips and tricks. You can use this button for some web site, for some presentation, or for some banner. Using this lesson, you will also learn how to import any photo into a flash stage, how to convert it into a movie clip symbol, how to apply action script code on it and much more!

Example:

Move your mouse cursor over the photo!



Step 1

Find any photo which you like to use for this lesson.



Step 2


Create a new flash document. Press Ctrl+J key on the keyboard (Document Properties) and set the dimensions of your document as the dimensions of photo. Select any color as background color. Set your Flash movie's frame rate to 32 and click ok.

Step 3

Call the current layer photo. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!

Step 4

Choose now File > Import > Import to stage (Ctrl+R) and import any photo into a flash stage. While the photo is still selected, go to the Align Panel (Ctrl+K) and do the following:

1. Make sure that the Align/Distribute to Stage button is turned on,
2. Click on the Align horizontal center button and
3. Click the Align vertical center button.



Step 5

While the photo is still selected, hit F8 key (Convert to Symbol) to convert it into a Movie Clip Symbol.



Step 6

Double-click on the movie clip on stage with the Selection tool(V).You should now be inside the Movie Clip.



Step 7

While the photo is still selected, hit again F8 key (Convert to Symbol) to convert it again into a Movie Clip Symbol!



Step 8

Click now on frame 20 and hit F6 key.

Step 9

Go back now on the first frame, select the Selection Tool (V) and click once on the photo to select it. After that, go again to the Properties Panel (Ctrl+F3) below the stage! Then, select Filters tab from the left side. Click after that on the plus icon and select the Adjust Color filter. Make the adjustments as follows:



Step 10

Right-click anywhere on the gray area between the two keyframes on the timeline and choose Create Motion Tween from the menu that appear.



Step 11

Call the current layer photo inside. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!

Step 12

Create now a new layer above the photo inside and name it action script.

Step 13

Click now on the first frame of layer action and go to the Action Script Panel (F9). Then, enter this code inside tha actions panel

stop ();

this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}

this.onRollOver = function(){
rewind = false;
play();
}

this.onRollOut = function(){
rewind = true;
}

this.onRelease = function(){
getURL("http://www.toxiclab.org");
}

Step 14

Click now on frame 15 of layer action and hit F6 key. After that, go again to the Action Script Panel (F9) and enter this code inside the actions panel:

stop();

We're done now!

Test your movie and enjoy!

Download example

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

Browse by category


Most popular tutorials