Hi,
I am trying to retrieve data from a compiled .swc that is loaded into the main application. I have a generic function like so:
public function onSubFormFinishClick(event:MouseEvent):void
{
var applicationCompletedVar:int = 1;
trace("Application Complete = "+ applicationCompletedVar);
}
... that is run when the user clicks the Finish button within the custom .swc. I want to be able to pass that parameter to the main application. Can anyone point out examples of how to accomplish this? Using Flash and loading external swfs into an swf, I would simply dispatch a new event and listen for that event and act on hearing the event being passed. being new to Flex, I'm not sure how to accomplish this.
Thx for any help,
~Chipleh
Define public variable in main application for eg,
public var dataValue : String = "Hi";
Assign value to the dataValue in the SWC component file using FlexGlobals as:
FlexGlobals.topLevelApplication.dataValue = "Hello Friend";
Now, trace the value in the event handler in main application which handle event dispatched from SWC. Will get update value of dataValue.
North America
Europe, Middle East and Africa
Asia Pacific