Class org.aswing.ASColor

Description

ASColor object to set color and alpha for a movieclip.

Field Index

BLACK, BLUE, CYAN, DARK_GRAY, GRAY, GREEN, HALO_BLUE, HALO_GREEN, HALO_ORANGE, LIGHT_GRAY, MAGENTA, ORANGE, PINK, RED, WHITE, YELLOW

Method Index

new ASColor()
brighter(), darker(), equals(), getAlpha(), getASColor(), getBlue(), getGreen(), getRed(), getRGB(), getRGBWith(), toString()

Constructor Detail

ASColor

public function ASColor(color:Number, alpha:Number)

Field Detail

WHITE

static public WHITE:ASColor [Read Only]

LIGHT_GRAY

static public LIGHT_GRAY:ASColor [Read Only]

GRAY

static public GRAY:ASColor [Read Only]

DARK_GRAY

static public DARK_GRAY:ASColor [Read Only]

BLACK

static public BLACK:ASColor [Read Only]

RED

static public RED:ASColor [Read Only]

PINK

static public PINK:ASColor [Read Only]

ORANGE

static public ORANGE:ASColor [Read Only]

HALO_ORANGE

static public HALO_ORANGE:ASColor [Read Only]

YELLOW

static public YELLOW:ASColor [Read Only]

GREEN

static public GREEN:ASColor [Read Only]

HALO_GREEN

static public HALO_GREEN:ASColor [Read Only]

MAGENTA

static public MAGENTA:ASColor [Read Only]

CYAN

static public CYAN:ASColor [Read Only]

BLUE

static public BLUE:ASColor [Read Only]

HALO_BLUE

static public HALO_BLUE:ASColor [Read Only]

Method Detail

getAlpha

public function getAlpha():Number

Returns the alpha component in the range 0-100.

getRGB

public function getRGB():Number

Returns the RGB value representing the color.

getRed

public function getRed():Number

Returns the red component in the range 0-255.

Return

the red component.

See Also

getGreen

public function getGreen():Number

Returns the green component in the range 0-255.

Return

the green component.

See Also

getBlue

public function getBlue():Number

Returns the blue component in the range 0-255.

Return

the blue component.

See Also

darker

public function darker(factor:Number):ASColor

darker(factor:Number)
darker() default factor to 0.7

Creates a new Color that is a darker version of this Color.

Parameters

factorthe darker factor(0, 1), default is 0.7

Return

a new Color object that is a darker version of this Color.

See Also

brighter

public function brighter(factor:Number):ASColor

brighter(factor:Number)
brighter() default factor to 0.7

Creates a new Color that is a brighter version of this Color.

Parameters

factorthe birghter factor(0, 1), default is 0.7

Return

a new Color object that is a brighter version of this Color.

See Also

getASColor

static public function getASColor(r:Number, g:Number, b:Number, a:Number):ASColor

Returns a ASColor with with the specified red, green, blue values in the range (0 - 255) and alpha value in range(0-100).

getASColor(r:Number, g:Number, b:Number, a:Number)
getASColor(r:Number, g:Number, b:Number)
alpha default to 100

getRGBWith

static public function getRGBWith(rr:Number, gg:Number, bb:Number):Number

Returns the RGB value representing the red, green, and blue values.

toString

public function toString():String

equals

public function equals(o:Object):Boolean