Continued......

3. Adding Action Script and Tweens

At the moment the site is pretty static and we now need to add some life. To do this we are going to create some basic tweens. Tweens are basically animation. There very simple to do and we are going to use Tweens to make the text and the images fly into position, fade in and have links to web addresses.

First we are going to get the Welcome text to fly in from the left and finish at its current position. Single left click on the Welcome text and then right click with your mouse and then select convert to symbol or using the tool bar "Modify/Convert to Symbol". (This is where you convert the Text box to a movie clip.) When you do this a pop up window will appear which will ask you to name the symbol and then you will have an option of Movie Clip,Button or Graphic. If you select movie clip and then in the name the symbol "mc_welcome". The reason why we place "mc" is so we know when we look in the library window we know its a movie clip (btn = Button,gr = Graphic). You will now see that there is a new object in your library called "mc_welcome".

library

 

 

 

 

If you now double left click on the Welcome text you will now open the move clip. You will see on the "Timeline" that there is now "Stage" and "mc_welcome". We now need to extend the time line to create the animation. If you left click in Keyframe 30 and press F6 or go to the tool bar "Insert/Timeline/Key Frame". This now has set that the animations duration. (There are 12 frames per second).

library

 

 

 

Now we need to tell Flash what to do. Click on the first frame and then use your cursor keys and hold the left cursor and you can move the Welcome text. Move it so that the whole of the text is not on the stage. Making sure the frame 1 is still selected go to the tool bar "Insert/Timeline/Create Motion Tween" or right click Create Motion Tween. You will notice that the layer will change blue and an arrow will go from left to right. The final frame in 30 will have no arrow. If you then drag the cursor over the the timeline from right to left you will notice that the "Welcome Text" will move from left to right

library
library

 

 

 

 

 

 

 

If you press control and enter together you will then run the the website. This will show you how the site will run live on line.

The Welcome Text should continuously move from left to right. This is because we have not told flash to stop the animation.

To stop the movie on frame 30 we need to edit mc welcome. Double click on the movie clip and then add a new layer above the layer in the movie clip. Again you need to make sure you have named the layers. In the new layer rename it to "Actions", in frame 30 press F9 or "Windows/Actions". A window should appear and this is where we tell Flash to stop the animation. There are several tool here which help you if your not confident in coding. In line wine type the following:" Stop(); ". Then close the Action window. You will see in Layer 2 in frame 30 there is a "a" this means that there is some Action Script. If you know run the movie by pressing control and enter you will notice that the Welcome text will fly in from left to right and stop in its original place.

library
library

 

 

 

 

We now need to make the image fly in from the left and position to the left of the text, but we want to make it seem that the image has appeared from no where. If you repeat the same process as above but this time in frame one go to the properties area at the bottom and you will see an drop down with "None". If you change this to "Alpha" and then you will see a percentage bar. If you move this to zero you will see that that the image will disappear off the stage. When you run the movie now you will see that the image should fly in from the left and slowly appear from nothing.

library

 

 

 

 

 

 

 

 

 

We want to do the same thing to the content, this will mean when a user first goes to the website, all the text and the image will fly in and also appear from nothing.

Page 1 |Page 2 |Page 3 |