I have something like this
1.mxml
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
<mx:Script source="_Public.as"/>
</mx:Application>
_public.as
[Bindable]
public var config:XML;
public function init():void
{
var request:URLRequest = new URLRequest("config/config.xml");
try {
loader.load(request);
} catch (error:Error) {
trace("Unable to load requested document.");
}
loader.addEventListener(Event.COMPLETE,init_continue);
}
public function init_continue(event:Event):void {
config = new XML(loader.data);
}
The config is filled and I can use it. After that I press a button in 1.mxml
and it creates 2.mxml popup
(without the init).
config.xml
<data>
<LOGIN_BUTTON>Inloggen</LOGIN_BUTTON>
</data>
Now I want to access config.LOGIN_BUTTON
. But config doesn't give me anything.
Is it possible to get "access" to config, or not?