続きです。
②プログラミング
1.新規プロジェクトを選択します。
2.Hello Worldアプリの選択ボタンを選択します。
3.プロジェクト名を入れて(ここでは前章 その1とします)、プロジェクトを作成するを選択します。
4.すべてのプロジェクトに前章 その1が表示されるので、
そのプロジェクトの開くを選択します。
5.画面が表示されるので以下のコードを入力します。
↓↓↓↓↓ ここから ↓↓↓↓↓
<!DOCTYPE HTML>
<html lang="ja">
<head>
<meta charset="UTF-8">
<!-- ネットワークのcreatejsのファイル -->
<script src="https://code.createjs.com/easeljs-0.6.0.min.js"></script>
<title>zensyo(1)</title>
</head>
<body>
<canvas id="main" height="300" width="300"></canvas>
<script>
/*
easeljs-0.6.0.min.js
The MIT License (MIT)
Copyright (c) 2013 gskinner.com
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
window.onload = function()
{
var canvas;
var stage;
var circle;
// <canvas id="???"> の???を指定してcanvasを取得
canvas = document.getElementById("main");
stage = new createjs.Stage(canvas);
circle = new createjs.Shape();
circle.graphics.beginFill('green').drawCircle(0, 0, 150);
circle.y = 150;
circle.x = 150;
stage.addChild(circle);
stage.update();
}
</script>
</body>
</html>
↑↑↑↑↑ ここまで ↑↑↑↑↑
6.保存を選択します。
②プログラミングはここまでです。
③ブラウザによる確認
1.Previewに以下のようなものが表示されていればOKです。
できた!!
③ブラウザによる確認はここまでです。
お疲れ様でした。