I'm having some troubles with a function that gets called on the onComplete handler of TweenMax. Here's some code
// in some method
if (_gameOverScreen) {
TweenMax.to(_gameOverScreen, 0.55, {
alpha:0,
onComplete:removeSprite,
onCompleteParams:[_gameOverScreen, _gameContainer],
ease:Expo.easeOut
});
}
private function removeSprite(target:*, holder:*):void {
holder.removeChild(target);
target = null;
}
The problem is that the actual _gameOverScreen, which is passed to the parameters of the removeSprite method, doesn't get null.
Am I doing something wrong here?
Thanks in advance,
Dimitris