So I am making a little game. Numbers count up and when they reach another number i want then to change the frame. E.G. the numbers start counting and when they reach say 10 it will change to frame 20. BTW this is in action-script 3
how to use the text box to change a frame in AS3
89 Views Asked by Kiwi Rambo At
2
In your document class, create a setter function that will go to the frame when a certain condition is met.
Now simply use
counteras if it was a real variable:Just to be clear: you should not have the counter variable in the text field only. The Textfield is just a way to display it. You should always have a real number variable, because the
TextFieldis made forStrings, not numbers. If you want to display the counter variable in aTextField, do this in the set function as well: