blob: 55c80458783be33fd22039cf189b591d7b7be202 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<mx:Application backgroundColor="0xFFFFFF" backgroundImage="" xmlns:mx="http://www.adobe.com/2006/mxml" preinitialize="doPreinitialize()">
<!--
There is a different SWF file for each HTML wrapper.
The wrappers have different values for their flashvars.
Verification is done by:
localeChain: By the time preinitialize has occurred, the locale chain should be
in application.parameters. So get it and put it in a variable. When Mustella
runs, check that variable. Make sure the ResourceManager's localeChain
matches. Also, have one sanity check that makes sure a label really ends
up using a resource from a loaded SWF and uses the correct entry from the
localeChain.
resourceModuleURLs: Verify that the parameter gets set the same way as with
localeChain. Also, use the ResourceModule API to verify that the resources
from the loaded SWFs are available. Also, have one sanity check that makes
sure a label really ends up using a resource from a loaded SWF and uses the
correct entry from the localeChain.
PreloaderApp1:
localeChain: no params
resourceModuleURLs: no params
PreloaderApp2:
localeChain: fr_FR
resourceModuleURLs: Assets/resources/framework/frFrameworkResources.swf
PreloaderApp3:
localeChain: fr_FR,de_DE,ja_JP,en_US
resourceModuleURLs: Assets/resources/framework/frFrameworkResources.swf,
Assets/resources/framework/deFrameworkResources.swf,
Assets/resources/framework/jaFrameworkResources.swf
PreloaderApp4:
localeChain: en_US
resourceModuleURLs: http://localhost/resources/Preloader/SWFs/Assets/resources/custom/enCustomResources_bundle1_001.swf,
http://localhost/resources/Preloader/SWFs/Assets/resources/custom/enCustomResources_bundle2_001.swf
PreloaderApp5:
localeChain: fr_FR,en_US
resourceModuleURLs: Assets/resources/custom/enCustomResources_bundle1_001.swf,
http://localhost/resources/Preloader/SWFs/Assets/resources/framework/frCustomResources_bundle1_001.swf,
Assets/resources/custom/enCustomResources_bundle2_001.swf,
http://localhost/resources/Preloader/SWFs/Assets/resources/custom/en_fr_jaCustomResources_bundles1_2_001.swf
-->
<mx:Script><![CDATA[
public var appParamLocaleChain:String;
public var appParamURLs:String;
public var rmLocaleChain:String;
public var preinitializeError:String;
private function doPreinitialize():void{
try{
appParamLocaleChain = application.parameters.localeChain.toString();
appParamURLs = application.parameters.resourceModuleURLs.toString();
rmLocaleChain = resourceManager.localeChain.toString();
}catch(e:Error){
preinitializeError = e.message;
trace("doPreinitialize() error: " + e.message);
}
}
]]></mx:Script>
<mx:Label id="lbl1" text="@Resource(bundle='core', key='viewSource')" />
</mx:Application>