The code for the first frame of the document I am trying to pass the variable to, is as follows:
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 = “image3.swf”;
}
However, when the movie is run, the code will always go to the else, no matter what the parameter specified in the URL is. I can only assume this has something to do with the fact that it is looping on the first frame.
if (movie==“” or movie==1) {
_root.section = “image1.swf”;
}else if (movie==2) {
_root.section = “image2.swf”;
}else if (movie==3) {
_root.section = “image3.swf”;
} else {
_root.section = “image3.swf”;
}
try else if…i know this is not the smartest answer…
but u have to debug what value is their in variable movie. By looking at ur code it seems u might have written the script inside MC. If my guess is right
then check varible movie. Is it declared on stage or in MC.
I tried it with the else if’s, didn’t make any difference.
The script is inside the first frame of the scene (the stage). The variable movie is not returning anything, as far as I can see. I tried outputting the variable to a text box, and it gave me nothing.
I’m getting “undefined” from the trace, inside flash. But that’ll be because it’s not passing anything to it when it runs. Can I add command line arguments inside flash? (It’s also not giving me the option of running as HTML, which I thought was weird).