Sliding/moving buttons

in the game like zombieville the buttons slide in the screen. The buttons come on the screen and than stay still. How was that done? Any help for that?

Just some stolen code from an interface I did, I had up/down/left/right/popon animations…

function animate()
{
	// Animate in from the left
	if (animsInFromLeft){
		guiTexture.pixelInset.x += animSpeed;
		
		// Check to see if we've hit our spot
		if (guiTexture.pixelInset.x>x_pos)
		{
			// Force it to go to its final resting place, then turn off animation
			guiTexture.pixelInset.x = x_pos;
			animFinished = true;			
		}
	}
}

it’s a bit sloppy but works a treat :slight_smile: can also be done with transform instead of pixel insets.[/code]

thanks!
that is awesome!