Dynamic image button with URL

Posted by Muhammad Shiraz Kamboh Tuesday, 12 June 2012 0 comments
In this thoroughly explained, detailed flash lesson, you will see how to create trendy and dynamic image button with URL. You can use this button for any web site. Using this lesson, you will also learn how to import any image into a flash stage, how to convert it into a Movie Clip Symbol, how to animate it, apply action script code on it and much much more! Let's start!

Example:


Step 1

First, save the image below which we'll use as button.






Step 2


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



Step 3

Call the current layer image. 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 the image that you saved in step 1!

Step 5

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



Step 6

While the new made Movie Clip (image) 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 7

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



Step 8

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



Step 9

Click now on frame 20 and hit F6 key on the keyboard.

Step 10

While you're still on frame 20, select the Selection Tool (V) and click once on the image to select it. After that, go to the Properties Panel (Ctrl+F3) below the stage! Then, select FIlters tab on the left side, click on plus icon and choose Adjust Color. Make the adjustments as follows:



Step 11

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



Step 12

Create now a new layer above the layer 1 and name it action.

Step 13

Click now on frame 20 and press F6 key.

Step 14

While you're still on frame 20, go to the AS panel (F9) and enter this code inside the actions panel:

stop();

Step 15

Go back now on the first frame, go again to the AS panel (F9) and enter this code inside the 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://icatchwebtutorials.blogspot.com/");
}

We're done now!

Go back on the main scene (Scene 1) and test your Movie (Ctrl+Enter).

Have a nice day!

Download source file (.fla)

Popular Posts

About Me

My photo
I create this Blog for learn the all kind of tutorial about web developing | HTML, Java, PHP, Graphic designing, Corel Draw, Photoshop, Micromedia Flash, Swish and many more related software and internet programming tutorials.

Followers

Blog Archive