Express in Bits Blog

AS3: ScrollPane, Mask & Dynamic TextField

Posted in Actionscript 3 by xding78 on February 17, 2010

Lately I ran into an issue that really had puzzled me. Now that I finally figured out what the * had happened. I just want to write  it down so that I won’t waste any time on it later.

Here is what happened. I need to use dynamic text in the source of a ScrollPane component. So I did the usual way. Add the dynamic textField to a MovieClip called: contents. And then I initiate a ScrollPane called: sp, then:

sp.source = contents

And ctrl+Enter, to my surprise the textField does not show up!!

… several hours later …

Here is the problem: Mask!!!

Mask is used in the ScrollPane component. So, in order for dynamic text to work properly in a ScrollPane it has to bend to the rules of what Mask demands.

When used under a mask, a dynamic textField has to embed fonts.

After I embedded the font to the dynamic textfield, I can finally see the text.

So, it’s It is the Mask but not the ScrollPane that caused the problem. The ScrollPane component is perfectly fine with containing dynamic text.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: