I got a problem with the ExternalInterface in my Flex application. It "publishes" three methods via ExternalInterface.addCallback(). If I embed the Flex into my website, i can call these methods as expected.
Now the problem: I have to load the Flex-Application in two different places on my site, depending on it's size. It's some sort of zoom. So, if the user clicks "Zoom in", the Flex-Application disappears and reappers with doubled size. This is realized via an ajax method which loads the Flex-Application into another div and clears the first.
So, in other words, I have a Flex-Application (embedded using swfobject):
<object style="visibility: visible;" id="ariva-ds2" data="/flash/ds-flex-test/DerivateSelector.swf"
type="application/x-shockwave-flash" height="248" width="258"><param value="high" name="quality">
<param value="#FFFFFF" name="bgcolor">
<param value="transparent" name="wmode">
<param value="sameDomain" name="allowScriptAccess">
<param value="bgcolor=#FFFFFF&search_id=502&smallLayout=true" name="flashvars">
But after this reload, the method published by ExternalInterface are no longer callable.
Does anyone know what goes wrong or how to "republish" these ExternalInterface Callbacks?
Thanks in advance,
OK folks, i found the answer. The problem was that the browsers got confused by the fact that the newly loaded swf had the same id as the old one. So I appendid the time in milliseconds to the id of the <object>.