_root.createTextField('myTxt', 10, 50, 50, 100, 20); n = 0; myButton.onPress = function() { a = getTimer()+1000; _root.onEnterFrame = function() { if (a<getTimer()) { myTxt.text = n; n++; _root.onEnterFrame = null; } }; };