first off using adobe flash cs6 as3
look @ guys cause i'm baffled:
i dispatching event button click, ok working fine , handling event this:
function killloadedclip(event:event):void{ trace(event.type); event.target.removeeventlistener('killme', killloadedclip) stage.removechild(profileloader); profileloader.unload(); }
works charm !
however, @ this, trace shows following
killme
when this:
function killloadedclip(event:event):void{ trace(event.type); if (event.type == "killme") { trace("if in profile"); event.target.removeeventlistener('killme', killloadedclip) stage.removechild(profileloader); profileloader.unload(); } else { //do nothing } }
nothing !!, trace shows correct string, baffling bit. if hard code value of event.type "killme" goes in , works.
so conclusion simple right ?... event.type not being recognised "killme", being traced "killme" !!
i have tried string in case, have used in dynamictexfield.text = event.type; , works , shows "killme" !!
anyone encountered problem ???
Comments
Post a Comment