# Need help editing actions! Please help!

**URL:** <https://forum.kirupa.com/t/need-help-editing-actions-please-help/157003>\
**Category:** flash\
**Created:** [July 29, 2005, 10:47am UTC](https://forum.kirupa.com/t/need-help-editing-actions-please-help/157003 "2005-07-29T10:47:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spindrift](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@spindrift](https://forum.kirupa.com/u/spindrift)\
**Post date:** [July 29, 2005, 10:47am UTC](https://forum.kirupa.com/t/need-help-editing-actions-please-help/157003/1 "2005-07-29T10:47:18Z")

</div>

Hi there,

I have the below code on a movie clip. Inside the movie clip are 5 frames, all with a different image.

The below syntax is set up to rotate 5 images at random but I need to add another and was wondering how should I edit the code to deal with 6 images instead of 5. Here it is:

```auto

onClipEvent (load) {
    delay = 7000;
    resetTime = getTimer()+delay;
}
onClipEvent (enterFrame) {
    if (getTimer()>resetTime) {
        resetTime = getTimer()+delay;
        this.gotoAndStop(random(5)+1);
    }
}

```

I tried just changing the 5 to 6 but the movie worked but then froze on an image.

Many thanks for your time and help!

Cheers,

Mark
