# \[Ask\] Movement script: explanation

**URL:** https://forum.kirupa.com/t/ask-movement-script-explanation/323341
**Category:** flash
**Created:** [June 26, 2011, 5:22pm UTC](https://forum.kirupa.com/t/ask-movement-script-explanation/323341 "2011-06-26T17:22:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nasi1215](https://avatars.discourse-cdn.com/v4/letter/n/f4b2a3/32.png) [@nasi1215](https://forum.kirupa.com/u/nasi1215)
#### Post date: [June 26, 2011, 5:22pm UTC](https://forum.kirupa.com/t/ask-movement-script-explanation/323341/1 "2011-06-26T17:22:14Z")

</div>

I’m newbie in Flash and action script,just start learning T\_\_T…

onClipEvent (load) {  
speed=10;  
}  
onClipEvent (enterFrame) {  
if (key.isDown(key.RIGHT)) {  
\_x+=speed;  
} else if (key.isDown(key.LEFT)) {  
\_x-=speed;  
}  
if (key.isDown(key.UP)) {  
\_y-=speed;  
} else if (key.isDown(key.DOWN)) {  
\_y+=speed;  
}  
}

anyone can explain the script above to me?is that making the object moving to left and right???  
THANKS a LOT!!!
