Skip to main content
Participant
Mar 15, 2009 7:53 AM UTC
Answered

Textline respecting maks

Hi,

I'm playing around with the TLF, and I'm noticed a small bug. Some of my textLines aren't respecting the mask I use on them. I see this when calling TextBlock::createTextLine( null, XXX, 0.0, true ), where XXX is a small value, smaller than the textLine I'm creating. After creating the textLine, I apply the mask (which has been added to a display container) and add it to the displayContainer. The textLine doesn't respect the mask. When this happens the TextBlock::TextLineCreationResult = 'emergency'.

If I make a text line that fits the width that I specify in CreateTextLine(), everything works. It's only when I make the line too long that the mask doesn't work.

Any work arounds? If not can this be logged?

Thanks
Rob
This topic is closed to new replies. Start a new post to keep the conversation going.
rdermerCorrect answer
Inspiring
Mar 17, 2009 5:09 PM UTC
That's expected behavior.

From the docs of the DisplayObject.mask property:

Note: A single mask object cannot be used to mask more than one calling display object. When the mask is assigned to a second display object, it is removed as the mask of the first object, and that object's mask property becomes null.

5 replies

mrrolfAuthor
Participant
Mar 18, 2009 5:34 AM UTC
I guess I should RTFM a bit better. Thanks :)
Translate
rdermerCorrect answer
Inspiring
Mar 17, 2009 5:09 PM UTC
That's expected behavior.

From the docs of the DisplayObject.mask property:

Note: A single mask object cannot be used to mask more than one calling display object. When the mask is assigned to a second display object, it is removed as the mask of the first object, and that object's mask property becomes null.
Translate
mrrolfAuthor
Participant
Mar 17, 2009 9:15 AM UTC
I poked around a little bit more. If I create a new mask for each TextLine the TextBlock creates, it works.

If all lines share the same mask, it looks like the last line added is the only one to respect the mask.
Translate
mrrolfAuthor
Participant
Mar 17, 2009 6:00 AM UTC
Thank Robin

Let me know if I can provide anymore information that will help.

Rob
Translate
Adobe Employee
Mar 17, 2009 5:12 AM UTC
I have forwarded this question on to the Player team, and will let you know when I've heard back from them.

Thanks!

- robin
Translate