File: example.htm

Recommend this page to a friend!
  Classes of JImmy Bo   Spritesheet Animation Manager   example.htm   Download  
File: example.htm
Role: Auxiliary script
Content type: text/plain
Description: Example Usage
Class: Spritesheet Animation Manager
Animate graphics using CSS sprites
Author: By
Last change: sample image fix
Date: 10 years ago
Size: 983 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML> <html> <head> <title>Javascript Spritesheet Animation Manager :: SAM</title> <!-- some jQuery --> <script src="https://code.jquery.com/jquery-2.1.0.min.js" language="Javascript"></script> <!-- load our class --> <script src='class.spritesheet_animation_manager.js'></script> <style> /* // attach spritesheet to whatever you want the spriteset to be attached. // so even though we may be controlling different elements, they can share the // spriteset... */ .spritesheet.bard { background:url('example.bard.png'); /* check out http://opengameart.org/content/more-nes-style-rpg-characters for allowed usage */ background-position:0px 0px; overflow:hidden; margin:0px; padding:0px; } </style> </head> <body> <div class='spritesheet bard player'></div> <!-- load our example --> <script src='example.js'></script> </body> </html>