Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MXML 1.61 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  3.                xmlns:s="library://ns.adobe.com/flex/spark"
  4.                xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
  5.    
  6.     <fx:Script>
  7.         <![CDATA[
  8.             import spark.events.TextOperationEvent;
  9.             protected function myButton_clickHandler(event:MouseEvent):void
  10.             {
  11.                 myLabel.text = ""
  12.                 myInput.text =""
  13.             }
  14.            
  15.             protected function myInput_changeHandler(event:TextOperationEvent):void
  16.             {
  17.                 myLabel.text=myInput.text
  18.             }
  19.            
  20.             protected function myButton2_clickHandler(event:MouseEvent):void
  21.             {
  22.                 currentState="Drugi"
  23.             }
  24.            
  25.         ]]>
  26.     </fx:Script>
  27.    
  28.     <fx:Declarations>
  29.         <!-- Place non-visual elements (e.g., services, value objects) here -->
  30.     </fx:Declarations>
  31.     <s:states>
  32.         <s:State name="Pierwszy"/>
  33.         <s:State name="Drugi"/>
  34.     </s:states>
  35.     <s:Panel includeIn="Pierwszy" x="231" y="135" width="351" height="246">
  36.         <s:Button id="myButton" x="74" y="33" label="Button" click="myButton_clickHandler(event)"/>
  37.         <s:Label id="myLabel" x="220" y="28" width="89" height="26" fontSize="14" text="Label"/>
  38.         <s:TextInput id="myInput" x="74" y="0" change="myInput_changeHandler(event)"/>
  39.         <s:Button id="myButton2" x="51" y="159" label="Button" click.Pierwszy="myButton2_clickHandler(event)"/>
  40.     </s:Panel>
  41.     <s:Panel includeIn="Drugi" x="231" y="135" width="351" height="246" backgroundColor="#656FB2"
  42.              chromeColor="#874444">
  43.         <s:Button x="51" y="159" label="Button" chromeColor="#933434" click="currentState='Pierwszy'"
  44.                   focusColor="#1464AE"/>
  45.     </s:Panel>
  46.    
  47. </s:Application>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement