# Fl.motion.easing

**URL:** <https://forum.kirupa.com/t/fl-motion-easing/260156>\
**Category:** Uncategorized\
**Created:** [May 13, 2008, 1:03am UTC](https://forum.kirupa.com/t/fl-motion-easing/260156 "2008-05-13T01:03:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RebuiltJorge](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RebuiltJorge](https://forum.kirupa.com/u/RebuiltJorge)\
**Post date:** [May 13, 2008, 1:03am UTC](https://forum.kirupa.com/t/fl-motion-easing/260156/1 "2008-05-13T01:03:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [May 13, 2008, 1:45am UTC](https://forum.kirupa.com/t/fl-motion-easing/260156/2 "2008-05-13T01:45:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alex\_Lexcuk](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@Alex\_Lexcuk](https://forum.kirupa.com/u/Alex_Lexcuk)\
**Post date:** [May 13, 2008, 5:24am UTC](https://forum.kirupa.com/t/fl-motion-easing/260156/3 "2008-05-13T05:24:59Z")

</div>

[http://kind-armadillo.pochta.ru/FlaAC3/tweenDemo.swf](http://kind-armadillo.pochta.ru/FlaAC3/tweenDemo.swf)  
[http://kind-armadillo.pochta.ru/FlaAC3/tweenDemo.rar](http://kind-armadillo.pochta.ru/FlaAC3/tweenDemo.rar)  
change code of the first frame

```auto

//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?

---

<div class="post-metadata">

**Author:** ![RebuiltJorge](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RebuiltJorge](https://forum.kirupa.com/u/RebuiltJorge)\
**Post date:** [May 13, 2008, 9:18am UTC](https://forum.kirupa.com/t/fl-motion-easing/260156/4 "2008-05-13T09:18:50Z")

</div>

ok thanks
