Skip to content

Instantly share code, notes, and snippets.

@mattrobenolt
Created August 4, 2011 15:20
Show Gist options
  • Save mattrobenolt/1125427 to your computer and use it in GitHub Desktop.
Save mattrobenolt/1125427 to your computer and use it in GitHub Desktop.
$('#sprite_once').sprite({
speed: 50,
frames: 72,
columns: 9,
mode: 'once',
onStep: function(e)
{
$(this).nextAll('.status').text(e.step);
},
onComplete: function()
{
$(this).nextAll('.status').text('');
}
});
$('#sprite_bounce').sprite({
speed: 50,
frames: 72,
columns: 9,
mode: 'bounce',
onStep: function(e)
{
$(this).nextAll('.status').text(e.step);
}
});
$('#sprite_loop').sprite({
size: [48, 92],
speed: 50,
frames: 72,
columns: 9,
mode: 'loop',
onStep: function(e)
{
$(this).nextAll('.status').text(e.step);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment