Error when i moved an object in new frame

I am practicing with my actionscript and encountered a problem… Previously, my main movieclip has only 1 frame with 2 layers. I have a dynamic textfield (myText_txt) already in the stage in frame 1.

in my actions page, i have myText_txt.text = “hello”.

Then, i decided to move all of the stuff from my frame 1 into frame 2. Suddenly, flash cant detect myText_txt anymore… Cannot access a property or method of a null object reference.

my actions page looks something like this now:

function initialize():void

function myFunction():void
myText_txt.text = “hello”


Why is this? i extended my very first layer which is my action layer all the way to layer 10… dunno if this is required though. But still doesnt work. Why can’t flash detect my myText_txt? Oh, in the new frame 1, myText_txt is not yet in the stage.