-
Hello
Can anyone help - I have a movie which loads a variable in from a TXT file (&intro=y)
loadVariablesNum ("intro.txt", 0);
which is loading fine as i can get the value back using dynamic text - however I want to write a script that says if intro = y then go to frame 3 else if intro = no goto frame 200 this is the script i have written but nothing seems to happen
if (intro = "n") {
gotoAndPlay (200);
} else if (intro = "y") {
gotoAndPlay (3);
}
I have not really used actionscipt before so any help is much appreciated
-
Try this (use == to test equality):
if (intro == "n") {
gotoAndPlay (200);
} else if (intro == "y") {
gotoAndPlay (3);
}
-
Thanks - I've tried that but still no change any more ideas?
-
How about eq
if (intro eq "n") {
gotoAndPlay (200);
} else if (intro eq "y") {
gotoAndPlay (3);
}
Try setting intro to a value at the start.
Are you posting any variables to it?
I have found that some versions of IE 5.5 mainly can't handle this function correctly, don't know why
If anyone can help with that problem I would apreciate it.
-
Thanks Paul - Yes when I enter a value for intro at the start it works - however I worked round it a different way in the end - as the movie is part of an authorware project - I got the Authorware movie to send the variable to the flash object using the flash asset xtra - bit long winded - but saves having to use a text file - would also work if using Director.
Thanks again for your attention
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
|