topical media & game development
actionscript-distort-view-distortion-ButtonSkin3D.ax
actionscript-distort-view-distortion-ButtonSkin3D.ax
[swf]
flex
package view.distortion
{
import com.adobe.ac.mxeffects.Distortion;
import com.adobe.ac.mxeffects.DistortionConstants;
import mx.skins.halo.ButtonSkin;
public class @ax-actionscript-distort-view-distortion-ButtonSkin3D extends ButtonSkin
{
override protected function updateDisplayList( w : Number, h : Number ) : void
{
super.updateDisplayList( w, h );
var distortion : Distortion = new Distortion( this );
distortion.smooth = true;
distortion.buildMode = DistortionConstants.OVERWRITE;
switch ( name )
{
case "upSkin":
distortion.openDoor( 25, DistortionConstants.BOTTOM );
break;
case "overSkin":
distortion.openDoor( 15, DistortionConstants.BOTTOM );
}
}
}
}
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.