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

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 256
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 156
Create a composite effect 157
Create a composite effect
You can make the Label component move down by 20 pixels while the numbers come into
focus. In other words, you can combine your Blur effect with a Move effect.
Flex supports combining more than one effect to create a composite effect. You define a
composite effect with either the
<mx:Parallel> tag or the <mx:Sequence> tag, depending
on whether you want the combined effects to play in parallel or sequentially. For your
application, you want the Blur and Move effects to play in parallel.
1. In Source mode, start your composite effect by entering the following <mx:Parallel> tag
before the
<mx:Blur> tag:
<mx:Parallel id="BlurMoveShow">
</mx:Parallel>
The name of your parallel composite effect is BlurMoveShow.
2. Select the full <mx:Blur> tag in your code, and then paste it between the opening and
closing
<mx:Parallel> tags so it becomes a child tag of the <mx:Parallel> tag.
3. Select the target="{myLabel}" property in the <mx:Blur> tag, and then move it into the
opening
<mx:Parallel> tag so it becomes a property of the <mx:Parallel> tag, as follows
(in bold):
<mx:Parallel id="BlurMoveShow" target="{myLabel}">
You want the composite effect to play on the component called myLabel.
4. Define your new Move effect by entering the following <mx:Move> tag after the <mx:Blur>
tag:
<mx:Move id="numbersMove" yBy="20" duration="2000"/>
You want the Label control to move down 20 pixels in two seconds.
The completed
<mx:Parallel> tag should look as follows:
<mx:Parallel id="BlurMoveShow" target="{myLabel}">
<mx:Blur id="numbersBlur"
blurYFrom="10.0" blurYTo="0.0"
blurXFrom="10.0" blurXTo="0.0"
duration="2000"/>
<mx:Move id="numbersMove" yBy="20" duration="2000"/>
</mx:Parallel>
5.
In the <mx:Button> tag, change the effect to play in response to the click event by
replacing the numbersBlur effect with the BlurMoveShow composite effect, as follows (in
bold):
<mx:Button id="myButton" x="40" y="60" label="View"
mouseUpEffect="{buttonGlow}" click="BlurMoveShow.play();
myLabel.visible=true;"/>
Seitenansicht 156
1 2 ... 152 153 154 155 156 157 158 159 160 161 162 ... 255 256

Kommentare zu diesen Handbüchern

Keine Kommentare