actionscript 3 - How to make a movieClip move independent of the stage if added on it? -
in flash-made game, if character jump on top of enemy movieclip spawns 3 minions class movieclip(root).addchild(spawn1); . in minions class i've put code them fall , stop upon hitting ground , follow character. i have vcam(virtual camera) movieclip follow character(who moves on stage, not stage around him) code build-in: import flash.events.event; import flash.geom.matrix; import flash.geom.rectangle; import flash.geom.point; import flash.display.movieclip; //vcam addeventlistener(event.enter_frame, handleenterframe); function handleenterframe(event:event):void { if (parent) { parent.scalex = 1 / scalex; parent.scaley = 1 / scaley; if (rotation == 0) { parent.x = (width / 2 - x) / scalex; parent.y = (height / 2 - y) / scaley; parent.rotation = 0; } else { var bounds:rectangle = getbounds(this); var angle:number = rotation * math.pi / 180; var midx:number = -x / sca...