martixko

Untitled

Jan 26th, 2014
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MXML 0.85 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <s:WindowedApplication 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">
  5.    
  6.     <fx:Script>
  7.         <![CDATA[
  8.            
  9.            [Bindable]
  10.            private var foo:Foo = new Foo();
  11.            
  12.            protected function button1_clickHandler(event:MouseEvent):void
  13.            {
  14.                // TODO Auto-generated method stub
  15.                foo.setColor();
  16.            }
  17.        ]]>
  18.     </fx:Script>
  19.    
  20.     <s:Button left="100" label="click me!" click="button1_clickHandler(event)"/>
  21.    
  22.     <s:Rect width="100" height="100">
  23.         <s:fill>
  24.             <s:SolidColor id="sc" color="{foo.color}"/>
  25.         </s:fill>
  26.     </s:Rect>
  27. </s:WindowedApplication>
Advertisement
Add Comment
Please, Sign In to add comment