home *** CD-ROM | disk | FTP | other *** search
- class TitleCard extends Library.State
- {
- var mcRef;
- static var sSTATE_IN = "In";
- static var sSTATE_IDLE = "Idle";
- static var sSTATE_OUT = "Out";
- function TitleCard(_mcRef)
- {
- super(_mcRef);
- this.setState(TitleCard.sSTATE_IN);
- Main.Instance.doAddListener(this);
- }
- function doIn()
- {
- if(this.isStateComplete())
- {
- this.setState(TitleCard.sSTATE_IDLE);
- }
- }
- function doIdle()
- {
- if(this.isStateComplete())
- {
- this.setState(TitleCard.sSTATE_OUT);
- }
- }
- function doOut()
- {
- if(this.isStateComplete())
- {
- Main.Instance.onTitleCardComplete();
- Main.Instance.doRemoveListener(this);
- delete this.mcRef;
- }
- }
- }
-