stop();
mc.setMask(mask_mc);
var v:Number = 5;//移动速度
var i:Number = 0;
var num:Number;
_btn.onPress = function() {
mc.t_txt.text = input_txt.text;
runMove();
};
_btn.onRelease = function() {
input_txt.text = "";
};
function runMove() {
onEnterFrame = function(){
if (mc._x>212) {
mc._x -= v;
}else{
delete onEnterFrame;
num=setInterval(funstop,1000);
};
updateAfterEvent();
};
};
function funstop() {
i++;
if (i>=4) {//中间停留时间
clearInterval(num);
run_left();
}
}
function run_left() {
onEnterFrame = function () {
mc._x -= v;
if (mc._x<=94) {
delete onEnterFrame;
mc._x = 319;
}
updateAfterEvent();
};
}