본문 바로가기

Flex 문서

날짜출력 및 Wipe 효과

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApplication()">
<mx:Script>
 <![CDATA[
   private function initApplication():void {
      var today:Date = new Date();
      textArea.text = today.getFullYear() + '/' + (today.getMonth() + 1) + '/' + today.getDate();
      textArea.text += '\n';
      textArea.text += today.getHours() + ':' + today.getMinutes() + ':' + today.getSeconds();
                                                                                                   
      panel.addEventListener(MouseEvent.MOUSE_DOWN, panelMouseDown, false, 0, false);
                                                                                                     
      textArea.addEventListener(MouseEvent.MOUSE_DOWN, textAreaMouseDown, false, 0, false);
   }
              
   private function panelMouseDown(event:MouseEvent):void {
      var target:Array = new Array();
      target[0] = panel;
      wipeDown.play(target, false);
      event.stopImmediatePropagation();
   }

                     
   private function textAreaMouseDown(event:MouseEvent):void {
      var target:Array = new Array();
      target[0] = textArea;
      wipeRight.play(target, false);
      event.stopImmediatePropagation();
   }
 ]]>
</mx:Script>
 <mx:Panel x="10" y="10" width="250" height="143" layout="absolute" id="panel">
  <mx:TextArea x="10" y="10" width="210" height="81" id="textArea"/>
 </mx:Panel>
 <mx:WipeDown id="wipeDown"/>
 <mx:WipeRight id="wipeRight"/>
 
</mx:Application>

'Flex 문서' 카테고리의 다른 글

View States and Transitions의 사용  (0) 2007.06.15
Flex 이벤트 처리 순서  (1) 2007.06.15
Event  (1) 2007.06.14
CompModel  (1) 2007.06.13
for each in  (1) 2007.06.12
화면전환 ViewStack  (2) 2007.06.08
creationCompleteEffect  (1) 2007.06.08
contentLoaderInfo  (0) 2007.06.05
Loader 클래스를 사용한 이미지로더  (2) 2007.05.22
RSS  (0) 2007.05.13