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
Will explain back story to fictional kingdom Westeros
Arts & Ents blogs
- 1 'Nasa Confirms Six Days of Darkness in December': No, they don't - it's a hoax
- 2 Canadian actor punched in face after 'Islamophobia' experiment goes wrong in wake of Ottawa shooting
- 3 Topshop at centre of row over body image as 'shocking' skinny mannequin photo goes viral
- 4 If you think Russell Brand’s new book is confused, you should read what his critics have to say about it
- 5 Kentucky gang rape: 15-year-old boy left in critical condition after sexual attack by group at party
This is what a film sex scene actually looks like on set (mostly awkward)
Cumberbacklash: Benedict Cumberbatch as Doctor Strange riles Marvel fans
Best horror films of all time
Benedict Cumberbatch imagines 'explosive' Sherlock sex scene in graphic detail
Downton Abbey season 5 episode 6 - review: Thomas and Lady Edith show sad signs of the times
Pope Francis declares evolution and Big Bang theory are real and God is not 'a magician with a magic wand'
Huge surge in Ukip support after EU funding row, according to new poll
Ukip ‘exploiting grooming scandal’ to secure party’s first police chief
Nigel Farage: 'There’s nothing wrong with white people blacking up'
Maureen Lipman says 'she can't vote Labour while Ed Miliband is leader'
Muslims, immigration and teenage pregnancy: British people are ignorant about almost everything