Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

11. Animations and Effects > 11.5. Create Parallel Series or Sequences of Effec...

11.5. Create Parallel Series or Sequences of Effects

Problem

You want to create multiple effects that either play in parallel (at the same time) or play one after another.

Solution

Use the Parallel tag to wrap multiple effects that will play at the same time, or use the Sequence tag to wrap multiple effects that will play one after another.

Discussion

The Sequence tag plays the next effect in the sequence when the previous Effect object fires its effectComplete event:

<s:Sequence id=" sequencee" target="{this}">
    <s:Rotate3D targets="{[bar, foo]}" duration="4000" angleYFrom="0"
                angleYTo="360"/>
    <s:Glow duration="3000" color="#ffff00"/>
</s:Sequence>

Sequences can, of course, consist of multiple Parallel effect tags, because a Parallel tag is treated the same as an Effect and possesses the play() method that the Sequence will call when the previous Effect or Parallel has finished playing.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint