Forum Moderators: open

Message Too Old, No Replies

Generating a random number to show flash movies

         

RosscoPK

11:47 am on Sep 14, 2004 (gmt 0)

10+ Year Member



Hey Guys,

I've made four different flash animations that I want to randomly appear on a web page.

The code is below:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="600" height="60">
<param name="movie" value="images/4.swf">
<param name="quality" value="high">
<param name="LOOP" value="false">
<embed src="images/4.swf" width="600" height="60" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>

Pretty standard eh?

Okay, well I've tried out different methods to randomise the '4.swf' part without success. The files are all numerically named 1 - 4.swf

So - any help in achieving this would be appreciated!

It has to be in Javascript.

benihana

11:57 am on Sep 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it could all be done within flash.

just embed one empty movie as a container, generate the random number in actionscript, and use loadMovie to load in that movie.

pretty easy, and doesnt rely on javascript.

ben

RosscoPK

1:27 pm on Sep 14, 2004 (gmt 0)

10+ Year Member



Thanks for the tip!

After doing a bit of research I've found this to be much easier!

Cheers!