alexa-tracking

Main Content

1024
1024
KASKUS
51
244
https://www.kaskus.co.id/thread/50aa1dda4f6ea13f02000074/flash-action-script
Smile 
Flash Action Script
maap gan sblumnya klo ane slah kamar.
tapi tolong ente gan.
mohon bantuannya buat convert as 3 ke as 2 untuk adobe flash emoticon-Big Grin

Quote://The main menu's instance name is yourMenu.
//Find and replace yourMenu to match that of your menu instance.

stop();
var btnNum:int;
var highlightNum:int = 1;

var menu1Open:Boolean = false;
var menu2Open:Boolean = false;
var menu3Open:Boolean = false;

var bg:MovieClip = new MovieClip();
bg.graphics.beginFill(0x999999, 1);
bg.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
bg.graphics.endFill();
bg.alpha = 0;
yourMenu.addChildAt(bg, 0);

};

//when user mouse leaves a button, set the highlight
stage.addEventListener(MouseEvent.MOUSE_OUT, outBtn);
function outBtn(evt:MouseEvent):void {
switch (evt.target) {
case yourMenu.menu1_btn :
highlightNum=1;
break;

case yourMenu.menu2_btn :
highlightNum=2;
break;

case yourMenu.menu3_btn :
highlightNum=3;
break;

}
};

//mouse out of drop-down, ensure all menus close
bg.addEventListener(MouseEvent.MOUSE_OVER, leaveMenu);
function leaveMenu(evt:MouseEvent):void{
if(bg.hitTestPoint(mouseX, mouseY, true)){
closeMenu();
menu1Open = false;
menu2Open = false;
menu3Open = false;
}

}

//functions to open and close menus
function openMenu():void {
yourMenu.menu_tween.menu_down.addTarget(yourMenu.getChildByName("menu" + btnNum), 1);
}

function closeMenu():void {
yourMenu.menu_tween.menu_up.addTarget(yourMenu.getChildByName("menu" + btnNum), 1);
}

//close menus other than the current one
function closeOtherMenus():void {
if(btnNum == 1 && menu2Open){
yourMenu.menu_tween.menu_up.addTarget(yourMenu.menu2, 1);
menu2Open = false;
}

};

function highlightBtn():void {
if(btnNum == 1 && highlightNum == 2){
yourMenu.highlight_tween.two_one.addTarget(yourMenu.highlight_mc, 1);
}
if(btnNum == 1 && highlightNum ==3
};
};


maap merepotkan emoticon-Matabeloemoticon-Najisemoticon-Sorryemoticon-Kiss