1/19/2011 10:22:29 PM
Title:
Resource bundle
Hi all
I have a library project in which I am implementing resource bundles.I am trying to load resource swf at run time.
When I use this project in other project I am not able to load resource swf and getting following exception:
Unable to load resource module from locale/pt_Port/pt_Port_resource.swf?r=2613
atFunction/<anonymous>()[E:\dev\4.x\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:473]
atflash.events::EventDispatcher/dispatchEventFunction()
atflash.events::EventDispatcher/dispatchEvent()
atModuleInfoProxy/moduleEventHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1168]
atflash.events::EventDispatcher/dispatchEventFunction()
atflash.events::EventDispatcher/dispatchEvent()
atModuleInfo/errorHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\modules\ModuleManager.as:782]
I am using the following lines to load swf:
var evtDisp:IEventDispatcher = resourceManager.loadResourceModule("locale/" + selectedLanguage + "/" + selectedLanguage + "_resource.swf?r=" + getTimer());
evtDisp.addEventListener(Event.COMPLETE, completeResourceManagerEventListener);
evtDisp.addEventListener(IOErrorEvent.IO_ERROR, ioErrorLanguage);
The path constructed is right.
Is there any different way to use resource bundles with library projects or I am missing something.