We learned moving a panel on a button click and sequencing animation in the last post. In this post we’ll learn implementing the parallel animation. Suppose you want to move a panel and at the same time fade it out too. In such a case we use parallel Animation. For this, we need to just make small addition to code we wrote previously.
<Sequence AnimationTarget = "Panel1">
<EnableAction AnimationTarget = "btnAnimate" Enabled = "false"/>
<Parallel Duration = ".5" FPS = "30">
<Move Duration=".5" FPS ="30" Vertical= "200" Horizontal = "100" unit ="px"/>
<FadeOut Duration=".5" FPS = "30" ></FadeOut>
</Parallel>
</Sequence>
</OnClick>
Build and play with it.
Step 3: Modify the code to add parallel animation.
<OnClick><Sequence AnimationTarget = "Panel1">
<EnableAction AnimationTarget = "btnAnimate" Enabled = "false"/>
<Parallel Duration = ".5" FPS = "30">
<Move Duration=".5" FPS ="30" Vertical= "200" Horizontal = "100" unit ="px"/>
<FadeOut Duration=".5" FPS = "30" ></FadeOut>
</Parallel>
</Sequence>
</OnClick>
Build and play with it.
No comments:
Post a Comment