# Actionscript movement

**URL:** https://forum.kirupa.com/t/actionscript-movement/119190
**Category:** Uncategorized
**Created:** [August 12, 2004, 7:58am UTC](https://forum.kirupa.com/t/actionscript-movement/119190 "2004-08-12T07:58:38Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![stewart](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@stewart](https://forum.kirupa.com/u/stewart)
#### Post date: [August 12, 2004, 7:58am UTC](https://forum.kirupa.com/t/actionscript-movement/119190/1 "2004-08-12T07:58:38Z")

</div>

i use this script for an easing slide movement:

onClipEvent (enterFrame) {  
Xsquare = this.\_x;  
Xdiff = Xpos-Xsquare;  
Xmove = Xdiff/5;  
this.\_x = Xsquare+Xmove;  
updateAfterEvent(enterFrame);  
}

is there a quick way to make this slide linear, and not easing?

thanks!

---

<div class="post-metadata">

### Author: ![Algreco](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Algreco](https://forum.kirupa.com/u/Algreco)
#### Post date: [August 12, 2004, 8:07am UTC](https://forum.kirupa.com/t/actionscript-movement/119190/2 "2004-08-12T08:07:00Z")

</div>

yes. use flash motion tween

---

<div class="post-metadata">

### Author: ![stewart](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@stewart](https://forum.kirupa.com/u/stewart)
#### Post date: [August 12, 2004, 8:08am UTC](https://forum.kirupa.com/t/actionscript-movement/119190/3 "2004-08-12T08:08:53Z")

</div>

okay…

but without using motion tween…  
?

---

<div class="post-metadata">

### Author: ![Algreco](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Algreco](https://forum.kirupa.com/u/Algreco)
#### Post date: [August 12, 2004, 8:11am UTC](https://forum.kirupa.com/t/actionscript-movement/119190/4 "2004-08-12T08:11:32Z")

</div>

yes.  
the default is set to 0. if later on u wanna set easing the you can do it in the property panel.  
so just do the motion tween and it will be without easing

---

<div class="post-metadata">

### Author: ![stewart](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@stewart](https://forum.kirupa.com/u/stewart)
#### Post date: [August 12, 2004, 8:54am UTC](https://forum.kirupa.com/t/actionscript-movement/119190/5 "2004-08-12T08:54:24Z")

</div>

i totally understand what you mean.

but i NEED to fix this in actionscript now…

---

<div class="post-metadata">

### Author: ![Algreco](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Algreco](https://forum.kirupa.com/u/Algreco)
#### Post date: [August 12, 2004, 8:57am UTC](https://forum.kirupa.com/t/actionscript-movement/119190/6 "2004-08-12T08:57:32Z")

</div>

Just look for tutorials about it. There are SO many and it’s really not that difficult to understand

---

<div class="post-metadata">

### Author: ![stewart](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@stewart](https://forum.kirupa.com/u/stewart)
#### Post date: [August 12, 2004, 9:01am UTC](https://forum.kirupa.com/t/actionscript-movement/119190/7 "2004-08-12T09:01:37Z")

</div>

true,  
but the whole site is built, and i only need to change this movement from easing to linear.  
so…

---

<div class="post-metadata">

### Author: ![stewart](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@stewart](https://forum.kirupa.com/u/stewart)
#### Post date: [August 12, 2004, 2:14pm UTC](https://forum.kirupa.com/t/actionscript-movement/119190/8 "2004-08-12T14:14:16Z")

</div>

i think the question isn’t that clear or something.

this script is:  
onClipEvent (enterFrame) {  
Xsquare = this.\_x;  
Xdiff = Xpos-Xsquare;  
Xmove = Xdiff/5;  
this.\_x = Xsquare+Xmove;  
updateAfterEvent(enterFrame);  
}

and on button clicks the Xpos value is added…

---

<div class="post-metadata">

### Author: ![coolname](https://avatars.discourse-cdn.com/v4/letter/c/8baadc/32.png) [@coolname](https://forum.kirupa.com/u/coolname)
#### Post date: [August 12, 2004, 2:36pm UTC](https://forum.kirupa.com/t/actionscript-movement/119190/9 "2004-08-12T14:36:17Z")

</div>

onClipEvent (enterFrame) {  
this.\_x += {arbitrary number};  
updateAfterEvent(enterFrame);  
}

I don’t know if this is what you want.

---

<div class="post-metadata">

### Author: ![Algreco](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Algreco](https://forum.kirupa.com/u/Algreco)
#### Post date: [August 12, 2004, 2:41pm UTC](https://forum.kirupa.com/t/actionscript-movement/119190/10 "2004-08-12T14:41:06Z")

</div>

that’s not what he is looking for.  
Since you divide the Xdiff by 5 you actually add a decrement by 5 every frame. get rid of the “/5” and you will not have any easing.  
But this doesn’t solve your problem. Go read if you want to learn. otherwise you will always need to ask the simplest things.  
Hope it helps u
