0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"    "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script type="text/javascript">
var flashNumber = 0;
var items = 3;
films = new Array(items)
films[0] = "1.swf";
films[1] = "2.swf";
films[2] = "0.swf";
function rotate(){
holder = document.getElementById('content');
flashNumber++;
if(flashNumber == items)
    flashNumber = 0;
holder.src = films[flashNumber];
}
</script>
</head>
<body>
<object width="400" height="300">
<param name="movie" value="1.swf">
<embed src = "movies/animals1.swf" name="content" id="content" 
width="400" height="300">
</embed>
</object>
<input type="button" value="next" onclick="rotate();" />
</body>
</html>

The aboe code playing only one swf file that is inside object tag..while clicking button no other files are not loading...

1 Answer 1

1

You're probably testing this in a browser that uses the <object> tag, which you're not updating in the rotate() function. I suggest you create a container, use something like SWFObject to generate the tag inside the container, then when running rotate(), change the contents of the container.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.