Ok if you visit http://www.miniclip.com you'll notice that there is some kind of flash rotator on the home page. This is my code attempt to move between preloaded swf animations using javascript. I've tried giving id of the object or embed but this won't help. Of course this is not that simple and the code isn't working. My intent is to have animation change when clicking the next button. Any help will be greatly appreciated.
<html>
<head>
<script type="text/javascript">
var flashNumber = 0;
var items = 3;
films = new Array(items)
films[0] = "movies/animals1.swf";
films[1] = "movies/mammyblue2.swf";
films[2] = "movies/whitebird1.swf";
function nextmovie(){
holder = document.getElementById('content');
flashNumber++;
if(flashNumber == items)
flashNumber = 0;
holder.src = films[flashNumber];
}
</script>
</head>
<body>
<object width="400" height="300" id="content">
<param name="movie" value="animals1.swf">
<embed src = "movies/animals1.swf" name="content"
width="400" height="300">
</embed>
</object>
<input type="button" value="next" onclick="nextmovie();" />
</body>
</html>