This tutorial will show you how to make an advertisement button in Flash 8.  To start you will have to create a new documentÉ

 

  1. Size you workspace by clicking the size button in your properties window        

         For this ad I will use the size 150 x 200

 


 

  1. Double click Layer 1 and rename it Background

 

 

  1. Click the first frame in this layer and draw or paste your background image

 

 

After you have finished your background image click the dot below the padlock on this layer.  This will lock the layer and prevent it from being changed unless you unlock it by clicking the same thing. If you want to lock all of the layers inside your animation you can click the padlock that is next to the square and the eye and that will lock all layers in the animation 

 

 

  1. Create 2 new layers by clicking the tab in the left hand corner.  Name those two layers, Òaction scriptÓ, and ÒtextÓ.  The Òaction scriptÓ layer is where any code that relates to the entire animation will go.  The ÒtextÓ tab is where the ad text will go.

 

 

  1. In the first frame on the text layer, add your initial on screen text by clicking the ÒAÓ symbol in the tool bar. 

 

 

Now we are going to create a key frame.  A frame is a slide that takes up a certain amount of time.  A key frame takes up the same amount of time as a frame but the image doesnÕt have to be the same.

 

  1. Click on the second slot in the text layer and right click.  Then click on insert key frame

 

 

  1. Click on the second frame in the text layer and double click the onscreen text; this should make it editable.

 

 

  1. Delete the text and type in the text you would like your ad to display second. 

 

You now have to decide how long you would like each text to be displayed. The number next to fps decided how many frames per second.  It is usually set on 12

 

 

In this example we will use 2 seconds for the initial text and then 2 seconds for the second text.  Using 12 frames a second we need a 24 frame gap between the two keyframes. We will add 23 frames by clicking on the 1st keyframe of the text layer and then hitting the F5 key 23 times. Now do the same thing but for the second keyframe.

 

 

9. Now click on the 49th frame on the background layer.  Click F5. 

This will insert 48 frames and make the background last the length of the entire animation. 

 

 

  1.  In the actions layer click the first frame.  In that frame draw a rectangle that has no border color and has a fill color that you would like as a background color.  Hit F8 and a dialog box should appear that asks what kind of symbol you would like to create.  We will click Button

 

 

 

  1. Click and hold the action script layer and drag it to below the rest of the layers.

 

 

  1. Extend the amount of frames for the action script layer to match the rest of the layers. 

 

 

  1. Click ˆ Window ˆ Actions.  This should open up a code window. 

 

 

  1. Click on the rectangle that we created in the action script layer.  The Code window should now be open to the coding for the button

 

 

  1. The code is rather simple.  To start we need to write a condition

 

         On(press) {

 

                  }

 

The open and close brackets are always necessary.

The next part of the code is makes the button an actual hyperlink to a website. 

 

On(press) {

         getURL(Òhttp://www.google.comÓ,Ó_blankÓ);

}

 

This will open google.com in a new window.

 

16.  The only thing remaining is to publish the .swf file and put it on the web.  To publish go to ˆ file ˆ publish and a .swf will be saved in the same place that the .fla is saved.