Vote count:
0
Does someone know how to put a .swf file in an onclick button. I want to make a function that when you click on an invisible button a .svg animates in your screen. After that animation a picture need to change. Everything works, beside of the .swf file that has to animate.
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="1200" height="655" id="Documents/Flat Machine/explosion" align="middle">
<param name="movie" value="../Documents/Flat Machine/explosion.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#454545" />
<param name="play" value="true" />
<param name="loop" value="false" />
<param name="wmode" value="transparent" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../Documents/Flat Machine/explosion.swf" width="1400" height="655">
<param name="movie" value="../Documents/Flat Machine/explosion.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#454545" />
<param name="play" value="true" />
<param name="loop" value="false" />
<param name="wmode" value="transparent" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--<![endif]-->
</object>
<!--<![endif]-->
</object>
</div>
<script type="text/javascript">
function toggle_visibility(id) {
var e = document.getElementById('flashContent');
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
setTimeout(function() {
changeImage1();
// change time below to the time your animation takes
}, 1000);
});
function changeImage1() {
var image = document.getElementById('safari');
if (image.src.match("bulbon")) {
image.src = "safari.png";
} else {
image.src = "safariflat.png";
}
}
asked 1 min ago
How can I place a .swf file in a browser by a invisible onclick button? In the same time the function must load another image (with delay)?
Aucun commentaire:
Enregistrer un commentaire