Usando propiedades publicas.
Main
Código XML:
Ver original<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">
<mx:Script>
<![CDATA[
protected function show():void
{
component.showProps();
}
]]>
</mx:Script>
<local:some prop1="String" prop2="10" id="component" />
<mx:Button click="show()" label="Show data" horizontalCenter="0" verticalCenter="0" />
</mx:Application>
component
Código XML:
Ver original<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
public var prop1:String;
public var prop2:Number;
public function showProps():void
{
Alert.show("prop1="+ prop1+" prop2="+prop2);
}
]]>
</mx:Script>
</mx:Canvas>