I've never tried it but let's try something.
Use the following method's signature: private function form_onSubmitDataListener (event:SwfDataEvent):void
Then you should be able to use event.task.selectedRoute
Coercing the event to SwfDataEvent is pointless since the event that we receive from the UITask application is just a plain Event. Having said that, your post was extremely useful in pointing out that the Task class has a selectedRoute property. Since the UITask application binds to the Task class then if we keep a reference to the Task object we can access it once its value is modified!
I confirmed that the following solution does indeed work:
private function form_onSetWorkspaceData( event: SwfDataEvent ) : void
lcConnector.task = event.task;
private function form_onSubmitDataListener( event: Event ) : void
var route : String = lcConnector.task.selectedRoute;
if ( form_isValid( route ) == false )
var data : XML = form_dataEmit( route );
lcConnector.setSubmitData( data );
Message was edited by: Filipe Toscano | Setting question as answered.
Can you help me? I am working in workbench and i want to get route button which is in workbench clicked. The application as Flash are imported in workbench. If you clicked button in workbench you will get route button which is clicked.