actionscript 3 - mouseclick sometimes fails to work -
i used eventlistener mouseevent.click. if click once, wont shoot, when click again shoots. problem within flash or mouse? it's strange. here code fire event.
function fire(m: event) { //reset cooldown //spawn bullet //set position , rotation of bullet b.rotation = turret.rotation; b.x = turret.x; b.y = turret.y; //add bullet parent object parent.addchild(b); }
Comments
Post a Comment