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
//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);
|
|
| Learning how to make Glow Effect with Rollover Item for RotationMENU CS |
|
Compatibility:
Skill Level: |