ChromeContainer

Kind of class: public class
Package:
Inherits from:
  • Sprite
Version: 10 Sep 2010
Author: John Polacek, john@johnpolacek.com
Classpath: com.johnpolacek.container.ChromeContainer
File last modified: Friday, 12 November 2010, 15:34:14
The ChromeContainer class is used to display sprites inside a RectangleGradientShape
Example

  • Create a simple chrome button
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import com.johnpolacek.container.ChromeContainer;
    var tf:TextField = new TextField();
    tf.autoSize = TextFieldAutoSize.LEFT;
    tf.text = "Click Me!";
    var buttonGraphic:ChromeContainer = new ChromeContainer();
    buttonGraphic.paddingTop = buttonGraphic.paddingBottom = 5;
    buttonGraphic.contain(tf);
    addChild(buttonGraphic);
    

Summary

Constructor
Instance properties
Instance methods
  • contain (sprite:DisplayObject, spriteX:int, spriteY:int) : void

Constructor

ChromeContainer

function ChromeContainer()

Instance properties

alignToCenter

alignToCenter:Boolean(read,write)

fillAlpha1

fillAlpha1:int(read,write)

fillAlpha2

fillAlpha2:int(read,write)

fillColor1

fillColor1:int(read,write)

fillColor2

fillColor2:int(read,write)

gradientRotation

gradientRotation:int(read,write)

padding

padding:int(read,write)

paddingBottom

paddingBottom:int(read,write)

paddingLeft

paddingLeft:int(read,write)

paddingRight

paddingRight:int(read,write)

paddingTop

paddingTop:int(read,write)

roundedCornerAmount

roundedCornerAmount:int(read,write)

strokeAlpha

strokeAlpha:int(read,write)

strokeColor

strokeColor:int(read,write)

strokeThickness

strokeThickness:int(read,write)

Instance methods

contain

function contain(sprite:DisplayObject, spriteX:int, spriteY:int) : void