Problems with Selection.setFocus

I am working on a Flash form with this action script in the first frame.

var holder=_root.createEmptyMovieClip("holder_mc",500);    
var myAreaVar=holder.createClassObject(mx.controls.TextArea,"myArea",1);
myAreaVar.text="fooooooo";   

Why is it that I have to place the below code in a second keyframe for it to work?

     Selection.setFocus(holder_mc.myArea);

If I place it in the starting keyframe with the rest of the script it does not work.
I can work with this but I would really like to understand why this happens and
if there is a way to get it to work in a movie where there is only one frame.