type = 'application/x-shockwave-flash'
data = 'http://sitepointstatic.com/flash/smploader.swf'
width = '400'
height = '400'
bgcolor = 'black'
>

Download the sample files here.

1. Set up twolayers in a new movie. Name the first one "loader", and the second "picture".

2. In the picture layer import a large picture of your choice, and drop it into the layer. Make it 5 frames long, and make the last frame a key frame. Then delete the first four frames, leaving only the fifth, and call this "end frame". Insert the stop(); action into this layer.

3. Now go to the actions layer, and create two key frames.

4. In the first key frame, insert the action:

ifFrameLoaded ("endframe")  

{  

gotoAndPlay ("endframe");  

}

7. In the second key frame, insert the action:

gotoAndPlay (1); 

8. Press Ctrl+Enter twice on your keyboard. Voila! Your preloader is complete.

Georgina Laidlaw
Georgina has more than fifteen years' experience writing and editing for web, print and voice. With a background in marketing and a passion for words, the time Georgina spent with companies like Sausage Software and sitepoint.com cemented her lasting interest in the media, persuasion, and communications culture.

No Reader comments

Stay ahead of the game Exclusive content for developers and digital experts Go Premium