Source Code:
BasicViewAppUserListView.mxml
<?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="Cool People" creationComplete="view1_creationCompleteHandler(event)"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> <s:FlipViewTransition id="flipLeft" duration="300" direction="left" /> <s:FlipViewTransition id="flipRight" duration="300" direction="right" /> </fx:Declarations> <s:layout> <s:VerticalLayout paddingTop="10" /> </s:layout> <fx:Script> <![CDATA[ import mx.events.FlexEvent; import spark.events.IndexChangeEvent; protected function userList_changeHandler(event:IndexChangeEvent):void { // TODO Auto-generated method stub navigator.pushView(views.UserProfile, userList.selectedItem); } protected function view1_creationCompleteHandler(event:FlexEvent):void { // TODO Auto-generated method stub navigator.defaultPopTransition = flipRight; navigator.defaultPushTransition = flipLeft; } ]]> </fx:Script>
No comments:
Post a Comment