可用鼠标控制的老鼠

      Flash学习 2005-7-12 18:0
可用鼠标控制的老鼠


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;
        }
}
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}