# Movement via actionscript problem

**URL:** <https://forum.kirupa.com/t/movement-via-actionscript-problem/69421>\
**Category:** Uncategorized\
**Created:** [November 4, 2004, 9:26am UTC](https://forum.kirupa.com/t/movement-via-actionscript-problem/69421 "2004-11-04T09:26:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![buzzby365](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@buzzby365](https://forum.kirupa.com/u/buzzby365)\
**Post date:** [November 4, 2004, 9:26am UTC](https://forum.kirupa.com/t/movement-via-actionscript-problem/69421/1 "2004-11-04T09:26:13Z")

</div>

i have this code to move a clip from point **a** to point **b**. it works fine, no problems at all with the movement. the problem i am having is to stipulate what point a is. the code lets me predefine what point **b** will be. i can state what the **x** and **y** coords will be for that but i cannot say what the point **a**  **x** and **y** coords wil be

a step by step to movement is below:

add code to the movieclip

onClipEvent(load)  
frict = .2  
ratio = .1  
turnSp = xSp = ySp = xScSp = yScSp = 0  
turnEnd = \_parent.turnEnd  
xEnd = \_parent.xEnd  
yEnd = \_parent.yEnd  
xscaleEnd = \_parent.xscaleEnd  
yscaleEnd = \_parent.yscaleEnd

onClipEvent(enterFrame)  
turnSp = turnSp\*frict+(turnEnd-\_rotation)_ratio  
xSp = xSp_frict+(xEnd-\_x)_ratio  
ySp = ySp_frict+(yEnd-\_y)_ratio  
xScSp = xScSp_frict+(xscaleEnd-\_xscale)_ratio  
yScSp = yScSp_frict+(yscaleEnd-\_yscale)\*ratio  
this.\_x += xSp  
this.\_y += ySp  
this.\_rotation += turnSp  
this.\_xscale += xScSp  
this.\_yscale += yScSp

now set the parameters for the tween on the main timeline  
( on a frame or button action )

xEnd=475  
yEnd=300  
turnEnd=180  
xscaleEnd = 120  
yscaleEnd = 200

see the problem?

i dont. would love a little help on this please!
