Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
mask/depth problem

mask/depth problem

2004-03-09       - By Adrian McTaggart

 Back
Reply:     1     2     3     4     5  

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.