MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guida Utente Pagina 171

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 256
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 170
Create a transition 171
Create a transition
When you change the view states in your application, the check boxes immediately appear on
the screen. You can define a Flex transition that uses the WipeDown and Dissolve effects,
which make the check boxes appear gradually rather than immediately.
1. In Source mode, create a Transition object and specify the change in state that triggers it
by adding the following
<mx:transitions> tag immediately after the closing
<mx:states> tag:
<mx:transitions>
<mx:Transition id="myTransition" fromState="*" toState="Advanced">
</mx:Transition>
</mx:transitions>
The code defines one Transition object called myTransition. (You can define more than
one transition in the
<mx:transitions> tag.)
The code also specifies that the transition will be performed when the application changes
from any view state (
fromState="*") to the Advanced view state
(
toState="Advanced"). The value "*" is a wildcard character specifying any view state.
2. Specify the targeted component for the transition, and how you want the effects to play—
simultaneously or sequentially—by entering the following
<mx:Parallel> tag (in bold)
between the
<mx:Transition> tags:
<mx:Transition id="myTransition" fromState="*" toState="Advanced">
<mx:Parallel target="{myVBox}">
</mx:Parallel>
</mx:Transition>
The targeted component for the transition is the VBox container named myVBox.
Because you want two effects to play simultaneously during the transition, you use the
<mx:Parallel> tag. If you wanted the effects to play sequentially, you would use the
<mx:Sequence> tag instead. In that case, the second effect would not start until the first
effect finished playing.
3. Specify the effects to play during the transition by entering the following <mx:WipeDown>
and
<mx:Dissolve> tags (in bold) between the <mx:Parallel> tags:
<mx:Parallel target="{myVBox}">
<mx:WipeDown duration="2000"/>
<mx:Dissolve alphaFrom="0.0" alphaTo="1.0" duration="2000"/>
</mx:Parallel>
You want to play two effects, a WipeDown effect that causes the targeted container to
appear from top to bottom over a period of 2000 milliseconds, or 2 seconds, and a reverse
Dissolve effect that causes the contents of the container to gradually come into focus in 2
seconds.
Vedere la pagina 170
1 2 ... 166 167 168 169 170 171 172 173 174 175 176 ... 255 256

Commenti su questo manuale

Nessun commento