Effect chart
Before highlighting:
Highlight:
Import Flash.display.MovieClip;
Import flash.events.MouseEvent;
Import Flash.filters.GlowFilter;
var filter:array = [New Glowfilter (0xffffff,0.5,64,64,6,1,true)]
var rolemc:movieclip = this.role;
Rolemc.addeventlistener (mouseevent.mouse_move,onmouseover);
Rolemc.addeventlistener (mouseevent.mouse_out,onmouseout);
function OnMouseOver (e:mouseevent): void{
rolemc.filters = filter;
function onmouseout (e:mouseevent): void{
rolemc.filters = [];
}
Use the Glowfilter class to apply a glow effect to a display object. There are several options for the glow style, including inside or outside glow and knockout mode. When the distance and angle properties of the projection filter are set to 0 o'clock, the Glow filter is very similar to the projection filter. You can apply filters to any display object (that is, objects inherited from the Displayobject class), such as MovieClip, SimpleButton, TextField, and video objects, and BitmapData objects.
Glowfilter Related parameters:
Alpha:number
The Alpha transparency value of the color.
Blurx:number
Horizontal fuzzy quantity.
Blury:number
The vertical blur amount.
Color:uint
Halo Color.
Inner:boolean
Specifies whether the glow is an inner glow.
Knockout:boolean
Specifies whether the object has a knockout effect.
Quality:int
The number of times the filter was applied.
Strength:number
The strength of the stamp or spread.
Reference:
Http://help.adobe.com/zh_CN/FlashPlatform/reference/actionscript/3/flash/filters/GlowFilter.html