Javascript to reload a embedded flash movie.

enox10mx

New Member
Messages
29
Reaction score
0
Points
0
Hi.
On My Website i have an embedded flash video game.
I want to use javascript to reload the flash game when the user clicks a button/link.
here is the embed code:
HTML:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="static/TankTrouble_v3.6a.swf" ALIGN="center">
 <PARAM NAME=movie VALUE="static/TankTrouble_v3.6a.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#333399> <EMBED src="static/TankTrouble_v3.6a.swf" quality=high bgcolor=#333399 WIDTH="320" HEIGHT="240" NAME="static/TankTrouble_v3.6a.swf" ALIGN="center" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT>
How could I do this?
 
Last edited:

ellescuba27

Member
Messages
273
Reaction score
3
Points
18
HTML:
<span id="objectspan"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="static/TankTrouble_v3.6a.swf" ALIGN="center">  <PARAM NAME=movie VALUE="static/TankTrouble_v3.6a.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#333399> <EMBED src="static/TankTrouble_v3.6a.swf" quality=high bgcolor=#333399 WIDTH="320" HEIGHT="240" NAME="static/TankTrouble_v3.6a.swf" ALIGN="center" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT></span>
<script LANGUAGE="Javascript">
var objectspanmakeinnerhtml = "";
function editobjectspan() {
objectspanmakeinnerhtml = document.getElementById("objectspan").innerHTML;
document.getElementById("objectspan").innerHTML = "";
document.getElementById("objectspan").innerHTML = objectspanmakeinnerhtml;
}
</script>

To clear with link:

HTML:
<a href="#" onClick="editobjectspan();return false;"></a>
 

ellescuba27

Member
Messages
273
Reaction score
3
Points
18
It technically doesn't reload it, just overwrites what's on the page (that may mean it will have to do the loading screen again).
 
Top