views:

481

answers:

1

I have a menu control (as2), that is completely self-contained and doesn't rely on any interaction with the parent (as3). The menu control does load an external xml file that is in the same directory as the swf.

The menu control works fine when I run it on its own. But when I import it into the Library of my as3 fla, add it the stage and run it, it just sits and does nothing.

I can see the images that are part of the control, which leads me to believe it can't load the xml, but I'm not sure.

Does anyone have any ideas about:

  1. Loading an as2 swf into and as3 swf where they don't need to interact
  2. Loading an external file into an swf inside of another swf
+2  A: 

Have you tried with flash.net.Loader or if you are going for a Flex app: SWFLoader?

dirkgently
I havent tried loading it in code - will that be any different than loading it onto the stage? And I'm not using Flex.
Brian
If you're adding it to the stage within Flash and not doing it at runtime then it might be treated differently (the AS2 code might be stripped or something). I'd say try loading it at runtime via code.
Herms
That worked - thanks!!
Brian