# Actionscript movement after a time delay?

**URL:** https://forum.kirupa.com/t/actionscript-movement-after-a-time-delay/127251
**Category:** Uncategorized
**Created:** [November 1, 2004, 11:19am UTC](https://forum.kirupa.com/t/actionscript-movement-after-a-time-delay/127251 "2004-11-01T11:19:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![antnoyce](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@antnoyce](https://forum.kirupa.com/u/antnoyce)
#### Post date: [November 1, 2004, 11:19am UTC](https://forum.kirupa.com/t/actionscript-movement-after-a-time-delay/127251/1 "2004-11-01T11:19:08Z")

</div>

I am using some action script to move a group of images around the stage “onrelease” of a button, which all works really well, the code is attached to a movieclip and goes something like this:

onClipEvent (load) {  
\_x = 0;  
\_y = 0;  
div = 5;  
}  
onClipEvent (enterFrame) {  
\_x += (endX-\_x)/div;  
\_y += (endY-\_y)/div;

\_root.home.onRelease = function() {  
endX = 0;  
endY = 0;  
};  
\_root.works.onRelease = function() {  
endX = -250;  
endY = 0;  
Bla bla

Anyone know how i can achieve this movement without a button action ie: after mc loads it will move the movieclip every 5 seconds or so untill unload the movie

New to actionscript, so is there an easy way? Iam using MX

Many thanks  
Ant
