PDA

View Full Version : Masking attached movieClips


hauklanglo
06-20-2005, 04:25 PM
Hi there. Did'nt find any answers to my question in any other forum, and I excpect this to be a "noob" question. Hopefylly people here are more forgiving with newbies then they used to be on PERL forums a few years back :)

I'm having trouble masking dynamically attached movieClip instances. I'we treid to mask the layer containing the actionScript that attach the movieClips, but no such luck. I guess there is something obvious I have overseen, but I have failed to find any info on this particular problem. This is my first programming project in flash, and beeing an old school programmer, there are a lot of confusing elements in flash that is unfamiliar to an old hog like me. (But I like it)

You can check out the problem I'm describing here Reverse Engineering (http://www.holte.no/hauk)

WHen you come to the levels with bombs, the explosion animations leak aoutside the game window. Not cool. (Appart from this the game is finished. And I bet you like it too).

So back to the problem then... Any hints on what to read, what commands to use or in general how to mask dynamically attached movieClips?

Any comments appreciated

Regards
Hauk Langlo

Billystyx
06-21-2005, 01:07 PM
I didn't see it (don't think I got that far - only to level 4?) but its a good game.

If its leaking outside, an easy way of dealing with that is not a mask but a layer that is positioned above the layer where the explosion occurs. If the explosion is added dynamically, then add a mask layer dynamically to a depth above the explosion. (a rectangle with an empty middle and thick edges to hide the explosion - make it the same colour as the outer background).

Does that makes sense?

billystyx

hauklanglo
06-21-2005, 11:27 PM
This sounds very plausible. I'll give it go when a get home to check the code.
Thanks!

Hauk


I didn't see it (don't think I got that far - only to level 4?) but its a good game.

If its leaking outside, an easy way of dealing with that is not a mask but a layer that is positioned above the layer where the explosion occurs. If the explosion is added dynamically, then add a mask layer dynamically to a depth above the explosion. (a rectangle with an empty middle and thick edges to hide the explosion - make it the same colour as the outer background).

Does that makes sense?

billystyx

Billystyx
06-22-2005, 10:25 AM
no worries - let me know how it goes:)