moveSprite(layer,id,x,y) , method of scene

Move a sprite on this layer of the world.

name type description
layer int layer of the world (must be >= 0)
id int identifier of the sprite (must be >= 0)
x num x the x-coordinate of the new location.
y num y the y-coordinate of the new location.

moveSprite cannot be used with a LineSegment; use reshapeSprite instead.

// move the Sprite 1 on layer 0 to (100,200)

See all methods of the api.