I am trying to develop a way to change a flash file displayed on the screen to another file by clicking a button. I have been able to do this with jpg images, but I can't get it to work with flash files. Can anyone help? I would greatly appreciate it. Below are two html's: the first one changes jpg images and it works, the second one I constructed to be similar to do the same with flash files but it does not work. I had to put // on all the lines, otherwise when I submitted the question it was tring to execute the html's. Thanks.
//Html 1. This changes Image 1 to Image 2 on click. It works
<html>
<head>
<script type="text/javascript">
function changeSrc()
{
document.getElementById("myImage").src="Image 2.jpg";
}
</script>
</head>
<body>
<img id="myImage" src="Image 1.jpg" width="400" height="400" />
<br /><br />
<input type="button" onclick="changeSrc()" value="Change image">
</body>
</html>
//
//
//Html 2. This is intended to change Flash 1 to Flash 2 on click. It does not work
<html>
<head>
<script type="text/javascript">
function changeSrc()
{
document.getElementById("myImage").src="Flash 2.swf";
}
</script>
</head>
<body>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
id="myImage" width="450" height="335">
<param name="movie" value="Flash 1.swf" />
</object>
<br /><br />
<input type="button" onclick="changeSrc()" value="Change image">
</body>
</html>