Now, I am an Adobe Certified Expert in Flex 3 and AIR.
I am professionally qualified to build RIA-based Flex/AIR applications for the Web/Desktop. Thanks Adobe for certifying me.
Do you know that you can create cool and realistic effects using the open source Flex SDK? Here is the one that I created to simulate a heart beat with minimal MXML and ActionScript.
A little bit of elasticity and rotation along with the correct timing will bring the heart to life! Here is the code:
<mx:Script>
<![CDATA[
import mx.effects.easing.*;
private var beatSync:Boolean = true;
private function beatHeart():void {
beatEffect.end();
rotateEffect.end();
//Init the beat effect
beatEffect.xFrom = heart.x;
beatEffect.yFrom = heart.y;
if(beatSync){
//beat it
beatEffect.xTo=beatEffect.xBy=heart.x+1;
beatSync = false;
}
else{
beatEffect.xTo=beatEffect.xBy=heart.x-1;
beatSync = true;
}
beatEffect.play();
rotateEffect.play();
}
]]>
</mx:Script>
<mx:Move id="beatEffect" duration="600" target="{heart}"
easingFunction="Elastic.easeOut" repeatCount="0"/>
<mx:Rotate id="rotateEffect" target="{heart}" duration="700"
angleTo="1" repeatCount="0"/>
Isn't Flex too easy to learn? Get the open source Adobe Flex SDK today!