I have just tried my code in Beta 3, and thankfully this is no longer an issue!

Cheers,

Nathan

On 5/8/06, Nathan Smith < [EMAIL PROTECTED]> wrote:
Say I have a plugin type framework and i'm wanting to load swf's into this framework at runtime using a Loader.

I also want to protect my framework so that plugins (swf's) can't access my mx.core.Application.application (and it's members).

I figured I could do this by loading plugins into their own ApplicationDomain partition.

Code would look something like this (event handling omitted):

request = new URLRequest("someplugin.swf");
var context:LoaderContext = new LoaderContext();
context.applicationDomain = new ApplicationDomain();
loader.load(request, context);

This works fine when loading a Flash swf including Actionscript 3 (if compiled as an Actionscript Library Project).

However, when loading any Flex 2 swf the following is thrown:

TypeError: Error #1009: null has no properties.
            at mx.resource::ResourceBundle$/getBundle()
            at mx.effects::EffectManager$/::loadResources()
            at mx.managers::SystemManager$/registerInitCallback()
            at mx.effects::EffectManager$cinit()
            at global$init()
            at _Main_FlexInit$/init()
            at mx.managers::SystemManager/::frameEndHandler()


I can load a Flex 2 swf but only if I set the ApplicationDomain the same one as the framework, ie:

context.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);

Some feedback on this would be very much appreciated.

Best Regards,

Nathan Smith



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to