White Box Menubar Component

I’ve built a skin for the menubar component in AS 2.0 and skinned and styled it. However, I’m getting this white box rollover that comes before clicking the buttons on the menubar. Setstyles does not affect this rollover state.

I’ve found this solution from another post a while back, but these removes the rollover and down states completely from the buttons from the menu bar. Can anyone help? Thanks!

Text below from borispavlovic:

hi,

i think that i’ve found a way how to avoid annoying onrollover, onrollout and onclick menubaritem white color blinks

in the fla add this piece of code

mx.skins.halo.ActivatorSkin.prototype.drawHaloRect = function (w:Number,h:Number):Void
{
var borderStyle = getStyle(“borderStyle”);
var themeCol = getStyle(“themeColor”);

	clear();

	switch (borderStyle) {

		case "none": // up/disabled
		drawRoundRect( x,y,w,h,0,0xbb0000,0);//Invisible hit area
		break;

		case "falsedown":
		drawRoundRect( x,y,w,h,0,0x919999,100);//OuterBorder
		drawRoundRect( x+1,y+1,w-2,h-2,0,[0x333333,0xfcfcfc],100,-90,"radial");
		drawRoundRect( x+1,y+1,w-2,h-2,0,themeCol,50);
		drawRoundRect( x+3,y+3,w-6,h-6,0,0xffffff,100);//highlight
		drawRoundRect( x+3,y+4,w-6,h-7,0,themeCol,20);//face
		break;

		case "falserollover":
		drawRoundRect( x,y,w,h,0,0x919999,100);//OuterBorder
		drawRoundRect( x,y,w,h,0,themeCol,50);//OuterBorder
		drawRoundRect( x+1,y+1,w-2,h-2,0,[0x333333,0xffffff],100,0,"radial");
		drawRoundRect( x+3,y+3,w-6,h-6,0,0xffffff,100);//highlight
		drawRoundRect( x+3,y+4,w-6,h-7,0,0xf8f8f8,100);//face
		break;
	}
}

it seems that menubaritem doesn’t call this function properly. if you redefine it things are going to function.

previously you should add three speified skins as described above

boris

p.s. if you want to exclude border over popup list of items in the menubar add this line for every menu which you add in the menubar

var menu = myMenuBar.addMenu(“File”);
menu.addMenuItem({label:“New”, instanceName:“newInstance”});
menu.addMenuItem({label:“Open”, instanceName:“openInstance”});
menu.addMenuItem({label:“Close”, instanceName:“closeInstance”});

menu.border_mc.borderStyle = “none”;