# Parabolic motion between two points

**URL:** <https://forum.kirupa.com/t/parabolic-motion-between-two-points/263296>\
**Category:** Uncategorized\
**Created:** [June 14, 2008, 4:18am UTC](https://forum.kirupa.com/t/parabolic-motion-between-two-points/263296 "2008-06-14T04:18:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nebula\_228](https://avatars.discourse-cdn.com/v4/letter/n/e99b99/32.png) [@nebula\_228](https://forum.kirupa.com/u/nebula_228)\
**Post date:** [June 14, 2008, 4:18am UTC](https://forum.kirupa.com/t/parabolic-motion-between-two-points/263296/1 "2008-06-14T04:18:49Z")

</div>

hi Everyone,

I have a requirement in my flash which i am unable to solve.I have two points and i want to give a parabolic movement to a movieclip when the movieclip moves from one point to another point.I have to do this using actionscript.

I have tried out many things but no success.

Can anybody provide me with a simple example

Thanks in advance  
With Regards  
Deepthi

---

<div class="post-metadata">

**Author:** ![snickelfritz](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@snickelfritz](https://forum.kirupa.com/u/snickelfritz)\
**Post date:** [June 14, 2008, 5:01am UTC](https://forum.kirupa.com/t/parabolic-motion-between-two-points/263296/2 "2008-06-14T05:01:16Z")

</div>

Is this close to what you’re looking for?  
[[COLOR=“Blue”]http://www.byrographics.com/AS3/parabolic/parabolic.html[/COLOR]](http://www.byrographics.com/AS3/parabolic/parabolic.html)

The blue dot is math authored by TheCanadian in a similar post.  
The orange dot is a simple TweenMax bezier tween.

```auto
stop();
import gs.TweenMax;
import fl.motion.easing.*;
import flash.events.Event;

//Snick: parabolic-orange dot
function forward():void {
	TweenMax.to(mc, 1.2, {x:550, y:0, bezierThrough:[{x:275, y:200}], onComplete:backward, ease:Quadratic.easeInOut});
}

function backward():void {
	TweenMax.to(mc, 1.2, {x:0, y:0, bezierThrough:[{x:275, y:200}], onComplete:forward, ease:Quadratic.easeInOut});
}

forward();

//TheCanadian: parabolic-blue dot
mc2.x = 0;
function move(evt:Event):void {
//parabola with zeros at 0 and 550 and stretching to 200
//negative because Flash's y axis is reversed
mc2.y = -0.002644 * Math.pow(((mc2.x += 3) - 275), 2) + 200;
}
mc2.addEventListener(Event.ENTER_FRAME, move);

```
