gotoAndPlay issue
I am using cs4 w/as3. I have a keyframe with as3 that is supposed to decide which scene to procede with based on the time of day.
The problem arises when the code gets to the gotoAndPlay command, it doesn't process unless it's the last line in the code.
See code example below.
In this example, no matter what time of day it is, it always jumps to scene "Blue" because it's the last one.
currenttime = new Date();
hrs=currenttime.hours;
mins=currenttime.minutes;
secs=currenttime.seconds;
if (hrs==10&&mins<15) {
gotoAndPlay(1, "Black");
}
if (hrs==10&&mins<30) {
gotoAndPlay(1, "Orange");
}
if (hrs==10&&mins<45) {
gotoAndPlay(1, "Silver");
}
if (hrs==10&&mins<60) {
gotoAndPlay(1, "Pink");
}
if (hrs==11&&mins<15) {
gotoAndPlay(1, "Blue");
}
