Difference between revisions of "Tweener"

From Wikicliki
Jump to: navigation, search
Line 4: Line 4:
 
*[http://www.zedia.net/2007/actionscript-3-tweener-basic-tutorial/ Tweener AS3 Tutorial]
 
*[http://www.zedia.net/2007/actionscript-3-tweener-basic-tutorial/ Tweener AS3 Tutorial]
 
*[http://tweener.googlecode.com/svn/trunk/examples/ Examples (along with source fla)]
 
*[http://tweener.googlecode.com/svn/trunk/examples/ Examples (along with source fla)]
 +
 +
== My sample implemenation ==
 +
 +
<pre>import caurina.transitions.Tweener;
 +
 +
 +
 +
invest_mc.onRollOver = function () {
 +
invest_mc.gotoAndPlay("open");
 +
Tweener.addTween(save_mc, {_x:168.5, time:0.3, transition:"easeInOutExpo"});
 +
Tweener.addTween(protect_mc, {_x:58.5, time:0.3, transition:"easeInOutExpo"});
 +
};
 +
 +
 +
invest_mc.onRollOut = function () {
 +
invest_mc.gotoAndPlay("close");
 +
Tweener.addTween(save_mc, {_x:376.4, time:0.3, transition:"easeInOutExpo"});
 +
Tweener.addTween(protect_mc, {_x:266.5, time:0.3, transition:"easeInOutExpo"});
 +
}
 +
 +
 +
</pre>

Revision as of 07:09, 18 May 2009

Tweener is an actionscript class library which lets you make all sorts of amazing easing in and out animation effects.

My sample implemenation

import caurina.transitions.Tweener;



invest_mc.onRollOver = function () {
invest_mc.gotoAndPlay("open");
Tweener.addTween(save_mc, {_x:168.5, time:0.3, transition:"easeInOutExpo"});	
Tweener.addTween(protect_mc, {_x:58.5, time:0.3, transition:"easeInOutExpo"});	
};


invest_mc.onRollOut = function () {
	invest_mc.gotoAndPlay("close");
	Tweener.addTween(save_mc, {_x:376.4, time:0.3, transition:"easeInOutExpo"});	
	Tweener.addTween(protect_mc, {_x:266.5, time:0.3, transition:"easeInOutExpo"});	
}