Represents a card graphic with a few appearance flags. It relies on an embedded movie
object where each frame in the movie is a card. The names of the frames must match the
short names provided by the Card class.
card:Card [read-only]
Access the underlying card object.
Implementation
public function get card():Card
protected var _cover:Sprite
protected var _deck:MovieClip
protected var _height:int
protected var _id:int
public static var nextSpriteId:int = 0 For debugging, give each card sprite a unique id.
protected var _state:CardState
state:CardState [read-write]
Access to the card's highlight state.
Implementation
public function get state():CardState
public function set state(value:CardState):void
protected var _width:int
public function CardSprite(card:Card, deck:Class, width:int, height:int) Create a new card sprite.
Parameters
| card:Card |
| |
| deck:Class |
| |
| width:int |
| |
| height:int |
protected function gotDeck(clip:MovieClip):voidParameters
public override function toString():String
Returns
protected function update():void
protected static const BACK_FRAME:String = "CB"
public static const DISABLED:CardState Disabled appearance
public static const EMPHASIZED:CardState Emphasized appearance
public static const HIGHLIGHTED:CardState Highlighted appearance
public static const NORMAL:CardState Normal appearance