Question
JavaScript / ExternalInterface Proximity?
Hi all,
I've been trying to hit a JS function from the last frame of my SWF using ExternalInterface and it doesn't work when it lives in an external JS file. When the function is in-line with the HTML the function is exposed to ExternalInterface.
Is this the rule? Can ExternalInterface not see external JS functions?
Ultimately I'm trying to defeat the early window.onload javascript event that Safari makes. When Safari triggers this event, my swf isn't completely loaded and my javascript can't see the ExternalInterface functions yet. So I want to initialize the JS functions once the swf is totally loaded by initializing my JS from an ExternalInterface.call from the swf's last frame - after all assets are loaded.
Any ideas on this? Has anyone tried this before? Is this the rule?
Thanks.
Jim
I've been trying to hit a JS function from the last frame of my SWF using ExternalInterface and it doesn't work when it lives in an external JS file. When the function is in-line with the HTML the function is exposed to ExternalInterface.
Is this the rule? Can ExternalInterface not see external JS functions?
Ultimately I'm trying to defeat the early window.onload javascript event that Safari makes. When Safari triggers this event, my swf isn't completely loaded and my javascript can't see the ExternalInterface functions yet. So I want to initialize the JS functions once the swf is totally loaded by initializing my JS from an ExternalInterface.call from the swf's last frame - after all assets are loaded.
Any ideas on this? Has anyone tried this before? Is this the rule?
Thanks.
Jim