xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" backgroundColor="gray"
height="200">
import mx.managers.SystemManager;
[Bindable]
public var loadedSM:SystemManager;
// Initialize variables with information from
// the loaded application.
private function initNestedAppProps():void {
loadedSM = SystemManager(myLoader.content);
// Enable the buttons after the application loads.
b1.enabled = true;
b2.enabled = true;
b3.enabled = true;
}
// Update the Label control in the outer application
// from the Label control in the loaded application.
public function updateLabel():void {
lbl.text=loadedSM.application["lblOne"].text;
}
// Write to the Label control in the loaded application.
public function updateNestedLabels():void {
loadedSM.application["lblOne"].text = "I was just updated.";
loadedSM.application["varOne"] = "I was just updated.";
}
// Write to the varOne variable in the loaded application
// using the setVarOne() method of the loaded application.
public function updateNestedVarOne():void {
loadedSM.application["setVarOne"]("Updated varOne!");
}
complete="initNestedAppProps();" />
click="updateLabel();" enabled="false" />
click="updateNestedLabels();" enabled="false" />
click="updateNestedVarOne();" enabled="false" />