-
The Mayberry Flasher
I am making a calendar. I am drawing a LOT of variables from a text file. one of those variables happens to be 1x1t
the trouble is, my if statement is not working. I have the variable 1x1t set equal to 1 in my text file. my if statement looks like this:
if (1 == "1x1t") {
tellTarget ("_root.1x1") {
gotoAndStop (2);
}
}
I made sure I had my instance named and everything, so that isn't the problem. Yet still, the targeted movie clip does not go to frame 2.
if anyone could tell me why the if loop isn't working, that would be GREAT! especially since I have to have it done in less than 10 hours.
-
Check your structure
For a start, instance names cannot begin with a number, and variable names cannot begin with a number
Also - in your if conditional you put quote marks around your variable name, so it is now a string literal - eg actionscript is taking the literal interpretation of 1x1t - so does 1 exactly equal 1x1t? No. Just take the quote marks off it and rename your movie instance and variable name and it will work.
If you're using Flash 5 get rid of the old syntax style and use
if( 1 == variablename) {
_root.instancename. gotoAndStop(2);
}
instead.
// if (1 == "1x1t") {
// tellTarget ("_root.1x1") {
// gotoAndStop (2);
// }
// }
[Edited by juztyn on 06-26-2002 at 03:40 AM]
-
The Mayberry Flasher
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|