Copy link to clipboard
Copied
Hi, for last couple of days I am struggling with loading locales (of course it works on Android and in fast packaging on iOS 🙂 ).
Its flex project with AIR SDK 3.7 (without ASC 2.0) and Flex SDK 4.6, FB 4.7. Here's my test app:
loader = new Loader();
var url:URLRequest = new URLRequest("assets/locales/en_US.swf");
var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
loader.load(url, loaderContext);
after its successfully loaded I use ModuleManager..
modInfo = ModuleManager.getModule("assets/locales/en_US.swf");
modInfo.load(ApplicationDomain.currentDomain, null, loader.contentLoaderInfo.bytes, FlexGlobals.topLevelApplication.moduleFactory);
Result is that it stucks with loading the data to the ModuleManager with the error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.core::FlexModuleFactory/getDefinitionByName()
at mx.core::FlexModuleFactory/docFrameHandler()
at mx.core::FlexModuleFactory/docFrameListener()
at mx.core::FlexModuleFactory/docFrameListener()
I've also tried ResourceManager.loadResourceModule but it throws the same error (I guess it works the same way)
The en_US.swf file is generated with this script:
<exec dir="${APP_ROOT}" executable="C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\bin\mxmlc.exe" failonerror="true">
<arg line="-locale=en_US" />
<arg line="-static-link-runtime-shared-libraries=true -verify-digests=false" />
<arg line="-source-path='${APP_ROOT}/resources/locale/{locale}'" />
<arg line="-include-resource-bundles=rpxLocale"/>
<arg line="-swf-version=20" />
<arg line="-target-player=11.7" />
<arg line="-output='${outdir}/assets/locales/en_US.swf'" />
</exec>
A note: strange is that loading styles with StyleManager works for me:
styleManager.loadStyleDeclarations2("assets/css/style.swf", true, ApplicationDomain.currentDomain);
Thank you for any thoughts!
Peter
Copy link to clipboard
Copied
No help at all? Is there something (e.g. more code?) which I can provide to explain the situation?
P.
Copy link to clipboard
Copied
Hi,
Could you please open a new bug report on this over at bugbase.adobe.com? When adding the bug, please include reproducible sample application so we can quickly test this out internally. If you would like to keep this private, feel free to email the attachment at nimitja@adobedotcom.
Once added, please post back with the bug URL/number so that others affected can add their votes and comments.
Regards,
Nimit