The Background class extends SkinnableComponent and draws the background of a navigator display window.
It provides the capability to draw a mix of solid color, gradients, and images.
The background properties are specified in the navigator's properties.xml file.
[override] Returns the current state of this instance, since its skins should have a matching
set of states.
Background
Skin States
To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.
Skin State
Description
Defined By
linear
Choosing this state enables the linear gradient skin part of the background skin
Background
radial
Choosing this state enables the radial gradient skin part of the background skin
Background
solid
Choosing this state enables the solid skin part of the background skin
Used by the background skin to determine the opacity of the gradient.
The default value is 1.0 (fully opaque).
This property can be used as the source for data binding.
Implementation public function get gradientAlpha():Number
gradientBaseColor
property
gradientBaseColor:uint [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine the primary color of the gradient.
The default value is 0 (black).
This property can be used as the source for data binding.
Implementation public function get gradientBaseColor():uint
gradientDeltaColor
property
gradientDeltaColor:uint [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine the secondary color of the gradient.
The default value is 0 (black).
This property can be used as the source for data binding.
Implementation public function get gradientDeltaColor():uint
imageAlpha
property
imageAlpha:Number [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine the opacity of the image.
The default value is 1.0 (fully opaque).
This property can be used as the source for data binding.
Implementation public function get imageAlpha():Number
imageFillMode
property
imageFillMode:String [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine how the image is displayed.
The default value is BitmapFillMode.CLIP.
This property can be used as the source for data binding.
Implementation public function get imageFillMode():String
See also
mx.graphics.BitmapFillMode
imageFilters
property
imageFilters:Array [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine the bluriness of the image (simulates depth of field).
If non-null, this is an array of one containing a blur filter.
The default value is no blur effect.
This property can be used as the source for data binding.
Implementation public function get imageFilters():Array
See also
spark.filters.BlurFilter
imageScaleX
property
imageScaleX:Number [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine the x-direction scale of the image.
The default value is 1 (actual size).
This property can be used as the source for data binding.
Implementation public function get imageScaleX():Number
imageScaleY
property
imageScaleY:Number [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine the y-direction scale of the image.
The default value is 1 (actual size).
This property can be used as the source for data binding.
Implementation public function get imageScaleY():Number
imageSource
property
imageSource:Object [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to display the loaded image.
The default value is no image source.
This property can be used as the source for data binding.
Implementation public function get imageSource():Object
imageVisible
property
imageVisible:Boolean [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine if the image should be displayed.
The default value is false (image is not displayed).
This property can be used as the source for data binding.
Implementation public function get imageVisible():Boolean
imageX
property
imageX:Number [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine the x position of the image.
The default value is 0.0.
This property can be used as the source for data binding.
Implementation public function get imageX():Number
imageY
property
imageY:Number [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Used by the background skin to determine the y position of the image.
The default value is 0.0.
This property can be used as the source for data binding.
Implementation public function get imageY():Number
Constructor Detail
Background
()
Constructor
public function Background()
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Constructor.
Method Detail
getCurrentSkinState
()
method
override protected function getCurrentSkinState():String
Returns the current state of this instance, since its skins should have a matching
set of states.
Returns
String
setCurrentState
()
method
override public function setCurrentState(stateName:String, playTransition:Boolean = true):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Sets the state of the skin as well as the state of this instance.
Parameters
stateName:String — The name of the new view state.
playTransition:Boolean (default = true) — If true, play
the appropriate transition when the view state changes.
Constant Detail
IMPORTED_IMAGE_NAME
Constant
public static const IMPORTED_IMAGE_NAME:String = user_image
MIME_TYPE_GIF
Constant
public static const MIME_TYPE_GIF:String = image/gif
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
The mime type of a gif file.
MIME_TYPE_JPG
Constant
public static const MIME_TYPE_JPG:String = image/jpeg
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
The mime type of a jpeg file.
MIME_TYPE_PNG
Constant
public static const MIME_TYPE_PNG:String = image/png