document.write(''); document.writeln(''); document.write(''); document.writeln(''); document.write(''); document.writeln(''); document.write(''); document.writeln(''); document.write(''); document.writeln(''); document.write(''); document.writeln(''); document.write('500x500-draft<\/title>'); document.writeln(''); document.write('<!-- write your code here -->'); document.writeln(''); document.write('<script src="https:\/\/code.createjs.com\/1.0.0\/createjs.min.js"><\/script>'); document.writeln(''); document.write('<script src="500x500-draft.js"><\/script>'); document.writeln(''); document.write('<script>'); document.writeln(''); document.write('var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation;'); document.writeln(''); document.write('function init() {'); document.writeln(''); document.write(' canvas = document.getElementById("canvas");'); document.writeln(''); document.write(' anim_container = document.getElementById("animation_container");'); document.writeln(''); document.write(' dom_overlay_container = document.getElementById("dom_overlay_container");'); document.writeln(''); document.write(' var comp=AdobeAn.getComposition("B357900AE29C40B38EEAD414128525AB");'); document.writeln(''); document.write(' var lib=comp.getLibrary();'); document.writeln(''); document.write(' var loader = new createjs.LoadQueue(false);'); document.writeln(''); document.write(' loader.addEventListener("fileload", function(evt){handleFileLoad(evt,comp)});'); document.writeln(''); document.write(' loader.addEventListener("complete", function(evt){handleComplete(evt,comp)});'); document.writeln(''); document.write(' var lib=comp.getLibrary();'); document.writeln(''); document.write(' loader.loadManifest(lib.properties.manifest);'); document.writeln(''); document.write('}'); document.writeln(''); document.write('function handleFileLoad(evt, comp) {'); document.writeln(''); document.write(' var images=comp.getImages(); '); document.writeln(''); document.write(' if (evt && (evt.item.type == "image")) { images[evt.item.id] = evt.result; } '); document.writeln(''); document.write('}'); document.writeln(''); document.write('function handleComplete(evt,comp) {'); document.writeln(''); document.write(' \/\/This function is always called, irrespective of the content. You can use the variable "stage" after it is created in token create_stage.'); document.writeln(''); document.write(' var lib=comp.getLibrary();'); document.writeln(''); document.write(' var ss=comp.getSpriteSheet();'); document.writeln(''); document.write(' var queue = evt.target;'); document.writeln(''); document.write(' var ssMetadata = lib.ssMetadata;'); document.writeln(''); document.write(' for(i=0; i<ssMetadata.length; i++) {'); document.writeln(''); document.write(' ss[ssMetadata[i].name] = new createjs.SpriteSheet( {"images": [queue.getResult(ssMetadata[i].name)], "frames": ssMetadata[i].frames} )'); document.writeln(''); document.write(' }'); document.writeln(''); document.write(' exportRoot = new lib._500x500Finalcopy();'); document.writeln(''); document.write(' stage = new lib.Stage(canvas); '); document.writeln(''); document.write(' \/\/Registers the "tick" event listener.'); document.writeln(''); document.write(' fnStartAnimation = function() {'); document.writeln(''); document.write(' stage.addChild(exportRoot);'); document.writeln(''); document.write(' createjs.Ticker.framerate = lib.properties.fps;'); document.writeln(''); document.write(' createjs.Ticker.addEventListener("tick", stage);'); document.writeln(''); document.write(' } '); document.writeln(''); document.write(' \/\/Code to support hidpi screens and responsive scaling.'); document.writeln(''); document.write(' AdobeAn.makeResponsive(false,\'both\',false,1,[canvas,anim_container,dom_overlay_container]); '); document.writeln(''); document.write(' AdobeAn.compositionLoaded(lib.properties.id);'); document.writeln(''); document.write(' fnStartAnimation();'); document.writeln(''); document.write('}'); document.writeln(''); document.write('<\/script>'); document.writeln(''); document.write('<!-- write your code here -->'); document.writeln(''); document.write('<\/head>'); document.writeln(''); document.write('<body onload="init();" style="margin:0px;">'); document.writeln(''); document.write(' <div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:200px; height:200px">'); document.writeln(''); document.write(' <canvas id="canvas" width="200" height="200" style="position: absolute; display: block; background-color:rgba(255, 255, 255, 1.00);"><\/canvas>'); document.writeln(''); document.write(' <div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:200px; height:200px; position: absolute; left: 0px; top: 0px; display: block;">'); document.writeln(''); document.write(' <\/div>'); document.writeln(''); document.write(' <\/div>'); document.writeln(''); document.write('<\/body>'); document.writeln(''); document.write('<\/html>');