MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Betriebsanweisung Seite 155

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 256
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 154
Invoke an effect from a different component 155
X: 40
Y: 100
2. Switch to Source mode and define your Blur effect by entering the following <mx:Blur>
tag after the
<mx:Glow> tag:
<mx:Blur id="numbersBlur"
blurYFrom="10.0" blurYTo="0.0"
blurXFrom="10.0" blurXTo="0.0"
duration="2000"/>
The tag properties specify the starting and ending amounts of vertical and horizontal blur.
3. In the <mx:Blur> tag, specify the Label control called myLabel as the target of the effect
(in bold):
<mx:Blur id="numbersBlur" target="{myLabel}"
blurYFrom="10.0" blurYTo="0.0"
blurXFrom="10.0" blurXTo="0.0"
duration="2000"/>
You want the effect to play on the component called myLabel.
4. In the <mx:Button> tag, specify the numbersBlur effect as the effect to play during a click
event (in bold):
<mx:Button id="myButton" x="40" y="60" label="View"
mouseUpEffect="{buttonGlow}" click="numbersBlur.play();"/>
When a user clicks the Button control, the application invokes the effect by calling the
effect’s
play() method.
Because the numbersBlur effect targets the myLabel control, the application applies the
effect to the label, not the button.
5. Hide the Label control from the user by setting its visible property to false in the
<mx:Label> tag, as follows (in bold):
<mx:Label id="myLabel" x="40" y="100" text="4 8 15 16 23 42"
visible="false"/>
You dont want to display the numbers until the user clicks the View button.
6. Make the Label visible only when the user clicks the View button by programmatically
setting its
visible property to true in the button’s click property, as follows (in bold):
<mx:Button id="myButton" x="40" y="60" label="View"
mouseUpEffect="{buttonGlow}" click="numbersBlur.play();
myLabel.visible=true;"/>
When the user clicks the button, the blur effect starts playing and the Label becomes
visible.
Seitenansicht 154
1 2 ... 150 151 152 153 154 155 156 157 158 159 160 ... 255 256

Kommentare zu diesen Handbüchern

Keine Kommentare