MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manuale Utente Pagina 133

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 184
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 132
New Behaviors syntax 133
Change to the range of several effect properties
For the Zoom, Fade and Dissolve effects, the range of the alpha, scaleX, scaleY,
zoomHeightFrom, zoomWidthFrom, zoomHeightTo, and zoomWidthTo properties have
changed. You used to set these values as percentages using integer values, where 0
corresponded to 0%, and 100 to 100%. You now specify them as decimal values, where 0.0
corresponded to 0%, and to 1.0 corresponded to 100%.
Flex 1.5:
<mx:Effect>
<mx:Zoom name="big" zoomTo="105" duration="100"/>
<mx:Zoom name="small" zoomTo="100" duration="100"/>
</mx:Effect>
Flex 2:
<mx:Zoom id="big" zoomHeightTo="1.05" zoomWidthTo="1.05"duration="100"/>
<mx:Zoom id="small" zoomHeightTo="1.0" zoomWidthTo="1.0" duration="100"/>
Using the setStyle() method to set effects
The return value to the getStyle() method has changed when used with a behavior. Because
trigger properties for behaviors are implemented as styles, you can use the
setStyle() and
getStyle() methods to manipulate triggers and their associated effects. The setStyle()
method has the following signature:
setStyle("trigger_name", effect)
where:
trigger_name String indicating the name of the trigger property; for example,
mouseDownEffect or focusInEffect.
effect The effect associated with the trigger. The data type of effect is a String containing
the name of the effect, an Effect object, or an object of a subclass of the Effect class.
The
getStyle() method has the following signature:
return_type getStyle("trigger_name")
where:
trigger_name String indicating the name of the trigger property.
return_type An Effect object, or an object of a subclass of the Effect class.
For detailed information, see Chapter 17, “Using Behaviors,” in the Flex 2 Developer’s Guide.
Vedere la pagina 132
1 2 ... 128 129 130 131 132 133 134 135 136 137 138 ... 183 184

Commenti su questo manuale

Nessun commento