stage.addEventListener(KeyboardEvent.KEY_DOWN,yuan);
function yuan(e:KeyboardEvent):void { switch (e.keyCode) { case 37 : //mc.x-=10; x-=10等于下面的式子mc.x=duo_mc.x-10; mc.x=mc.x-10; break; case 38 : //mc.y-=10; y-=10等于下面的式子mc.y=duo_mc.y-10; mc.y=mc.y-10; break; case 39 : //mc.x+=10; x+=10等于下面的式子mc.x=duo_mc.x+10; mc.x=mc.x+10; break; case 40 : //mc.y+=10; y+=10等于下面的式子mc.y=duo_mc.y+10; mc.y=mc.y+10; break; } }