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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -