# Actionscript movement

**URL:** <https://forum.kirupa.com/t/actionscript-movement/61414>\
**Category:** Uncategorized\
**Created:** [August 18, 2004, 12:40pm UTC](https://forum.kirupa.com/t/actionscript-movement/61414 "2004-08-18T12:40:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amjad](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@amjad](https://forum.kirupa.com/u/amjad)\
**Post date:** [August 18, 2004, 12:40pm UTC](https://forum.kirupa.com/t/actionscript-movement/61414/1 "2004-08-18T12:40:53Z")

</div>

hi all

i’ve been out of touch with this site from last 6 months.  
so now i want to start again learn more on actionscrip

I’ve made the following animation by using flash motion twin  
But now I want to know how I can create this animation or  
similar animations by using Actionscript.  
Can any one plz help me out of this. :h: :sigh:

you can view my these two files by clicking the following links:  
[http://www.intersoft-group.com/tm/fm/formail.html](http://www.intersoft-group.com/tm/fm/formail.html)  
[http://www.intersoft-group.com/tm/fm/formail2.html](http://www.intersoft-group.com/tm/fm/formail2.html)

thanks  
amjad 😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 18, 2004, 1:11pm UTC](https://forum.kirupa.com/t/actionscript-movement/61414/2 "2004-08-18T13:11:47Z")

</div>

Hi Amjad,

you could use a method called easing to move your shapes, its more smoother and doesn’t increase file size by much.

1. Create a shape on stage, convert it to a movie clip symbol.

2. Go back to the main stage and give your shape an instance name of shape.

3. Now on the timeline where your box is, add the following code on the frame,

MovieClip.prototype.easeX = function(to){  
this.onEnterFrame = function(){  
this.\_x = to-(to-this.\_x)/1.1;  
if(this.\_x \> to-1 && this.\_x \< to+1){  
this.\_x = to;  
delete this.onEnterFrame

}  
}  
}  
shape.easeX(550); //this is the x value to which your shape moves to,

Now if you want to move the shape up and down, change all the x’s to Y’s.

Keep experimenting with it.

hope this helps.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 19, 2004, 5:34am UTC](https://forum.kirupa.com/t/actionscript-movement/61414/3 "2004-08-19T05:34:48Z")

</div>

hi bigbadmilkman

this really helps me, thanks  
hope you’ll always help me

if there are any more examples you peoples have  
kindly gimme these examples.

thanks you all  
amjad
