actionscript 3 - how to get instance name of a movieClip dynamically? -


i have movieclips (suppose= a) on stage. need modify them when drop moviclip (suppose= b) in movieclip (suppose= c).

my code is

var stx:number; var sty:number;  ant.addeventlistener(mouseevent.mouse_down, objdrag); ant.addeventlistener(mouseevent.mouse_up, objdropinpenta);  function objdrag(e:mouseevent):void {     stx = e.currenttarget.x;     sty = e.currenttarget.y;     e.currenttarget.startdrag(); }  function objdropinpenta(e:mouseevent):void {     e.currenttarget.stopdrag();   if (e.currenttarget.hittestobject(penta)) {     trace(e.currenttarget.name);      var mcname:     mcname = "s1" + e.currenttarget.name      trace(mcname.name);     mcname.visible = false;     e.currenttarget.visible = false; } else {     e.currenttarget.x = stx;     e.currenttarget.y = sty; } } 

i know how make separately want make dynamically

mcname.visible = false; 

this not working missing? please guide

thanks in advance


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -