actionscript 3 event.target -
actionscript 3 event.target -
i have film clip named button1 , in film clip there dynamic text named txt
public function mouse_down(event:mouseevent) { if(event.target==button1) { ...//this recognizes when click button without intersecting dynamic text area } if(event.target==button1||event.target==button1.txt) { ...//this works }
i know why dosen't recognize clicks made in area contains dynamic click if don't specify it, because txt part of button1, need check if target button1 dosen't work:i have check if target button1.txt
thanks help!
event.target
points object event originated from, if nested in object added listener to. utilize event.currenttarget
instead.
check out this blog post larn more.
actionscript-3 events target movieclip
Comments
Post a Comment