<s:View>
Flex Mobileアプリケーション内で、内にあるイベントをリッスンする方法はあり<s:ViewNavigator>
ますか?次のアプリケーション構造があるとしましょう。
主な用途:
<s:TabbedViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="databaseConnection(event)">
<s:ViewNavigator id="tasks" width="100%" height="100%"
label="Tasks" firstView="views.TasksView"
title="Tasks" icon="@Embed('assets/icons/tasks.png')">
</s:ViewNavigator>
</s:TabbedViewNavigatorApplication>
view.TasksView:
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:Button label="New View" click="{navigator.pushView(views.AddTask)}"/>
</s:View>
view.AddTask:
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="{dispatchEvent(new Event("happened"))}">
<fx:Metadata>
[Event(name="happened", type="flash.events.Event")]
</fx:Metadata>
</s:View>
happened
メインアプリケーションでイベントを聞きたかったとしましょう。どうすればそのようなイベントを聞くことができますか?
お時間をいただきありがとうございます。