all groups > flash actionscript > november 2006 >
You're in the

flash actionscript

group:

how to load random images into a swf


how to load random images into a swf sirega
11/12/2006 11:13:03 PM
flash actionscript: I am making a web page, and i want the swf banner to load random images.
Could someone please help me with that. I would greatly appreciate it.
Re: how to load random images into a swf arunbe
11/13/2006 12:00:00 AM
Re: how to load random images into a swf fungusbogus
11/13/2006 12:14:53 AM
I presume that each SWF name has a numeric value like MySwf1, MySwf2, MySwf3
etc, etc

Generate a number randomly using the math.random() function.
For example :
SwfNo = math.random() * 100

Now use the number like this.
["MySwf"+SwfNo].loadMovie

AddThis Social Bookmark Button