are the fl.motion.easing functions just as efficient as manually easing as object such as
var vx:Number = (targetX-ball.x) * easing
ball.x += vx
AS3 tutorial books never mention the fl.motion.easing functions, why is this
are the fl.motion.easing functions just as efficient as manually easing as object such as
var vx:Number = (targetX-ball.x) * easing
ball.x += vx
AS3 tutorial books never mention the fl.motion.easing functions, why is this
The math for easing is the same no matter what. I would say that they are less efficient because of the extra overhead associated with classes but the nice thing about them is that they make it easy to do advanced easing (Bounce, Elastic, etc) without getting into the math your self and they give you a lot of control over managing the tweens by using functions such as pause, play, and the rest.
http://kind-armadillo.pochta.ru/FlaAC3/tweenDemo.swf
http://kind-armadillo.pochta.ru/FlaAC3/tweenDemo.rar
change code of the first frame
//first frame code Tween demo
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
import fl.motion.*
var ball=sla1_mc;
var targetX:int=sla2_mc.x;
//vx:Number = (targetX-ball.x) * easing
//ball.x += vx
var tween_sla2=new Tween(ball,"x",Regular.easeIn,ball.x,targetX,5,true);//5-speed
tween_sla2.looping = true;
The Question unless will obstruct? Works this or no?
ok thanks
:: Copyright KIRUPA 2024 //--