- Select manual -


This example shows how to put one sprite in front of another

z order

There is one game object containing the background sprite. It is set at Z position 0. The bunny is another game object containing a sprite. The bunny game object is at Z position 1.


function init(self)
    go.animate(".", "position.x", go.PLAYBACK_LOOP_PINGPONG, 600, go.EASING_INOUTSINE, 3) 
  1. Animate the game object’s ("." is shorthand for the current game object) x position between start position and 600.

If you want to play with these examples, you can get the project on Github.

Do you want to see more examples? Why not write a few yourself and submit a pull request? We love contributions.