
Create a behavior 153
6. In the Properties view, click the Category View button in the toolbar to view the properties
as a table, and then locate the Effects category of properties.
This category lists the triggers for the Button control.
7. Assign your Glow effect to the mouseUpEffect trigger by entering the effect’s ID in curly
braces as the value of the trigger, as follows:
■ mouseUpEffect: {buttonGlow}
The curly braces ({ }) are necessary because effects are assigned to their triggers using data
binding.
In Source mode, the
<mx:Button> tag should look as follows:
<mx:Button x="40" y="60" label="View" id="myButton"
mouseUpEffect="{buttonGlow}"/>
8.
Save the file. The file should appear as follows:
<?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:Panel x="10" y="10" width="200" height="300" layout="absolute">
<mx:Button x="40" y="60" label="View" id="myButton"
mouseUpEffect="{buttonGlow}"/>
</mx:Panel>
</mx:Application>
Kommentare zu diesen Handbüchern