isfuturebright Posted November 27, 2013 Share Posted November 27, 2013 I saw the animations have a onComplete function that it's called when this event is fired. How would I set up this? Link to comment Share on other sites More sharing options...
hackenstein Posted November 27, 2013 Share Posted November 27, 2013 You mean something like this?sprite.events.onAnimationComplete.add( yourFunction, yourContext); isfuturebright 1 Link to comment Share on other sites More sharing options...
isfuturebright Posted November 27, 2013 Author Share Posted November 27, 2013 Oh, awesome. Didn't know about those! Worked like a charm! Thanks hackenstein 1 Link to comment Share on other sites More sharing options...
rodrigezer Posted December 18, 2013 Share Posted December 18, 2013 You mean something like this?sprite.events.onAnimationComplete.add( yourFunction, yourContext); why doesn't work it? player.animations.add('run') player.animations.play('run', 12, false, true); player.animations.onAnimationComplete.add(function(){ console.log("complete") }, this); Link to comment Share on other sites More sharing options...
powerfear Posted December 18, 2013 Share Posted December 18, 2013 @rodrigezer player.events.onAnimationComplete.add(function(){ console.log("complete")}, this); Link to comment Share on other sites More sharing options...
Recommended Posts