Packageorg.flowplayer.view
Classpublic class StyleableSprite
InheritanceStyleableSprite Inheritance AbstractSprite Inheritance flash.display.Sprite
ImplementsStyleable

A sprite that can be styled using a StyleSheet. The stylesheet can specify a background image to be used or alternatively a background color gradient.



Public Properties
 PropertyDefined by
 Inheritedheight : Number
AbstractSprite
  redrawing : Boolean
[read-only]
StyleableSprite
  rootStyle : Object
[write-only] Sets the style properties object.
StyleableSprite
  style : FlowStyleSheet
StyleableSprite
 Inheritedwidth : Number
AbstractSprite
Protected Properties
 PropertyDefined by
  bgImageHolder : Sprite
[read-only]
StyleableSprite
 Inherited_height : Number = 0
The managed height value.
AbstractSprite
  loader : ResourceLoader
[write-only]
StyleableSprite
 Inheritedlog : Log
AbstractSprite
 InheritedmanagedHeight : Number
AbstractSprite
 InheritedmanagedWidth : Number
AbstractSprite
 Inherited_width : Number = 0
The managed width value.
AbstractSprite
Public Methods
 MethodDefined by
  
StyleableSprite(styleName:String = null, errorHandler:ErrorHandler = null, loader:ResourceLoader = null)
Creates a new StyleableSprite.
StyleableSprite
  
addToRootStyle(style:Object):void
StyleableSprite
  
animate(styleProps:Object):Object
StyleableSprite
  
css(styleProps:Object = null):Object
StyleableSprite
 Inherited
draw(event:LayoutEvent):void
AbstractSprite
  
onBeforeAnimate(styleProps:Object):void
Currently just returns the root style object.
StyleableSprite
  
onBeforeCss(styleProps:Object = null):void
StyleableSprite
  
setSize(width:Number, height:Number):void
Redraws the sprite, by calling redraw().
StyleableSprite
Protected Methods
 MethodDefined by
  
createMask():Sprite
Creates a sprite that is equal to the size of this sprite.
StyleableSprite
  
onRedraw():void
Called when the background has been redrawn.
StyleableSprite
 Inherited
onResize():void
AbstractSprite
  
onSetRootStyle(style:Object):void
StyleableSprite
  
onSetStyle(style:FlowStyleSheet):void
StyleableSprite
  
onSetStyleObject(styleName:String, style:Object):void
StyleableSprite
Property detail
bgImageHolderproperty
bgImageHolder:Sprite  [read-only]Implementation
    protected function get bgImageHolder():Sprite
loaderproperty 
loader:ResourceLoader  [write-only]Implementation
    protected function set loader(value:ResourceLoader):void
redrawingproperty 
redrawing:Boolean  [read-only]Implementation
    public function get redrawing():Boolean
rootStyleproperty 
rootStyle:Object  [write-only]

Sets the style properties object. This sprite is redrawn accoring to the new style properties.

Implementation
    public function set rootStyle(value:Object):void

See also

styleproperty 
style:FlowStyleSheet  [read-write]Implementation
    public function get style():FlowStyleSheet
    public function set style(value:FlowStyleSheet):void
Constructor detail
StyleableSprite()constructor
public function StyleableSprite(styleName:String = null, errorHandler:ErrorHandler = null, loader:ResourceLoader = null)

Creates a new StyleableSprite.

Parameters
styleName:String (default = null)
 
errorHandler:ErrorHandler (default = null)
 
loader:ResourceLoader (default = null)
Method detail
addToRootStyle()method
public function addToRootStyle(style:Object):voidParameters
style:Object
animate()method 
public function animate(styleProps:Object):ObjectParameters
styleProps:Object

Returns
Object
createMask()method 
protected function createMask():Sprite

Creates a sprite that is equal to the size of this sprite.

Returns
Sprite — a sprite that can be used as a mask to hide display objects that exceed of go outside the borders of this sprite
css()method 
public function css(styleProps:Object = null):ObjectParameters
styleProps:Object (default = null)

Returns
Object
onBeforeAnimate()method 
public function onBeforeAnimate(styleProps:Object):void

Currently just returns the root style object.

Parameters
styleProps:Object
onBeforeCss()method 
public function onBeforeCss(styleProps:Object = null):voidParameters
styleProps:Object (default = null)
onRedraw()method 
protected function onRedraw():void

Called when the background has been redrawn.

onSetRootStyle()method 
protected function onSetRootStyle(style:Object):voidParameters
style:Object
onSetStyle()method 
protected function onSetStyle(style:FlowStyleSheet):voidParameters
style:FlowStyleSheet
onSetStyleObject()method 
protected function onSetStyleObject(styleName:String, style:Object):voidParameters
styleName:String
 
style:Object
setSize()method 
public override function setSize(width:Number, height:Number):void

Redraws the sprite, by calling redraw(). Overriding method should call either super.onResize() to properly have the background occupy the who space.

Parameters
width:Number
 
height:Number