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

It looks good, but this effect isn’t difficult to create. Let’s see how easy it is!

…and don’t forget to download the sample files here.

1. First, create a text field. I gave mine a variable name of "shuffle".

2. Convert the textfield to a movie clip, and name it "Random".

3. To convert to movie clip, select the textfield. Press f8, select radio movieclip, enter a name, and click Ok.

4. Right click the movie clip and access its actions. Insert this action:

onClipEvent (enterFrame)  
shuffle = random(9);

5. Create a duplicate of the movie clip.

That’s it! Run the movie!

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

Special Offer
Free course!

Git into it! Bonus course Introduction to Git is yours when you take up a free 14 day SitePoint Premium trial.