# Jack to motion guide tween not working

**URL:** <https://forum.kirupa.com/t/jack-to-motion-guide-tween-not-working/295040>\
**Category:** flash\
**Created:** [August 24, 2009, 5:19pm UTC](https://forum.kirupa.com/t/jack-to-motion-guide-tween-not-working/295040 "2009-08-24T17:19:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ash\_at\_risk](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@ash\_at\_risk](https://forum.kirupa.com/u/ash_at_risk)\
**Post date:** [August 24, 2009, 5:19pm UTC](https://forum.kirupa.com/t/jack-to-motion-guide-tween-not-working/295040/1 "2009-08-24T17:19:25Z")

</div>

As far as i know ,one cant create the motion guide tween in As3 .what i am trying to accomplish is perform tween along a curve sort of path, but in place of curve i have placed several waypoints(which is a movieclip)onto curve and push the value of x and y coordinates inside an array “way”, the coordinates of all the waypoints can be accessed, & works as “begin” parameter and “end” parameter as consecutive next waypoint.  
but the method is not working.  
My head is spinning ,as it is beyond my mind that what could have go wrong.

public function calculate()  
{  
for (var a:int=0;a\<gamesprite.numChildren;a++)  
{  
var movieClip=gamesprite.getChildAt(a);  
if (movieClip is WayPoint)  
{  
movieClip.visible=false;  
way.push(new Point(movieClip.x,movieClip.y));  
}  
}  
}

public function moveEnemy()  
{  
for (var b:int=0;b\< way.length;b++)  
{  
if (b\<=way.length-2)  
{trace(“way[” +b+ “]=” +way\*\*.x +",y="+way\*\*.y);  
//uptill here it is working correctly  
// the tweens are not working  
ex1 =new Tween(gamesprite.enemy ,“x”,None.easeNone,way\*\*.x,way[b+1].x,1,true);  
ex2=new Tween(gamesprite.enemy,“y”,None.easeNone,way\*\*.y,way[b+1].y,1,true);  
}  
else if (b\>way.length-2)  
{  
gamesprite.enemy.stop();  
}  
}

Please help me out…
