Adding dynamic text field using code

Okay, noob here, I’m making a game which I refer to as ‘steaming pile of game’ as it is not to good, but I’ve started and I’m hellbent on finishing it!

Have a problem with score. I figure it would be simple, need a variable, need to add numbers to the variable when conditions are met, need to display the variable.

The display part is giving me fits and to put it simply, every tutorial I’ve looked at is mega lame.

  1. How do you create a dynamic textbox/field/whatever ENTIRELY out of code. Now I could just click, drag and make one, but then it would be stuck on the screen all the time, no good for startup menu, etc.

  2. How do I update the Dynamic text box, now I could use an eventListener ENTER_FRAME, but that seems a tad intensive, their must be a way to only update when new value is passed to it?

Bonus Question.
I’ve got this code that creates a whole bunch of moving objects in the background, when the level ends I want to remove them all. HOW do I remove this heaping load of objects?


public function columnMaker(){ 
            for(var i=0; i<550; i+=35){
                var testObject:Circler = new Circler();
                testObject.x = -30;
                testObject.y = i;
                addChild(testObject);
            }
        }