actionscript 3 - Adobe Air TouchEvent fires on nested MovieClips -


i use following code works fine.

however, makes nested mcs within "zoo" mc draggable (i have 3 mcs inside of parent "zoo" mc)

what need have/make parent mc (zoo) draggable - , not nested children.

multitouch.inputmode = multitouchinputmode.touch_point;  var fl_dragbounds:rectangle = new rectangle(0, 0, stage.stagewidth, stage.stageheight);  zoo.addeventlistener(touchevent.touch_begin, zoo_touchbeginhandler); zoo.addeventlistener(touchevent.touch_end, zoo_touchendhandler);  function zoo_touchbeginhandler(event:touchevent):void     {          event.target.starttouchdrag(event.touchpointid, false, fl_dragbounds);     }      function zoo_touchendhandler(event:touchevent):void     {         event.target.stoptouchdrag(event.touchpointid);     } 

any idea how accomplish this?

apparently "target" wrong! , therefore propagation not stopped :-(

i changed

event.target.starttouchdrag(event.touchpointid, false, fl_dragbounds); 

to

event.currenttarget.starttouchdrag(event.touchpointid, false, fl_dragbounds); 

and worked out fine.

hope may same problem?


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -