Skip to main content
Participant
July 22, 2011
Question

TLFTextField is cast as MovieClip when loaded by other swf

  • July 22, 2011
  • 1 reply
  • 594 views

Hi,

I am working with a custom framework. We replaced Loader with SafeLoader, and it works fine.

We need to work with TLFTextField, because the project is multilingual and one of the languages used is oriental (right-to-left), and we need to share fonts.

Things work well if all is coded, ie, var tf:TLFTextField = new TLF, addChild(tf), and so on.

But when we work with TLFTextFields from the Stage, the component works well in stand-alone, but fails when called by its parent.

I mean, if in the component code I trace :

            this._label=this._instance.getChildByName("label") as TLFTextField;
            trace("yo",this._instance.getChildByName("label"),(this._instance.getChildByName("label") as TLFTextField),this._label);

When I compile the component I get : yo [object TLFTextField] [object TLFTextField] [object TLFTextField]

but in its parent I get : yo [object MovieClip] null null

This looks a bit weird for me?

Thanks in advance for any help,

achim.

This topic has been closed for replies.

1 reply

Adobe Employee
July 22, 2011

I don't think it's a TLF issue, because all of classes you use, including TLFTextField, are not in TLF.

Pls post to http://forums.adobe.com/community/flash/flash_general