Flash ボタンで操作2

ボタン(左)

on (press) {
    character_mc.onEnterFrame = function(){
        character_mc._x += -10;
        if(character_mc._x <=-50)
           character_mc._x =550;
        }
}
on (release) {
    character_mc.onEnterFrame =undefined;
}


ボタン(右)

on (press) {
    character_mc.onEnterFrame = function(){
        character_mc._x += 10;
        if(character_mc._x >=550)
           character_mc._x =50;
        }
}
on (release) {
    character_mc.onEnterFrame =undefined;
}

ボタン(上)

on (press) {
    character_mc.onEnterFrame = function(){
        character_mc._y += -10;
        if(character_mc._y <=-50)
           character_mc._y =450;
        }
}
on (release) {
    character_mc.onEnterFrame =undefined;
}

ボタン(下)

on (press) {
    character_mc.onEnterFrame = function(){
        character_mc._y += 10;
        if(character_mc._y >=450)
           character_mc._y =-50;
        }
}
on (release) {
    character_mc.onEnterFrame =undefined;
}

▲このページのTOPへ