cuberotate.as

来自「Flex三维特效 examples - see DistortionExamp」· AS 代码 · 共 75 行

AS
75
字号
package com.adobe.ac.mxeffects
{

import flash.filters.BlurFilter;

import mx.effects.IEffectInstance;
import mx.effects.TweenEffect;
import com.adobe.ac.mxeffects.effectClasses.CubeRotateInstance;

public class CubeRotate extends TweenEffect
{
	public function CubeRotate( target:Object = null )
	{
		super( target );
		instanceClass = CubeRotateInstance;
	}
	
	[Inspectable(category="General", defaultValue="null")]
	public static var defaultDirection : String = "RIGHT";
			
	[Inspectable(category="General", defaultValue="null")]
	public var siblings : Array;

	[Inspectable(category="General", defaultValue="null", enumeration="RIGHT,LEFT,TOP,BOTTOM")]
	public var direction : String;
	
	[Inspectable(category="General", defaultValue="null")]
	public static var defaultBuildMode : String = "POPUP";
	
	[Inspectable(category="General", defaultValue="null", enumeration="POPUP,REPLACE,ADD,OVERWRITE")]
	public var buildMode : String;
	
	[Inspectable(category="General", defaultValue="false")]
	public var smooth : Boolean;

	[Inspectable(category="General", defaultValue="NaN")]
	public var distortion : Number;
	
	[Inspectable(category="General", defaultValue="false")]
	public var liveUpdate : Boolean = false;
	
	[Inspectable(category="General", defaultValue="0")]
	public var liveUpdateInterval : int = 0;
	
	[Inspectable(category="General", defaultValue="null")]
	public var blur : BlurFilter;
	
	[Inspectable(category="General", defaultValue="null", enumeration="RIGHT,LEFT")]
	public var horizontalLightingLocation : String;
	
	[Inspectable(category="General", defaultValue="null", enumeration="TOP,BOTTOM")]
	public var verticalLightingLocation : String;
	
	[Inspectable(category="General", defaultValue="NaN")]
	public var lightingStrength : Number;	
		
	override protected function initInstance( instance : IEffectInstance ) : void
	{
		super.initInstance( instance );
		var effectInstance : CubeRotateInstance = CubeRotateInstance( instance );
		effectInstance.siblings = siblings;
		effectInstance.direction = direction;
		effectInstance.buildMode = buildMode;
		effectInstance.smooth = smooth;
		effectInstance.distortion = distortion;
		effectInstance.liveUpdate = liveUpdate;
		effectInstance.liveUpdateInterval = liveUpdateInterval;
		effectInstance.blur = blur;
		effectInstance.horizontalLightingLocation = horizontalLightingLocation;
		effectInstance.verticalLightingLocation = verticalLightingLocation;
		effectInstance.lightingStrength = lightingStrength;		
	}
}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?