Flash ExternalInterface Problems
Friday August 3, 2007
So I’ve been working on this project for a while to try and integrate Flash 8 / Flash 9 and Flex. After a few weeks banging away at this, deep down part of me believes this melding could be better achieved pouring wet cement over the whole lot. Letting the mixture set into rock so I can stand between it and the nearest convenient “hard place” (whatever that entails), would be representative of where I’m at.
Some things I’ve unearthed on the journey have been enlightening, so here’s a list, of slightly luminous morsels, that may brighten the dreary, winding and treacherous path that is the ExternalInterface class.
1. The ActiveX control that loads flash player needs to have a HTML container in order to start the JScript engine. External interface won’t work if you’re just accessing your file with a URL ending in *.swf.
Always put ExternalInterface SWFs in HTML pages.
2. FlashInterface might solve some of your problems, but it has it’s own issues, and virtually no community support. I’ve found it okay for dispatching events.
MAKE SURE YOU SET THE “flashId” VARIABLE.
3. ExternalInterface DOES NOT play well with the flash debugger and the ActiveX player. When testing in I.E., only ever test using Run to get consistent results.
4. You may be required to lax off the Security in the zone you’re testing in. ExternalInterface uses the scripting engine of the browser, so in I.E. you may have to fiddle with your “Internet Options”, and reset to at least medium to get things working.
...
More to follow, check back for updates and additions.
Also relevant to one of my current projects, the Flash 8 FocusManager (and all earlier versions), has a bug.