Glow Effect with Rollover Item for RotationMENU CS (AS3)

Author: Digicrafts Last Update: 08/04/2008

1. Follow Working with Event to setup the menu.


2. Adding glow effect when items rollover

Change the Action Script mention in Working with Event to following.
For more setting for the filters, you can visit here




//Import the GlowFilter Class
import flash.filters.GlowFilter;
//Import the RotationMenuEvent Class
import com.digicrafts.controls.RotationMenuEvent;

//Item Event Handler
function itemH(event:RotationMenuEvent):void {
switch(event.type) {
//Mouse Over Event
case RotationMenuEvent.MOUSE_OVER:
//Define a glow filter with color 0xFFCC00
var f:GlowFilter = new GlowFilter(0xFFCC00);
var fArray:Array = new Array();
fArray[0] = f;

//Assign the filters to the items
event.selectedItem.content.filters = fArray;
break;
//Mouse Out Event
case RotationMenuEvent.MOUSE_OUT:

//Remove the filters from the items
event.selectedItem.content.filters = null;
break;
}
}
menu_mc.addEventListener(RotationMenuEvent.MOUSE_OVER,itemH);
menu_mc.addEventListener(RotationMenuEvent.MOUSE_OUT,itemH);
menu_mc.addEventListener(RotationMenuEvent.CLICK,itemH);