Packagecom.adobe.portfolio.components
Classpublic class Background
InheritanceBackground Inheritance spark.components.supportClasses.SkinnableComponent
Implements mx.managers.IFocusManagerComponent

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

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.



Public Properties
 PropertyDefined By
  gradientAlpha : Number
[read-only] Used by the background skin to determine the opacity of the gradient.
Background
  gradientBaseColor : uint
[read-only] Used by the background skin to determine the primary color of the gradient.
Background
  gradientDeltaColor : uint
[read-only] Used by the background skin to determine the secondary color of the gradient.
Background
  imageAlpha : Number
[read-only] Used by the background skin to determine the opacity of the image.
Background
  imageFillMode : String
[read-only] Used by the background skin to determine how the image is displayed.
Background
  imageFilters : Array
[read-only] Used by the background skin to determine the bluriness of the image (simulates depth of field).
Background
  imageScaleX : Number
[read-only] Used by the background skin to determine the x-direction scale of the image.
Background
  imageScaleY : Number
[read-only] Used by the background skin to determine the y-direction scale of the image.
Background
  imageSource : Object
[read-only] Used by the background skin to display the loaded image.
Background
  imageVisible : Boolean
[read-only] Used by the background skin to determine if the image should be displayed.
Background
  imageX : Number
[read-only] Used by the background skin to determine the x position of the image.
Background
  imageY : Number
[read-only] Used by the background skin to determine the y position of the image.
Background
Public Methods
 MethodDefined By
  
Constructor.
Background
  
setCurrentState(stateName:String, playTransition:Boolean = true):void
[override] Sets the state of the skin as well as the state of this instance.
Background
Protected Methods
 MethodDefined By
  
[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 Background
Public Constants
 ConstantDefined By
  IMPORTED_IMAGE_NAME : String = user_image
[static]
Background
  MIME_TYPE_GIF : String = image/gif
[static] The mime type of a gif file.
Background
  MIME_TYPE_JPG : String = image/jpeg
[static] The mime type of a jpeg file.
Background
  MIME_TYPE_PNG : String = image/png
[static] The mime type of a png file.
Background
Property Detail
gradientAlphaproperty
gradientAlpha: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 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
gradientBaseColorproperty 
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
gradientDeltaColorproperty 
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
imageAlphaproperty 
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
imageFillModeproperty 
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
imageFiltersproperty 
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
imageScaleXproperty 
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
imageScaleYproperty 
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
imageSourceproperty 
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
imageVisibleproperty 
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
imageXproperty 
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
imageYproperty 
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_NAMEConstant
public static const IMPORTED_IMAGE_NAME:String = user_image

MIME_TYPE_GIFConstant 
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_JPGConstant 
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_PNGConstant 
public static const MIME_TYPE_PNG:String = image/png

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The mime type of a png file.