可用鼠标控制的老鼠
Flash 动画:
--------------------
ActionScript code
this.onEnterFrame=function(){
if(Key.isDown(Key.UP)){
mymouse.gotoAndStop("up");
mymouse._y-=10;
//trace(mymouse._y);
if(mymouse._y<25){
trace("<0")
mymouse._y=375;
}
}
if(Key.isDown(Key.DOWN)){
//trace("down");
mymouse.gotoAndStop("down");
mymouse._y+=10;
//trace(mymouse._y);
if(mymouse._y>=375){
mymouse._y=25;
}
}
if(Key.isDown(Key.LEFT)){
//trace("left");
mymouse.gotoAndStop("left");
mymouse._x-=10;
if(mymouse._x<=25)mymouse._x=525;
}
if(Key.isDown(Key.RIGHT)){
//trace("right");
mymouse.gotoAndStop("right");
mymouse._x+=10;
if(mymouse._x>=525)mymouse._x=25;
}
}
Flash 动画:
--------------------
ActionScript code
this.onEnterFrame=function(){
if(Key.isDown(Key.UP)){
mymouse.gotoAndStop("up");
mymouse._y-=10;
//trace(mymouse._y);
if(mymouse._y<25){
trace("<0")
mymouse._y=375;
}
}
if(Key.isDown(Key.DOWN)){
//trace("down");
mymouse.gotoAndStop("down");
mymouse._y+=10;
//trace(mymouse._y);
if(mymouse._y>=375){
mymouse._y=25;
}
}
if(Key.isDown(Key.LEFT)){
//trace("left");
mymouse.gotoAndStop("left");
mymouse._x-=10;
if(mymouse._x<=25)mymouse._x=525;
}
if(Key.isDown(Key.RIGHT)){
//trace("right");
mymouse.gotoAndStop("right");
mymouse._x+=10;
if(mymouse._x>=525)mymouse._x=25;
}
}
回复Comments
作者:
{commentrecontent}