$CENTER_STYLE $CREATEJS_LIBRARY_SCRIPTS $ANIMATE_CC_SCRIPTS $SCRIPT_START var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation; function init() { canvas = document.getElementById("$CANVAS_ID"); anim_container = document.getElementById("$ANIM_CONTAINER_ID"); dom_overlay_container = document.getElementById("dom_overlay_container"); $CREATE_LOADER $LOAD_MANIFEST $PRELOAD_ASSETS } $HANDLE_FILE_LOAD_START $HANDLE_FILE_LOAD_BODY $HANDLE_FILE_LOAD_END $HANDLE_COMPLETE_START //This function is always called, irrespective of the content. You can use the variable "stage" after it is created in token create_stage. $CREATE_STAGE var game = new Game( lib, stage ); //Registers the "tick" event listener. fnStartAnimation = function() { createjs.Ticker.setFPS(lib.properties.fps); createjs.Ticker.addEventListener("tick", stage); game.start(); } //Code to support hidpi screens and responsive scaling. // No. $HANDLE_COMPLETE_END $PLAYSOUND $SCRIPT_END