Little help with Dynamic Text, please

Hi all!!

I got a very simple question. I have a Dynamic Text in the stage which I can access from the Timeline without problems but when I try to do the same from a function, also in the Timeline, I got an error. I tried using something like stage.texName.text but it did not work
The function is called when arrow up is pressed

function ArrowUp(event:KeyboardEvent) {
myText.text = "I love AS3";
}

I guess AS3 is not for my. Even small things are painful.

Thanks in advance