Groups | Blog | Home
all groups > flash (macromedia) > february 2005 >

flash (macromedia) : Randomly Loading a Flash File


dan mode
2/28/2005 2:32:52 PM
look in the help under random

--

Dan
blah blah lengthy signatures rule
*NEW* check me out http://d-mode.ww.com
(ahhh...vanity)
Alt+F+X
__
[quoted text, click to view]

Good4Sule
2/28/2005 8:31:30 PM
Is there a way to randomly load different Flash files on one html page? Sort of
the same as using JavaScript to randomly load a different image each time the
page is loaded/refreshed.

Any help would be appreciated.

Thanks,
Ryan
anilnatha
2/28/2005 9:38:05 PM
you can use the javascript to write the object/embed tags in the html everytime
the page loads and then simply output a different swf filename for the
embed/object tags to point to randomize what is loaded in.
urami_
3/1/2005 7:17:41 AM


[quoted text, click to view]

You could do it all within SWF (flash) file.
Just make a dummy SWF and place it in your html document,
make it with one empty frame and the following action :

loadMovieNum("movie"+(Math.ceil(Math.random()*3))+".swf", 1);

Assuming you name these movies movie1.swf movie2.swf movie3.swf etc....

change the 1 to whatever level you need and 3 define number of movies, change accordingly...


--
Regards

Urami

--


<urami>
http://www.Flashfugitive.com
</urami>

<web junk free>
http://www.firefox.com
Good4Sule
3/1/2005 12:42:43 PM
AddThis Social Bookmark Button