  | |  | mask/depth problem | mask/depth problem 2004-03-09 - By Adrian McTaggart
Back I have the following code attached to an mc that duplicates another mc:
-- ---- ---- ---- ---- ---- ----- onClipEvent(load) { var i = 1; }
onClipEvent(enterFrame) { //_root.card_mc.cardMask_mc.swapDepths(1000); var makeBubbles = (random(26)==2) ? 1:0; if (makeBubbles) { _parent.bubble_mc.duplicateMovieClip("bubble"+i, i); var bubbleX = Math.floor(Math.random() * (250)); var bubbleY = Math.floor(Math.random() * (450 - 350)) + 350; setProperty ("_parent.bubble"+i, _x, bubbleX); setProperty ("_parent.bubble"+i, _y, bubbleY); i++; } } -- ---- ---- ---- ---- ---- -----
The duplicated mc's are animated. I probably don't need to show you the code that is doing that; all works fine. The problem is that the mc's are masked and while the mask works for the other layers below, it doesn't work for the duplicated mc's.
I thought it might be to do with depths and so converted the mask to an mc and swapped it's depth to 1000 (see commented line in above code). This didn't work .
Any suggestions on what is causing this problem?
TIA,
Adrian
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106410 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |