I have nearly completed the basics of AS3 and was just fiddling with the script and got struck. here is the problem.
I have 30 frame and two layers flashCS6 file . in layer I have a dynamic text field- ' info_txt;'
In layer 2 on frame 1 - var count:Number = 1;
frame 2 info_txt.text = String(count);
frame 14 count++;
when I test this movie the text field displays 1 and there is no increment when the playhead loops again.
now if I add another script after fame 14 which is
say on frame 15 -
if(count > 4) {
gotoAndStop("home");
} else {
gotoAndPlay("loop");
}
the script works perfectly well after i add the conditionals at frame 15( there is increment of the numbers in text field.
there are no errors reported in the output and the file keeps playing in both the cases and I also have the labels 'loop' in frame 2 and 'home' in frame 30.
why there has to be a conditional statement after 'count++' for the text field to increment every time the play head moves through frame 14?
Am I missing some rule in the AS3?
and if, after adding the conditional script in the frame after the 'count++' , I move the label 'loop' from frame 2 to frame 1 even then there is no increment of number in the text frame when i test the movie.
