# loadMovie + variable problemo

**URL:** https://forum.kirupa.com/t/loadmovie-variable-problemo/166882
**Category:** flash
**Created:** [October 23, 2005, 5:33pm UTC](https://forum.kirupa.com/t/loadmovie-variable-problemo/166882 "2005-10-23T17:33:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kingofnukes](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kingofnukes](https://forum.kirupa.com/u/kingofnukes)
#### Post date: [October 23, 2005, 5:33pm UTC](https://forum.kirupa.com/t/loadmovie-variable-problemo/166882/1 "2005-10-23T17:33:17Z")

</div>

Hi. I’m having trouble using variables to determine which movie my script is to load on a site I’m coding. Can someone take a look at this and tell me what’s wrong? I’ve check my variable determining buttons already so I know that’s not the problem.

```auto
//telling timeline to stop//
////
stop();
////
//telling the MC to go to a certain frame based on the selected movie//
if (_global.swf=1, 2, 3, 4, 5, 8) {
 gotoAndStop(1);
} else {
 gotoAndStop(2);
}
////
//telling which movie to load and in what section based on the swf variable//
//Grouping 1 : 550x400//
if (_global.swf=1) { 
 load1.loadMovie("[http://lightning-1.com/11waystodie.swf](http://lightning-1.com/11waystodie.swf)");
 gotoAndStop(1);
}
if (_global.swf=2) { 
 load1.loadMovie("[http://lightning-1.com/Agent16.swf](http://lightning-1.com/Agent16.swf)");
 gotoAndStop(1);
}
if (_global.swf=3) { 
 load1.loadMovie("[http://lightning-1.com/GirDance.swf](http://lightning-1.com/GirDance.swf)");
 gotoAndStop(1);
}
if (_global.swf=4) { 
 load1.loadMovie("[http://lightning-1.com/S](http://lightning-1.com/S) vs 2.swf");
 gotoAndStop(1);
}
if (_global.swf=5) {
 load1.loadMovie("[http://lightning-1.com/SEGA](http://lightning-1.com/SEGA) FIGHT.swf");
 gotoAndStop(1); 
}
if (_global.swf=8) { 
 load1.loadMovie("[http://lightning-1.com/space.swf](http://lightning-1.com/space.swf)");
 gotoAndStop(1);
}
//Grouping 2 : 445x275 //	
if (_global.swf=6) {
 load2.loadMovie("[http://lightning-1.com/stpat'sday.swf](http://lightning-1.com/stpat'sday.swf)");
 gotoAndStop(2);
}
if (_global.swf=7) {
 load2.loadMovie("[http://lightning-1.com/v](http://lightning-1.com/v) day.swf");
 gotoAndStop(2);
}

```
