<!DOCTYPE HTML><HTML><Head> <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"/> <Metaname= "Viewport"content= "width=device-width; initial-scale=1.0"> <Metaname= "Viewport"content= "Height=device-height, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"> <Scripttype= "Text/javascript"src= "Easeljs-0.7.1.min.js"></Script> <Scripttype= "Text/javascript"src= "Play.js"></Script></Head><Bodyonload= "init ()"style= "height:100%"> <CanvasID= "MyCanvas"width= ' + 'Height= ' + '> </Canvas></Body></HTML>
Play.js
Window.onload = function () { init ();} var init = function () { var canvas = document.getElementById ("MyCanvas");//Get canvas, note the need to set the height and width. var stage = new Createjs. Stage ("MyCanvas");//Create Welcomewords=stage.addchild (new Createjs). Text ("Color block War", "Bolder" +font+ "px Aria", "#ccc")). Set ({ x:bounds.width/2*0.8, y:bounds.height/2*0.8, LINEHEIGHT:50, name: "Welcomewords", visible:false });//Create child element Stage.addchild (welcomewords);// adding elements
Stage.update (); }
Easeljs Small Test