content.application.test_property

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cohcoloco
Sent: Tuesday, November 13, 2007 5:49 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] accessing public properties from loaded mxml swf
(flex 2.01)

 

I'm trying to access the public properties from an swf that I've loaded,
but I get the error: ReferenceError: Error #1069: Property test_property
not found on _test_app_mx_managers_SystemManager and there is no default
value. I load an as3 swf using the same technique, with the same
variable name, and it works fine. the swf's are from the same host as
well.

the way im loading is:
public function loadAsset(url:String):void {
var aLoader:Loader = new Loader();
aLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
assetLoaded);
var context:LoaderContext = new LoaderContext();
context.applicationDomain= ApplicationDomain.currentDomain;
aLoader.load(new URLRequest(url), context);
}
private function assetLoaded(eventEvent:Event):void {
return assetEvent.target as LoaderInfo
}

.. then from the calling class..

my_app = app_loader.assetInfo(appString).content;

doing something like trace(describeType(appWin).toString()); reveals
that my public variables are not available from the mxml swf, but
available fine if I use this on a regular as3 swf, ive tried
my_app.application["test_property"] .. etc

Anyone know what I'm doing wrong?

 

Reply via email to