# Multiple images breaking my swf

**URL:** <https://forum.kirupa.com/t/multiple-images-breaking-my-swf/284818>\
**Category:** flash\
**Created:** [March 24, 2009, 2:00am UTC](https://forum.kirupa.com/t/multiple-images-breaking-my-swf/284818 "2009-03-24T02:00:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imjess](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@imjess](https://forum.kirupa.com/u/imjess)\
**Post date:** [March 24, 2009, 2:00am UTC](https://forum.kirupa.com/t/multiple-images-breaking-my-swf/284818/1 "2009-03-24T02:00:48Z")

</div>

what its meant to do:  
A casestudy, has a section for each client, showing a selection of work for each one. It starts at a random client/section each time it is loaded, and there is also a menu that allows you to go to a specific client/section if you want.

So what i’ve done is made a randomly generated var at frame 1, and then told it to gotoAndPlay different sections of my timeline

```auto
 var myVar = Math.floor(Math.random() * 6) + 1; 

if (myVar == 1) {
    gotoAndPlay(5);
} else if (myVar == 2) {
    gotoAndPlay(50);
} else if (myVar == 3) {
    gotoAndPlay(150);
} else if (myVar == 4) {
    gotoAndPlay(200);
} else if (myVar == 5) {
    gotoAndPlay(250);
} else if (myVar == 6) {
    gotoAndPlay(300);
} else {
    gotoAndPlay(350);
}

stop();

```

This is working fine, as is the menu. However, as soon as I add a new layer with 2 or more images, in any of the sections it stops working.

Stranger still, it seems to be if i use more than one of the same image type it wont work  
ie, 1 jpg, 1 gif, 1 png it still works, but if i have 2 jpgs or 2 gifs it will break.

I also tried making a movie clip to hold my images, but the same thing happens

I really hope that made some sense to someone…
