I'm excited to find out the support of ExternalInterface in
ActionScript. But, I'm a bit disappointed after realizing
CallFunction doesn't work when Flash ActiveX is hosted by my ATL
Composite Control in IE.
- My test sample is a very simple Flash8 file, it has only
one button with the following ActionScript:
var wasSuccessful:Boolean =
ExternalInterface.addCallback("Flash_Hello", null, FlashHello);
2. The Flash file above is played locally, I have verified it
has the "Local Trust" privilage and ExternalInterface.addCallback
3. When the button is clicked, my ATL container is able to
receive the "FlashCall" event, but CallFunction with properly
formated XML argument returns com_error, the CallFunction looks
4. The exact same CallFunction succeeds in my standalone test
application, it only fails in IE6.0 and probably IE7.0 as well
though I didn't verify.
5. In addition, I wrapped my ATL container as Mozilla plugin
and run it in FireFox, surprisingly, CallFunction succeeds. This
leads me to believe that Flash ActiveX explicitly checks for IE and
may tighten its security level which prevents the inbound
communication to the ActionScript.