Skip to content


Flex 3 AnimateProperty - Sequencing Animation

Simple demonstration to perform a sequence of animation triggered by clicking the image below:



	
		

    
        
        
		
        
		
        
    

        

Here is the code out of the editor:

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.effects.easing.Bounce;
]]>
</mx:Script>

<mx:Sequence id="animateSmiley" >
<mx:AnimateProperty property="scaleX" fromValue="1" toValue="1.5" duration="1000" />
<mx:AnimateProperty property="scaleX" fromValue="1.5" toValue="1" duration="1000" />
<mx:AnimateProperty property="alpha" fromValue="1" toValue=".5" duration="1000" />
<mx:AnimateProperty property="alpha" fromValue=".5" toValue="1" duration="1000" />
<mx:AnimateProperty property="x" fromValue="{smiley.x}" toValue="400" duration="1000" easingFunction="Bounce.easeOut" />
<mx:AnimateProperty property="x" fromValue="400" toValue="300" duration="1000" easingFunction="Bounce.easeOut" />
</mx:Sequence>

<mx:Image id="smiley" source="@Embed(source=’assets/smiley.png’)" mouseDownEffect="{animateSmiley}"/>
</mx:Application>

Share/Save/Bookmark

Posted in Flex Web Development.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.