Bones
10-14-2007, 10:26 PM
Well, my Actionscripting isn't getting any better :confused:
I'm trying to make a conditional loop: a number is incremented everytime a loop occurs, and compared to a number loaded from an .txt file. So..
Frame 1:
var thisCount:Number = 0;
// This is the loop counter
var AllEntries:Number = TOTALNUMBER;
// TOTALNUMBER is the number loaded from the .txt file
Frame 2:
AllEntries++
// To increment AllEntries by one
Frame 3:
if (thisCount==AllEntries) {
gotoAndPlay(1);
}
// So if the number of loops is equal to the number from the file, it goes back to the start, and the number of loops is reset to 0
The trace command shows that the numbers are loading / incrementing properly, but the "if" command on Frame 3 doesn't seem to do anything. The loop number just carries on going :(
As usual, all help very gratefully recieved. Many thanks
I'm trying to make a conditional loop: a number is incremented everytime a loop occurs, and compared to a number loaded from an .txt file. So..
Frame 1:
var thisCount:Number = 0;
// This is the loop counter
var AllEntries:Number = TOTALNUMBER;
// TOTALNUMBER is the number loaded from the .txt file
Frame 2:
AllEntries++
// To increment AllEntries by one
Frame 3:
if (thisCount==AllEntries) {
gotoAndPlay(1);
}
// So if the number of loops is equal to the number from the file, it goes back to the start, and the number of loops is reset to 0
The trace command shows that the numbers are loading / incrementing properly, but the "if" command on Frame 3 doesn't seem to do anything. The loop number just carries on going :(
As usual, all help very gratefully recieved. Many thanks