Represents the interface for normal bidding (nil to 13). It uses an embedded movie with
predefined button objects within it. Buttons are simply hidden when they are not clickable.
protected var _buttonNamePrefix:String
protected var _maxBid:int
protected var _movie:DisplayObjectContainer
public function NormalBiddingSprite(bids:Bids, movie:Class, buttonZeroName:String, labelColor:uint, labelBottom:int, fudgeOffset:int) Create a new interface.
Parameters
| bids:Bids — allows the sprite to update automatically when it is time to bid (or not)
|
| |
| movie:Class — the embedded movie object containing all the buttons for bidding
|
| |
| buttonZeroName:String — the name of the zeroth button; other button names are computed
from this name by replacing the "0" with the desired number
|
| |
| labelColor:uint — the outline color of the "Select your bid" text
|
| |
| labelBottom:int — the vertical offset of the bottom of the label text above the movie
|
| |
| fudgeOffset:int — the slight horizontal offset necessary to center the movie (we think this
may be necessary due to shadows, but it looks better with it |
protected function bidListener(event:BidEvent):voidParameters
protected function buttonName(number:int):String Retrieve the name of a button for a given bid value.
Parameters
Returns
protected function buttonNumber(name:String):int Retrieve the number of a button of a given name.
Parameters
Returns
protected function clickListener(event:MouseEvent):void Dispatch a click on a bid to the game model.
Parameters
protected function getButton(num:int):SimpleButton Get the button for a given bid amount.
Parameters
Returns
protected function setMaxBid(max:int):voidParameters
protected function setupButtons():void Add all the button listeners and take into account the maximum bid.
protected static const NUM_BUTTONS:int = 14