更改框架时调整影片剪辑的大小

时间:2013-03-15 11:48:20

标签: actionscript-3 flash

请帮助,我有以下代码(两个框架,登录到框架2并停止。)。

我所追求的是将整个影片剪辑大小更改为第2帧中的非常小的影片。欢迎任何建议。

stop();

stage.addEventListener(MouseEvent.RIGHT_CLICK, function(e:Event){});

login_btn.buttonMode = true; // show hand cursor

//adding event listener
login_btn.addEventListener(MouseEvent.CLICK, loginUser);

function loginUser(e:MouseEvent):void{
    //if username & password are correct allow entry
    if(IDTxt.text == "wixlab"){
        gotoAndStop(2);
    }
    if(IDTxt.text == "hello"){
        gotoAndStop(2);
    }
    if(IDTxt.text == "hello"){
        gotoAndStop(2);

    }else {
        //otherwise show an error message
        var alert:TextFormat = new TextFormat();
        alert.color = 0xff0000; //red font
        messageTxt.text = "Incorrect ID, Please try again.";
        messageTxt.setTextFormat(alert);
    }
}

1 个答案:

答案 0 :(得分:0)

如果你想摆脱按钮,有很多方法可以做到:

永久摆脱按钮

removeChild(login_btn);

如果你真的只想缩小按钮,那么你就看不到了

login_btn.scaleX = 0;

如果您希望按钮仍然存在但看不到它:

login_btn.x = -1000;
相关问题