Thanks for the reply, Alex. But I read the blog three more times (and had already read it before) and couldn't identify the part that could point to an answer to my problem. Could you be more specific? Thanks!
Possibly I found the blog section you're referring to--the 360 Flex Conference.
The solution there, if I understand it, is to put shared code in a class that extends ModuleBase, and then use ModuleManager and IModuleInfo to load that class (compiled to a SWF) at startup into the main application. Is that correct?
Is that really the only way to catch a custom event from a loaded SWF? I'm not creating the SWFs that are loaded. Many of them will be dirt simple, even InDesign or Illustrator pages saved as SWF. But some content will be considerably more elaborate. And none are likely to be even remotely similar to a module. They're going to be timeline heavy with some AS3.
I provided an IControllableSWF interface to let Flash developers make their SWF accessible to my application. This was chiefly to overcome problems caused by a loaded SWF being unable to access the Stage. I also provided the SoundCueEvent with a callback when the sound has completed playing. This allows Flash developers to synch voiceovers without having to use dozens of timers, empty frames, etc.
I really would like to keep it as simple as possible for the people making the content SWFs.
Of course, maybe I didn't even find the right reference that you meant, in which case--sorry.
Yeah, that's the one. The classes SWFs have in common need to be in the top-level application domain.
Another option is to use MarshallPlan techniques but that might not be possible if you don't own the SWFs. There is a Marshall Plan post on my blog and more info on the opensource wiki. One of the key aspects is that our listeners are not strongly typed. They are typed as flash.events.Event then we map the event to an event in our applicationDomain if needed.
Flex SDK Developer
Adobe Systems Inc.
Thanks for the answer. Since one goal was to make things as simple as possible for the content developers, I decided to ditch the custom event and get them to use a normal flash Event. I added getters to the content interface so my main class can find the current sound url to play and the current start point. Thanks again for the help.