MACROMEDIA FLEX-GETTING STARTED WITH FLEX Uživatelský manuál Strana 109

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 148
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 108
<mx:SetProperty target="{this}" name="height"
value="100" />
<mx:SetProperty target="{btnChanger}" name="label"
value="Open" />
</mx:State>
</mx:states>
<mx:transitions>
<mx:Transition fromState="open" toState="closed">
<mx:Parallel duration="500">
<mx:SetPropertyAction target="{btnChanger}" />
<mx:Resize target="{this}"
easingFunction="{mx.effects.easing.Bounce.easeOut}" />
</mx:Parallel>
</mx:Transition>
<mx:Transition fromState="closed" toState="open">
<mx:Parallel duration="500">
<mx:SetPropertyAction target="{btnChanger}" />
<mx:Resize target="{this}"
easingFunction="{mx.effects.easing.Bounce.easeOut}" />
</mx:Parallel>
</mx:Transition>
</mx:transitions>
<mx:Button id="btnChanger" label="Open"
click="onChangerClick(event);" />
</mx:VBox>
Here I am specifying that the transition from open to closed
and vice versa should happen over the course of 500 millisec-
onds and should use a bouncing transition function. This
makes the box kind of jump up and down a little as it goes from
big to small and back to big again. It’s fun to watch.
Transitions can make changes in the interface really fun to play
with. And building transitions in Flex is so easy you will find
yourself using them all the time.
A Simple Video Viewer
Sure, images are easy, but what about video? As it turns out,
video is pretty easy too. The first thing you have to do is to get
your videos into Flash Video (FLV) format. To do the conver-
sion I use an application called FFmpeg (http://
ffmpeg.mplayerhq.hu/). Well, actually I use a GUI wrapper for
States and Transitions | 93
Zobrazit stránku 108
1 2 ... 104 105 106 107 108 109 110 111 112 113 114 ... 147 148

Komentáře k této Příručce

Žádné komentáře