Click to See Complete Forum and Search --> : Flash Movie rotation using java


jamiebettles
12-15-2005, 08:25 AM
Hello

I'm a java novice and I have a problem that hopefully somebody can help me with...
I have a website and have a flash movie banner that runs along the top. I have now designed several flash movies and want to rotate which one appears when the site is opened...ie. every time someone visits the site, a different movie appears at the top..and i've got 4 movies to rotate.
Any suggestions or further questions are very much welcome :) ,

thanks,

jamie

KingKoen
12-15-2005, 09:12 AM
I think you'd better solve this one serverside, using php, jsp etc.
But if you want to do it with JavaScript, I think you can do the dollowing:
Create an array with all posible flash movies

var arr = ['a.swf', 'b.swf', 'c.swf', 'd.swf', 'e.swf']

determine a random element from this array like this

var elem = Math.random() * arr.length;

update the object's param values using the arr[elem] value.

felgall
12-15-2005, 01:33 PM
Sounds like they want to use Java and posted in the wrong forum.