| 22 |
|
|
| 23 |
protected var _currentCommandIndex:int; |
protected var _currentCommandIndex:int; |
| 24 |
|
|
| 25 |
protected override function run():void{ |
protected final override function runAsync():void{ |
| 26 |
_currentCommandIndex = 0; |
_currentCommandIndex = 0; |
| 27 |
if( _commands.length > 0 ){ |
if( _commands.length > 0 ){ |
| 28 |
doStartCommands(); |
doStartCommands(); |
| 29 |
} else { |
} else { |
| 30 |
doDoneCommand(); |
doneAsync(); |
| 31 |
} |
} |
| 32 |
} |
} |
| 33 |
|
|
| 34 |
protected override function childCommandCompleteEventHandler(event:CommandEvent):void{ |
protected final override function childCommandCompleteEventHandler(event:CommandEvent):void{ |
| 35 |
_lastCommand = event.command; |
_lastCommand = event.command; |
| 36 |
if( _childCompleteEventListener.handler != null ){ |
if( _childCompleteEventListener.handler != null ){ |
| 37 |
_childCompleteEventListener.handler(event); |
_childCompleteEventListener.handler(event); |
| 49 |
if( _lastCommand is AbstractComplexCommand ){ |
if( _lastCommand is AbstractComplexCommand ){ |
| 50 |
args = _arguments; |
args = _arguments; |
| 51 |
} else { |
} else { |
| 52 |
args = [pendingResult]; |
if( hasPendingResult ){ |
| 53 |
|
args = [pendingResult]; |
| 54 |
|
} else { |
| 55 |
|
args = _arguments; |
| 56 |
|
} |
| 57 |
} |
} |
| 58 |
} |
} |
| 59 |
|
|
| 60 |
doStartCommandAt(_currentCommandIndex,args); |
doStartCommandAt(_currentCommandIndex,args); |
| 61 |
} else { |
} else { |
| 62 |
doDone(); |
completeAsync(); |
| 63 |
} |
} |
| 64 |
} |
} |
| 65 |
|
|
| 66 |
protected override function childCommandErrorEventHandler(event:CommandEvent):void{ |
protected final override function childCommandErrorEventHandler(event:CommandEvent):void{ |
| 67 |
_lastCommand = event.command; |
_lastCommand = event.command; |
| 68 |
if( _childErrorEventListener.handler != null ){ |
if( _childErrorEventListener.handler != null ){ |
| 69 |
_childErrorEventListener.handler(event); |
_childErrorEventListener.handler(event); |
| 70 |
} |
} |
| 71 |
doFailedCommand(event.data); |
faildAsync(event.data); |
| 72 |
} |
} |
| 73 |
|
|
| 74 |
protected function doStartCommands():void{ |
protected final function doStartCommands():void{ |
| 75 |
_currentCommandIndex = 0; |
_currentCommandIndex = 0; |
| 76 |
|
|
| 77 |
doStartCommandAt(_currentCommandIndex,_arguments); |
doStartCommandAt(_currentCommandIndex,_arguments); |