03.07.2013 Views

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

hi<strong>de</strong>Object (propriété DropShadowFilter.hi<strong>de</strong>Object)<br />

public hi<strong>de</strong>Object : Boolean<br />

Indique si l'objet est masqué ou non. Une valeur true indique que l'objet n'est pas tracé et<br />

que seule l'ombre est visible. La valeur par défaut est false, soit montrer l'objet.<br />

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

Exemple<br />

L'exemple suivant change la propriété hi<strong>de</strong>Object sur un clip existant quand un utilisateur<br />

clique <strong>de</strong>ssus.<br />

import flash.filters.DropShadowFilter;<br />

var mc:MovieClip = createDropShadowRectangle("DropShadowHi<strong>de</strong>Object");<br />

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

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

filter.hi<strong>de</strong>Object = true;<br />

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

}<br />

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

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

this.getNextHighestDepth());<br />

var w:Number = 100;<br />

var h:Number = 100;<br />

art.beginFill(0x003366);<br />

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

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

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

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

art._x = 20;<br />

art._y = 20;<br />

}<br />

var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, .8,<br />

16, 16, 1, 3, false, false, false);<br />

var filterArray:Array = new Array();<br />

filterArray.push(filter);<br />

art.filters = filterArray;<br />

return art;<br />

inner (propriété DropShadowFilter.inner)<br />

public inner : Boolean<br />

Indique si l'ombre est intérieure ou non. La valeur true indique une ombre intérieure. La<br />

valeur par défaut est false, renvoyant une ombre extérieure au niveau <strong>de</strong>s bords extérieurs <strong>de</strong><br />

l'objet.<br />

560 Chapitre 2: Classes <strong>ActionScript</strong>

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

Saved successfully!

Ooh no, something went wrong!