topical media & game development

talk show tell print

mobile-graphic-enchant-examples-developers-sprites-main.js / js



  enchant();
  
  window.onload = function(){
      var core = new Game(320, 320);
      core.preload('mobile-graphic-enchant-examples-developers-sprites-chara1.png', 'mobile-graphic-enchant-examples-developers-sprites-icon0.png')
      core.onload = function(){
  
          var bear = new enchant.Sprite(32, 32);
          bear.image = core.assets['mobile-graphic-enchant-examples-developers-sprites-chara1.png'];
          bear.moveTo(144, 144);
          core.rootScene.addChild(bear);
  
          var apple = new enchant.Sprite(16, 16);
          apple.image = core.assets['mobile-graphic-enchant-examples-developers-sprites-icon0.png'];
          apple.frame = 15;
          apple.moveTo(180, 152);
          core.rootScene.addChild(apple);
      };
      core.start();
  };


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.