Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-09-2009, 06:26 AM   #1
pats
Member
 
Join Date: Jul 2009
Posts: 68
Default When mouse is clicked, detect which movieclip is clicked

hi there

I have parent movieclip and in that many different children movieclips

What i want to do is when i CLICK, i want to detect which movieclip it has clicked and call corresponding function (defined by onpress event) of that movieclip.

Thanks for help in advance

Regards
pats is offline   Reply With Quote
Old 09-09-2009, 08:25 AM   #2
dannepop
Senior Member
 
Join Date: Jan 2006
Posts: 130
Default

Try this:
trace(this);

D
dannepop is offline   Reply With Quote
Old 09-09-2009, 09:27 AM   #3
pats
Member
 
Join Date: Jul 2009
Posts: 68
Default

hi thanks for replying

Problem is if i add onpress event to parent movieclip then it will wont detect onpress event of child movieclip

Basically what i want to detect is ----- when i click , if it is any of the child movieclip then call its onpress event other call function nothingClicked()

Now if i add onpress event on parent movieclip and call nothingClicked() then it is not detecting the onpress event of child movieclip and simply calls nothingClicked().

How to do this ????
pats is offline   Reply With Quote
Old 09-10-2009, 10:33 AM   #4
pats
Member
 
Join Date: Jul 2009
Posts: 68
Default No way to do this ???

There is no way to do this ????

Please somebody help me....

Regards
pats is offline   Reply With Quote
Old 09-10-2009, 12:17 PM   #5
asf8
Senior Member
 
Join Date: Apr 2007
Posts: 4,772
Default Flash Button - Event Bubble - Dealing With Flash Button Event Capturing

Quote:
Originally Posted by pats View Post
I have parent movieclip and in that many different children movieclips
Quote:
Originally Posted by pats View Post
Problem is if i add onpress event to parent movieclip then it will wont detect onpress event of child movieclip
Quote:
Originally Posted by pats View Post
There is no way to do this ?
Flash Button - Event Bubble - Dealing With Flash Button Event Capturing
http://www.actionscript.org/forums/s...48&postcount=3

asf8 is offline   Reply With Quote
Old 09-10-2009, 12:55 PM   #6
pats
Member
 
Join Date: Jul 2009
Posts: 68
Default Thanks a million.....

Really thanks a lot... I didn't had any idea about event bubbling model.

I got my exact requirement...

Really thanks a lot

Regards
pats is offline   Reply With Quote
Old 09-10-2009, 02:49 PM   #7
asf8
Senior Member
 
Join Date: Apr 2007
Posts: 4,772
Default

glad it helped
asf8 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:28 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.