Get moving and animate your site
Monday 03 August 1998
The idea: For this Flash animation, I wanted to add movement to the logo I use for my freelance business. I call myself "moonshadowNM" and my logo is a moon covering a sun, with a starburst glow coming off the edge of the moon. I wanted to animate the moon, slowly moving it across and eclipsing the sun. You can take a look at the final results at: http://www.webbed environments.com/examples/30/ index.html
Creating vector graphics and bringing it into Flash: Flash has some fairly sophisticated drawing tools and can even render complex gradients, but I had created the logo in another vector drawing program, in this case Freehand. This file included each of the elements I mentioned above. I ran Flash and imported the vector graphic by selecting File-Import and then selecting the file I created in Freehand.
Setting up the layers: Now that the elements are in Flash, we need to put each one on its own layer so that we can give each element an action independent of the other elements. I created three more layers (four in total), cut the elements off the first layer, and placed each on to its own layer with the topmost element in the deign residing in the topmost layer.
Setting the key Frames: Like a film strip, a Flash animation is made up of still frames. As each still frame is played back in sequence, the result is the illusion of action. In Flash, we set up key frames to define the starting and stopping points of the action. For this move, the animation lasted a little over a second, so I set key frames by selecting the first frame of all five layers and clicking Insert-Key frame and then did the same in the 30th frame (1.2 seconds later). This copies the information from the first frame into all of the frames to the 30th frame.
Moving elements: I wanted the moon to move from the bottom right corner across to its final position. To do this, I set its starting position by selecting frame one in layer three, clicking on the moon and moving it down to the position I wanted it to start at. Next, I selected all of the frames in layer three and choose the Frame option in the Modify menu. Finally, I select motion in the Tweening menu and clicked OK. This will automatically fill in the frames between the two key frames to give the illusion that the moon is moving across the face of the sun.
Resizing elements: Resizing an element works very much like moving one, where you set the starting size and then use the Tweening control to set up the frames in between to the final size. To resize the starburst, I enlarged the element in the first frame until it was the same size as the sun behind it. I then selected Frame from the Modify menu and then shape from the Tweening menu. This will fill the in-between frames, giving the illusion that the starburst shrinks as the moon moves across the face of the sun.
Exporting the animation: You can save the Flash file in its native format, but in order to use the animation on the Web, you have to export the Flash movie into the Shockwave format so that it can be played in a browser using the Shockwave plug-in. This is actually fairly easy. I just selected Export Movie under the File menu, clicked Save, and accepted the default settings by clicking OK.
Embedding the movie in a Web page: To see the Flash movie, I had to embed it into an HTML page. I used the following code for my movie:
This places my Flash movie into the Web page and expands it to fill 95 per cent of the space available to it, turns looping off so that it only plays once, and sets the quality of the image to be high.
Take a look at the final results online and notice that no matter how the window is sized, the Flash animation will resize to fit in the window. Not only will a GIF animation not resize in this manner, the same animation as a GIF is 51K versus 5K for the Flash file.
Send comments or questions to Jason Cranford Teague at indy_ email@example.com
elephant appealThe first 23 lots in our charity auction have now gone. But there are 22 more still up for grabs
Look beyond the usual shows for the best festive telly
Michelle Nijhuis' daughter insists (s)he is, and she learnt a valuable lesson on gender in books
newsFormer soldier taped 33 of the animals to the floor and then stamped on them one by one
Arts & Ents blogs
Exclusive: Young people ‘want UK to stay in Europe’: Four in 10 adults aged 18 to 24 are ‘firmly in favour’ of membership, poll shows
Tom Daley ‘is gay because his father died’ says UK evangelist
Iain Duncan Smith leaves Commons food banks debate early
Kiss and yell: Italian protester charged with sexual assault after kissing riot police officer
PM denies two child limit for benefits is part of Tory welfare policy
Anachronistic and iniquitous, grammar schools are a blot on the British education system
- 1 North Koreans are gasping for the truth: Let's give it to them
- 2 Sun will 'flip upside down' within weeks, says Nasa
- 3 Christmas comes early: Justin Bieber is 'retiring from music'
- 4 Burglar steals video tapes of child abuse, hands them into police
- 5 Cycle death inquest: Boyfriend hugs driver of 32 tonne tipper truck that killed his girlfriend
- < Previous
- Next >