The Createjs library file that needs to be introduced in the HTML5 file is Easeljs-0.7.1.min.js
The HTML5 file is as follows:
1 <!DOCTYPE HTML>2 <HTMLLang= "en">3 <Head>4 <MetaCharSet= "UTF-8">5 <title>1, Createjs Introduction-easeljs</title>6 <Scriptsrc= "Easeljs-0.7.1.min.js"></Script>7 </Head>8 <Body>9 <CanvasID= "Gameview"width= "400px"Height= "400px"style= "Background-color: #cccccc;"></Canvas>Ten <Scriptsrc= "App.js"></Script> One </Body> A </HTML>
The source code for the App.js file introduced in the HTML5 file is as follows:
1 /**2 * Create 1, Createjs introduction-easeljs-app.js by DPP on 2016/1/43 * @authors Your Name ([email protected])4 * @date 2016-01-04 01:06:545 * @version $Id $6 */7 8 varstage =NewCreatejs. Stage (' Gameview ');9 Ten varText =NewCreatejs. Text (' Hello easeljs ', ' 36px Arial ', ' #777 '); One A stage.addchild (text); - -Stage.update ();
Example "1, Createjs Introduction-easeljs" Source Address: https://github.com/daipianpian/CreateJS-Study/tree/master/1%E3%80%81CreateJS%E4% Bb%8b%e7%bb%8d/l01_easeljs
1, Createjs Introduction-easeljs