发现乱码?点我试试!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>ޱĵ</title> </head> <body> <canvas id="gameCanvas" /> </body> <script src="http://files.cnblogs.com/Cson/cnGame_v1.0.js" type="text/javascript" ></script> <script type="text/javascript"> document.createElement("canvas"); var Src="http://pic002.cnblogs.com/images/2012/273330/2012021312050269.png"; /* ʼ */ cnGame.init('gameCanvas',{width:50,height:60}); var gameObj={ initialize:function(){ this.marie=cnGame.SpriteSheet("marie",Src,{frameSize:[50,60],width:150,height:60,loop:true}); }, update:function(){ this.marie.update(); }, draw:function(){ this.marie.draw(); } } cnGame.loader.start([Src],gameObj); </script> </html>