engine = new Engine(document.getElementById(gamescreen), document.getElementById(backbuffer)); //load the loader - var fileref = document.createElement('script') fileref.setAttribute("type", "text/javascript") fileref.setAttribute("src", "/assets/loader/loaderSprite.js"); var loader = loaderSprite_Sprite(engine); //load the sprites fileref = document.createElement('script') fileref.setAttribute("type", "text/javascript") fileref.setAttribute("src", "/assets/" + spriteid1 + "/" + spriteid1 + ".js"); fileref = document.createElement('script'); fileref.setAttribute("type", "text/javascript") fileref.setAttribute("src", "/assets/" + spriteid2 + "/" + spriteid2 + ".js"); var scene = new Sprite(); scene.setSpriteType("backdrop"); scene.setup(ga); var bdImage = []; bdImage.push(new Frame(0, 0, 512, 860, 0)); //todo: no one loves magick numbers. scene.defineSequence("backdrop", "assets/" + backDrop + "/" + backdrop + ".png", bdImage, playInfinite); ga.setBackDrop(backDrop); //create the sprites var callme = spriteid1 + "_Sprite(ga);"; fighter1 = eval(callme); //put fighter 1 in the left position fighter1.setTop(ga.getCanvasHeight() * .5); fighter1.setLeft(ga.getCanvasHeight() * .2); callme = spriteid2 + "_Sprite(ga);"; fighter2 = eval(callme); //put figher 2 in the right position fighter2.setTop(ga.getCanvasHeight() * .5); fighter2.setLeft(ga.getCanvasHeight() * .7); fighter2.setSpriteXDirection(SPRITE_INVERTED); //todo: load skill sprites buttons var loadCheck = []; loadCheck.push(fighter1); loadCheck.push(fighter2); loadCheck.push(backDrop); ga.defineSprite(loader); //todo: push sprite skills buttons loaderInterval = setInterval(function(){ ShowLoader(loader,loadCheck);},1);