03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

highlightAlpha (BevelFilter.highlightAlpha property)<br />

public highlightAlpha : Number<br />

The alpha transparency value of the highlight color. The value is specified as a normalized<br />

value from 0 to 1. For example, 0.25 sets a transparency value of 25%. The default value is 1.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 8<br />

Example<br />

The following example changes the highlightAlpha property on the existing MovieClip<br />

instance (rect) when a user clicks it:<br />

import flash.filters.BevelFilter;<br />

var rect:MovieClip = createBevelRectangle("BevelHighlightAlpha");<br />

rect.onRelease = function() {<br />

var filter:BevelFilter = this.filters[0];<br />

filter.highlightAlpha = 0.2;<br />

this.filters = new Array(filter);<br />

}<br />

function createBevelRectangle(name:String):MovieClip {<br />

var w:Number = 100;<br />

var h:Number = 100;<br />

var bgColor:Number = 0x00CC00;<br />

}<br />

var rect:MovieClip = this.createEmptyMovieClip(name,<br />

this.getNextHighestDepth());<br />

rect.beginFill(bgColor);<br />

rect.lineTo(w, 0);<br />

rect.lineTo(w, h);<br />

rect.lineTo(0, h);<br />

rect.lineTo(0, 0);<br />

rect._x = 20;<br />

rect._y = 20;<br />

var filter:BevelFilter = new BevelFilter(5, 45, 0xFFFF00, 0.8, 0x0000FF,<br />

0.8, 20, 20, 1, 3, "inner", false);<br />

rect.filters = new Array(filter);<br />

return rect;<br />

290 <strong>ActionScript</strong> classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!