Thx John,

But if parent clips handlers always preempts child's one, I don't understand how can bubbling dispatching be implemented. I maybe missed something but I understood that bubbling mechanism was starting from subs subs...subs..clips and move up the parental chain... In my case of course I'd like my sub-clip to catch event and then dispatch it to all its parents..(my small sample is 2 level deep but my app is in fact deeper...)

Any idea ?

Eric


At 2006-03-03   15:25, you wrote:
since you have an onRelease in the main MovieClip no events will get called from the subclips. also shouldnt the following line of code be reffering to the 'A_mc' instance and not the myA instance.

var myA:A=new A();
myA.init();

should be:
var A_mc:A=new A();
A_mc.init();



From: elr <[EMAIL PROTECTED]>
Reply-To: Flashcoders mailing list <[email protected]>
To: [email protected]
Subject: [Flashcoders] detect events on an embedded clip
Date: Fri, 03 Mar 2006 15:15:44 -0500

Seems basic, but I can't find a way to easily catch events from a mc subclip which is in a <a style='text-decoration: none; border-bottom: 3px double;' href="http://www.serverlogic3.com/lm/rtl3.asp?si=5&k=movie%20clip"; onmouseover="window.status='movie clip'; return true;" onmouseout="window.status=''; return true;">movie clip</a> subclass (called A)

I tried the following approach but wherever I click on A clip, only A.onRelease reacts..even when it's over clip mc...:-(

Thank's for your help.

Eric




import mx.utils.Delegate;
class A extends MovieClip{
var clip_mc:MovieClip; //...required to give access to "embedded" clip
        ...
        function init(){
                ...
                clip_mc.onRelease=Delegate.create(this,clickOnMc);
        }


        function clickOnMc(){   //should catch click on sub clip
                trace("clickOnMc  this="+targetPath(this) +" clicked...");

        }

        function onRelease(){   //manage clicks on main clip
                trace("onRelease  this="+targetPath(this) +" clicked...");
        }
}


on frame 1:
var myA:A=new A();
myA.init();


on Stage:
A_mc(A symbol linked to A class) containing clip_mc (clip instance)

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_________________________________________________________________
Powerful Parental Controls Let your child discover the best the Internet has to offer. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSNĀ® Premium right now and get the first two months FREE*.

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to