how i can communicate with my flash app ? i load in my extension flash
some like this
myDiv.innerHTML = <object…><param allowScriptAsses… etc …
flash load fine !!! now, i trace my externalInterface method
var flashObject = document.get…("myFlash")
alert(flashObject) <- okey - [embedHtmlObject …
alert(flashObject.myExternalMethod) <- native function its okey !!!
try excute
flashObject.myExternalMethod() and NOTHING !!! ((( externalMEthod not invoked !!! this problem ONLY on windows 7 in fireFox !
on mac os and firefox i use wrapedObject and externalInterface work fine ! but if i try use wrapedObject on windows system – i have error (((
HOW i can use ExternalInterface on windows in firefox correctly ?
First you need to add a callback to your ActionScript code:
If you are using swfObject to embed your flash movie you can use swfobject.getObjectById to detect your swf and call your methods.
If you are not using swfObject just copy and past the getObjectById method on your JS code:
And call it by doing:
Have a look on this, I actually code a small example on my blog: http://www.nelsond8.com/?p=515