# Variable Passing

**URL:** <https://forum.kirupa.com/t/variable-passing/124218>\
**Category:** Uncategorized\
**Created:** [October 1, 2004, 1:17am UTC](https://forum.kirupa.com/t/variable-passing/124218 "2004-10-01T01:17:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreeft](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dreeft](https://forum.kirupa.com/u/dreeft)\
**Post date:** [October 1, 2004, 1:17am UTC](https://forum.kirupa.com/t/variable-passing/124218/1 "2004-10-01T01:17:27Z")

</div>

Hey,

I have used the kirupa tutorial for passing variables to a flash file, which in theory all makes sense, however my code only appears to partially work… this if from frame 1 of the movie:

if (movie=="" or movie==1) {  
\_root.section = “image1.swf”;  
}if (movie==2) {  
\_root.section = “image2.swf”;  
}if (movie==3) {  
\_root.section = “image3.swf”;  
}else {  
\_root.section = “intro2.swf”;  
}

It’ll load image3.swf if i use myfile.swf?movie=3 but any other variables will result in the else running (even no value). Any idea what is going on here?

Cheers,  
dft.
