So sorry this is such a simple question but I'm rushing to meet a deadline and that plus no sleep means my brain has froze. What is the correct syntax in Flash to do the following:
Have a text box on the stage with the number 1 in it. When the playhead moves to the next frame it adds 1 to the number in that text box, checks if it is below 504 and if it is goes to the previous frame else it carries on playing forwards.
In theory it would go like
If kegnumber<504 then kegnumber = kegnumber + 1 goto previous frame else goto next frame end if
Thanks 
I can't even remember how to update text in a text field via actionscript???
Obviously, first advice is to do it in AS3, but if you're in a hurry. Haven't tested it as I haven't written AS1 in ages, but...
Instance name for textbox: "textbox"
Frame 1: var kegnumber:Number = 1; textbox.text = kegnumber;
Frame 3: If ( kegnumber < 504 ) { kegnumber++; textbox.text = kegnumber; this.gotoAndPlay( 2 ); } else { this.gotoAndPlay( 4 ); }
However, this will go so fast, you'll probably not see the text change... it'll go to 504 almost instantly... you'll probably have to add a setInterval on frame 2 or summat.
What is this for?
Cheers for that you are a star
It's just for a banner animation that someone needs ASAP and rather than animate it counting I figured I'd just script it.
I'll try it now.
Thanks again 
Like I said, I haven't tested that... there is probably a schoolboy error or two in it. 
Ahhh it's just not working. I have a text box on the stage in the root which I set to dynamic and gave the instance name textbox. And this on a frame:
textbox.text = "123";
Just to test it updates but when I test the movie the textbox is just blank? What am I stupidly doing wrong?
Can't believe it's been so long since I used code in Flash!!!
Ahhh I forgot - it's because the layer was masked!!
Sorry, you also need to put a stop before the if/else statement. Told you there would be a schoolboy error.
Send me an email to robcutforth AT gmail DOT com and I'll send you my working version.
Oh right, nevermind then. 
Hmm it's now setting it to 1 and is looping but it isn't updating the text field
Ohh email coming, thanks 
I've sent you my file. Put a stop on frame 4 as well. 
Thank you sooo much for helping me fix this Big Ern
You are a star!!
Big Ern is a lycra wearing latte sipping bitch.
Expect nothing further from him in the way of help.
But what if she needs help ordering a latte, what THEN? I'll be all over that problem like Oprah on a honey ham.