flash.display

# ShaderParameterType - AS3

Package | flash.display
Class | public final class ShaderParameterType
Inheritance | ShaderParameterType Object

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

This class defines the constants that represent the possible values for the ShaderParameter class's `type` property. Each constant represents one of the data types available in Flash Player for parameters in the Pixel Bender shader language.

Related API Elements

flash.display.ShaderParameter.type

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants

| Constant | Defined By
--- | --- | ---
|  | BOOL : String = "bool" [static] Indicates that the shader parameter is defined as a bool value, equivalent to a single Boolean instance in ActionScript. | ShaderParameterType
|  | BOOL2 : String = "bool2" [static] Indicates that the shader parameter is defined as a bool2 value, equivalent to an Array of two Boolean instances in ActionScript. | ShaderParameterType
|  | BOOL3 : String = "bool3" [static] Indicates that the shader parameter is defined as a bool3 value, equivalent to an Array of three Boolean instances in ActionScript. | ShaderParameterType
|  | BOOL4 : String = "bool4" [static] Indicates that the shader parameter is defined as a bool4 value, equivalent to an Array of four Boolean instances in ActionScript. | ShaderParameterType
|  | FLOAT : String = "float" [static] Indicates that the shader parameter is defined as a float value, equivalent to a single Number instance in ActionScript. | ShaderParameterType
|  | FLOAT2 : String = "float2" [static] Indicates that the shader parameter is defined as a float2 value, equivalent to an Array of two Number instances in ActionScript. | ShaderParameterType
|  | FLOAT3 : String = "float3" [static] Indicates that the shader parameter is defined as a float3 value, equivalent to an Array of three Number instances in ActionScript. | ShaderParameterType
|  | FLOAT4 : String = "float4" [static] Indicates that the shader parameter is defined as a float4 value, equivalent to an Array of four Number instances in ActionScript. | ShaderParameterType
|  | INT : String = "int" [static] Indicates that the shader parameter is defined as an int value, equivalent to a single int or uint instance in ActionScript. | ShaderParameterType
|  | INT2 : String = "int2" [static] Indicates that the shader parameter is defined as an int2 value, equivalent to an Array of two int or uint instances in ActionScript. | ShaderParameterType
|  | INT3 : String = "int3" [static] Indicates that the shader parameter is defined as an int3 value, equivalent to an Array of three int or uint instances in ActionScript. | ShaderParameterType
|  | INT4 : String = "int4" [static] Indicates that the shader parameter is defined as an int4 value, equivalent to an Array of four int or uint instances in ActionScript. | ShaderParameterType
|  | MATRIX2X2 : String = "matrix2x2" [static] Indicates that the shader parameter is defined as a float2x2 value, equivalent to a 2-by-2 matrix. | ShaderParameterType
|  | MATRIX3X3 : String = "matrix3x3" [static] Indicates that the shader parameter is defined as a float3x3 value, equivalent to a 3-by-3 matrix. | ShaderParameterType
|  | MATRIX4X4 : String = "matrix4x4" [static] Indicates that the shader parameter is defined as a float4x4 value, equivalent to a 4-by-4 matrix. | ShaderParameterType

Constant Detail

### BOOL

Constant

`public static const BOOL:String = "bool"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `bool` value, equivalent to a single Boolean instance in ActionScript.

Note that even though the parameter only expects a single value, the `ShaderParameter.value` property is an Array, so the single value must be the only element of an Array assigned to the `value` property, like this:

Copy

             // assumes the shader has a parameter named "param"
             // whose data type is bool
             myShader.data.param.value = [true];

### BOOL2

Constant

`public static const BOOL2:String = "bool2"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `bool2` value, equivalent to an Array of two Boolean instances in ActionScript.

### BOOL3

Constant

`public static const BOOL3:String = "bool3"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `bool3` value, equivalent to an Array of three Boolean instances in ActionScript.

### BOOL4

Constant

`public static const BOOL4:String = "bool4"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `bool4` value, equivalent to an Array of four Boolean instances in ActionScript.

### FLOAT

Constant

`public static const FLOAT:String = "float"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `float` value, equivalent to a single Number instance in ActionScript.

Note that even though the parameter only expects a single value, the `ShaderParameter.value` property is an Array, so the single value must be the only element of an Array assigned to the `value` property, like this:

Copy

             // assumes the shader has a parameter named "param"
             // whose data type is float
             myShader.data.param.value = [22.5];

Related API Elements

flash.display.ShaderParameter.type

### FLOAT2

Constant

`public static const FLOAT2:String = "float2"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `float2` value, equivalent to an Array of two Number instances in ActionScript.

Related API Elements

flash.display.ShaderParameter.type

### FLOAT3

Constant

`public static const FLOAT3:String = "float3"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `float3` value, equivalent to an Array of three Number instances in ActionScript.

### FLOAT4

Constant

`public static const FLOAT4:String = "float4"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `float4` value, equivalent to an Array of four Number instances in ActionScript.

### INT

Constant

`public static const INT:String = "int"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as an `int` value, equivalent to a single int or uint instance in ActionScript.

Note that even though the parameter only expects a single value, the `ShaderParameter.value` property is an Array, so the single value must be the only element of an Array assigned to the `value` property, like this:

Copy

             // assumes the shader has a parameter named "param"
             // whose data type is int
             myShader.data.param.value = [275];

### INT2

Constant

`public static const INT2:String = "int2"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as an `int2` value, equivalent to an Array of two int or uint instances in ActionScript.

### INT3

Constant

`public static const INT3:String = "int3"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as an `int3` value, equivalent to an Array of three int or uint instances in ActionScript.

### INT4

Constant

`public static const INT4:String = "int4"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as an `int4` value, equivalent to an Array of four int or uint instances in ActionScript.

### MATRIX2X2

Constant

`public static const MATRIX2X2:String = "matrix2x2"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `float2x2` value, equivalent to a 2-by-2 matrix. This matrix is represented as an Array of four Number instances in ActionScript.

### MATRIX3X3

Constant

`public static const MATRIX3X3:String = "matrix3x3"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `float3x3` value, equivalent to a 3-by-3 matrix. This matrix is represented as an Array of nine Number instances in ActionScript.

### MATRIX4X4

Constant

`public static const MATRIX4X4:String = "matrix4x4"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Indicates that the shader parameter is defined as a `float4x4` value, equivalent to a 4-by-4 matrix. This matrix is represented as an Array of 16 Number instances in ActionScript.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00