MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guia do Utilizador Página 158

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 256
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 157
158 Use Behaviors
6. Save the file. The final application should look like the following:
<?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: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>
<mx:Panel x="10" y="10" width="200" height="300" layout="absolute">
<mx:Button x="40" y="60" label="View" id="myButton"
mouseUpEffect="{buttonGlow}"
click="BlurMoveShow.play(); myLabel.visible=true;"/>
<mx:Label x="40" y="100" text="4 8 15 16 23 42" id="myLabel"
visible="false"/>
</mx:Panel>
</mx:Application>
Flex Builder compiles the application.
7. Click the Run button in the toolbar.
A browser opens and runs the application. Click the View button. The button emits a
green glow while a series of blurred numbers gradually comes into focus while moving
down 20 pixels.
In this lesson, you learned how to create behaviors, invoke an effect from a different
component, and combine more than one effect to create a composite effect. To learn more,
see Chapter 17, “Using Behaviors” in Flex 2 Developer’s Guide.
Vista de página 157
1 2 ... 153 154 155 156 157 158 159 160 161 162 163 ... 255 256

Comentários a estes Manuais

Sem comentários