# Wait...then Fire ActionScript Code

**URL:** <https://forum.kirupa.com/t/wait-then-fire-actionscript-code/160816>\
**Category:** flash\
**Created:** [August 29, 2005, 7:25pm UTC](https://forum.kirupa.com/t/wait-then-fire-actionscript-code/160816 "2005-08-29T19:25:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skurge](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Skurge](https://forum.kirupa.com/u/Skurge)\
**Post date:** [August 29, 2005, 7:25pm UTC](https://forum.kirupa.com/t/wait-then-fire-actionscript-code/160816/1 "2005-08-29T19:25:03Z")

</div>

I have a site that uses a cloud moving across the sky effect (Cloud\_mc).  
I’ve used the following code to move the created MC across the screen horizontally to create this moving effect.

Code:  
onClipEvent(enterFrame) {  
speed = -.4;  
this.\_x += speed;

}

Problem is that once the MC runs out of clouds, the area where the clouds should be appears blank.

I need to be able to do either of the following two tasks:

1. Play the effect for a period of time then auto-repeat the Clouds\_mc

or

1. Play the effect and then redirect to an MC that has non-moving clouds.

Thanks for your comments and assistance!

SKURGE
