On Move Complete

Do something when an object reaches its destination

When SceneObjects reach their destination, their onMoveComplete function is executed (if they have one).
App = function() { this.load = function() { wade.loadImage('/snippets/samples/cc_logo.png'); }; this.init = function() { // create a sprite var sprite = new Sprite('/snippets/samples/cc_logo.png'); // create a scene object with that sprite var logo = new SceneObject(sprite); // add the object to the scene wade.addSceneObject(logo); // move the object logo.moveTo(150, 100, 100); // when it's finished moving, rotate it logo.onMoveComplete = function() { logo.setRotation(0.7); // rotation is in radians }; }; };
Your code was executed successfully!