Paste: buttons

Author: bLUE
Mode: actionscript
Date: Fri, 12 Feb 2010 22:01:03
Plain Text |
fixTopMenuItems(contact_top);
fixTopMenuItems(collective_top);
fixTopMenuItems(artist_top);

function fixTopMenuItems(m:MovieClip) {
	m.addEventListener(MouseEvent.MOUSE_OVER,TopMenuItemOver);
	m.addEventListener(MouseEvent.MOUSE_OUT,TopMenuItemOut);
	m.MenuItemText.text = m.name.split('_')[0];
	m.MenuItemText.autoSize = "left";
	m.buttonMode = true;
	m.useHandCursor = true;
	m.mouseChildren = false;
}


function TopMenuItemOut (e:MouseEvent):void{
	trace(e.target.name);
	e.target.MenuItemText.textColor = 0x9800FF;
}

function TopMenuItemOver (e:MouseEvent):void{
	trace(e.target.name);
	e.target.MenuItemText.textColor = 0x000000;
}

New Annotation

Summary:
Author:
Mode:
Body: