views:

875

answers:

2

I'm trying to use setMask to create 3 "windows" of masked movieClips in AS2 (CS3).

The main window is masked fine.

After clicking a button, I'm creating two additional windows, but the refuse to be masked No error, it's just that the mask is not applied, and the mask rectangle is still visible.

All 3 windows are masked using the same function, with different MC parameter.

I have nested MCs, but basically, the main window is masked as:

_level0.GUI.OBJ.mainWinMC.mainWindowMC.mainWindow.setMask(_level0.GUI.OBJ.mainWinMC.mainWindowMC.mainWindow_PlanMask);

where mainWindow_PlanMask contains an MC with a red rectangle. (Note: I'm using MovieClip variables and I posted here their movieclip traced path. This works fine.

After pressing a button, I'm setting two more masks:

_level0.GUI.OBJ.mainWinMC.side0MC.side0.setMask(_level0.GUI.OBJ.mainWinMC.side0MC.side0_PlanMask);

_level0.GUI.OBJ.mainWinMC.side1MC.side1.setMask(_level0.GUI.OBJ.mainWinMC.side1MC.side1_PlanMask);

side0_PlanMask and side1_PlanMask contain rectangles too. But in these cases, the red rectangle is kept visible and the mask is not applied. I have no idea why. Any help will be appreciated.

[Edit] applying cacheAsBitmap all MCs from both mask and masked MCs to the _root caused the first mask operation not to work as well.

+1  A: 

Masks in Flash can be unpredictable. Try setting cacheAsBitmap to true for everything.

UPDATE:

Try setting cacheAsBitmap to true for each movieclip going down from the _root. Try Embedding all fonts on any textfields that are inside the movieclip you are masking - infact make sure you have embedded all your fonts everywhere.

Iain
I've set cacheAsBitmap to true on the MC and the mask MC, before the setMask and after the setMask.Didn't work.It was a good idea, though. I'm looking for such insights since I already tried so many changes... Thanks.
Eliram
A: 

it's hard to help you debug with the provided information

you can try:

  1. make sure you have correctly named the movieclips with an incorrect instance names (sometimes you will find that you forgot to name some of the movieclips)

  2. open a new fla and make a much more simple version of the things that you want to do, so that you can isolate the errors.

btw, not really necessary, but try using _root instead of _level0, it will be clearer.

Unreality
I'm not using _level0 nor _root. I'm using MovieClip variables, I just posted their paths here (as displayed by a trace command).1. All the MCs are created dynamically in AS, so I can't really forget to name any.2. The first example IS working, and I'm using the same function.
Eliram