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");
This works fine when loading a Flash swf including Actionscript 3 (if compiled as an Actionscript Library Project).
var context:LoaderContext = new LoaderContext();
context.applicationDomain = new ApplicationDomain();
loader.load(request, context);
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

