
Originally Posted by
kade119
Code:
<script type="text/javascript">
var flashvars = {};
var params = {};
var attributes = {};
swfobject.embedSWF("logo.swf", "logo-1", "750", "120", "9.0.0","expressinstall.swf", flashvars, params, attributes);
</script>
hmm.. two things:
you'll need to set up your flash to call a JavaScript function in your page
(with ActionScript 3 that's as simple as:
Code:
import flash.external.*; ExternalInterface.call("clearnoflash");
)
the function the swf will call will clear a no-flash timeout that has been set.
Code:
//this function should get called by your flash as soon as its loaded
function clearnoflash() {
clearTimeout(noflash);
}
//noflash will have to be a globaly defined timeout
i think logo-1 is the id of the div where the flash will go?
so some simple javascript if logo-1 starts out empty
you'll do this right after the swfobject placement:
Code:
//this code would go right after the SWFObject placement code
function checkflash() {
if (document.getElementById('logo-1').hasChildNodes())
{//goto alternate page because flash object is there yet timeout was not cleared}
}
//here's the noflash global var
var noflash=setTimeout("checkflash()", "15000");
and that's a simple way to do it, if you want more control you will have to do away with SWFObject
hope this helps