HomeAfter Sale Support Working with Flash Advanced How to make images display randomly

How to make images display randomly


Q: How can I can make a certain number of images display randomly?

A: In Flash (as well as in JavaScript) you can use the Math.random() function which generates pseudo-random numbers. This function can help you in making a slideshow when you need to use a large amount of images. You only have to store these images in the Flash library, convert them to slideshows, and give them names (that include the various numbers assigned to each slide). After that apply a code similar to the one shown in the following demonstration: How to make images display randomly demo movie