My guess: you attach a listener each of the 2 layers. On either event I'd set a flag and call a routine to perform the event. Optionally I'd call the routine on a timeOut so that the 2 events could be merged together avoiding flicker, going between the 2 quickly.
var listener1 = new EventListener(layer1); listener1.onmouseout = function(e) { flag1Out = true; checkAction(); }; listener1.onmouseover = function(e) { flag1Out = false; checkAction(); }; layer1.addEventListener(listener1); var listener2 = new EventListener(layer2); listener2.onmouseout = function(e) { flag2Over = false; checkAction(); }; listener2.onmouseover = function(e) { flag2Over = true; checkAction(); }; layer2.addEventListener(listener2); checkAction = function() { if (flag1Out && !flag2Over) { if (checkAction.currentlyDoing) return; // avoid doing action if it's already happening checkAction.currentlyDoing = true; performAction() } else { if (!checkAction.currentlyDoing) return; checkAction.currentlyDoing = false; stopAction() } } ----- Original Message ----- From: "Arijit Das" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 18, 2002 8:36 PM Subject: [Dynapi-Help] mouse out question > Hi all, > > Is there a way to attach a listener to the dyndocument so that when > you mouseout of a layer (say myLayer1), something happens to another > layer (myLayer2), but only if you're not mousing over myLayer2? > > I'm guessing I have to use the target and id properties, but I'm not > really sure how to use them. > > Sorry if this is a totally newbie question. > > Thanks, > Arijit > > PS: if anyone could even get me started with the right syntax, I'm > sure I could figure the rest out... > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Dynapi-Help mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/dynapi-help ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help