setTextFormat Problem

I am having a weird problem with setTextFormat, hope somebody could help, I am using the same code in two different places in my project, it works fine in one place and does not work fine in the other. Not sure if this is a scope problem.

This section works fine, it is placed right onto the main timetimline, not called from within any object or anything:

_root.my_fmt = new TextFormat();
_root.my_fmt.font = "my font";


this.createTextField("my2_txt",this.getNextHighestDepth(),10,10,160,120);

this.my2_txt.text = "Hello world";
this.my2_txt.embedFonts = true;
this.my2_txt.selectable = false;
this.my2_txt.setTextFormat(_root.my_fmt);
new Tween(this.my2_txt, "_x", Strong.easeOut, 0, 100, 2, true);

This other code is something that I’m calling from within a event listener of a MovieClipLoader and it just does not work.


		
				_root.my_fmt = new TextFormat();
		_root.my_fmt.font = "my font";
		target.createTextField("my_txt",target.getNextHighestDepth,0,0,200,20);
		target.my_txt.text = "myTitle";
		target.my_txt.embedFonts = true;
		target.my_txt.setTextFormat(_root.my_fmt);

I can see my text fine if I do not embed the fonts. Can’t really get what the problem is.