PDA

View Full Version : masks behaving badly



gamemaker
September 17th, 2007, 06:02 PM
I have encountered a perplexing problem trying to mask some dynamically loaded content.

Basically I have a MC called list_area. To list_area I add a bunch of list_items which are custom classes containing some textfields with content determined by XML. This works just fine.

But I want to mask this list and I cannot figure out how to do it for the life of me. No matter how I try
1) adding a mask on the main scene, masking the list_area MC
2) adding a mask within list_area and adding the list_items into a MC beneath it
3) using code to mask the list_area or
4) using code to mask each individual list_item
I encounter the same problem which is that nothing shows up beneath the mask. Yet if I manually write text inside list_area or add a drawing object or anything else, the mask will reveal them properly.... or if I add a sprite or textfield within the code and add them to list_area they display just fine. Anything else I add is revealed by the mask....it is only these custom classes (the list_items) I am adding that do not appear. It's infuriating.

Does anyone have any idea why the content from these custom classes does not appear beneath the mask? It's just 3 textFields (with fonts properly embedded) I arranged in a certain way, made into a movieclip, and then made accessible through code by selecting "Export for Actionscript" in the linkage window....

If you can figure this out for me without any code to work with you are a genius and my savior! Either that or I am just an idiot...

Thanks
Alex

soulwire
September 18th, 2007, 05:12 AM
Silly question I know, but have you tried without the masks at all to check that the TFs are being populated correctly?

So you say that if you set the TF type to static and add some text it works?

gamemaker
September 18th, 2007, 10:42 AM
Yes, and yes. I had not tried setting the textfields to static within the custom class but that does work... the text displays just fine beneath the mask as it should... switch them back to dynamic and they vanish... but I have traced the contents of the textfields in the dynamic state and their contents are as expected... they just don't show up on the screen.



Silly question I know, but have you tried without the masks at all to check that the TFs are being populated correctly?

So you say that if you set the TF type to static and add some text it works?

soulwire
September 18th, 2007, 11:28 AM
switch them back to dynamic and they vanish
...and yet they are embedded correctly! very strange.

Have you tried caching both text container Mc and mask as bitmaps?

My desire to be labelled as a genius is out the window > if this behaviour genuinely is out of the ordinary (i.e only doesnt display when masked) and all masking obligations are fulfilled (i.e. embedding is working) then I think the source would be useful! :)

Have to done the usual trial and error tests? Like HTML, not HTML, dynamic text but not dynamic population, etc etc?