
156 Use Behaviors
The Behaviors.mxml file should contain the following MXML code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Glow id="buttonGlow" color="0x99FF66"
alphaFrom="1.0" alphaTo="0.3"
duration="1500"/>
<mx:Blur id="numbersBlur" target="{myLabel}"
blurYFrom="10.0" blurYTo="0.0"
blurXFrom="10.0" blurXTo="0.0"
duration="2000"/>
<mx:Panel x="10" y="10" width="200" height="300" layout="absolute">
<mx:Button x="40" y="60" label="View" id="myButton"
mouseUpEffect="{buttonGlow}"
click="numbersBlur.play(); myLabel.visible=true;"/>
<mx:Label x="40" y="100" text="4 8 15 16 23 42" id="myLabel"
visible="false"/>
</mx:Panel>
</mx:Application>
7.
Save the file.
Flex Builder compiles the application.
8. Click the Run button in the toolbar.
A browser opens and runs the application. Click the View button. The button emits a
green glow while a series of blurred numbers gradually comes into focus.
Comentários a estes Manuais