i don’t know if you can help me… I am having a problem getting an if and else if statement to work.
if (sched = 05-23-03) {
gotoAndPlay(40);
}
else if (sched = 05-26-03) {
gotoAndPlay(41);
}
when you click a button in another movie clip, i set the variable on the button… it then goes to the above clip and plays through to frame 20… on frame 20 i have the above code… when i test this no matter which of the 2 buttons i click it always goes to frame 40… when i click that 2nd button it won’t go to frame 41.
why do some people still use the old flash 4 style for actionscripting: set (blah1, blah2) instead of blah1 = blah2; ???
jeez people, get with the times :P, but hey don’t change because of me, do whatever floats your boat.
you need to set sched in matchDetails or use _root.sched == in the comparison. When you use just sched in matachDetails it looks for the varaible defined inside the matachDetails timeline called “sched” That varaible, however, you set in the button in _root so it doesnt exist in matachDetails (but, rather _root). So when matchDetails looks for it, it cant find it. Putting _root. before sched will force matchDetails to look in _root for sched and use the actual value you set for it there.