Skip to content

Commit 4191770

Browse files
author
Lanny McNie
committed
Updated Tutorials to latest version.
Signed-off-by: Lanny McNie <lanny@gskinner.com>
1 parent 0982970 commit 4191770

File tree

22 files changed

+63
-57
lines changed

22 files changed

+63
-57
lines changed

tutorials/Animation and Ticker/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1>EaselJS: Animation and Ticker</h1>
2121
<p>
2222
<strong>Synopsis:</strong> Create a simple programmatic animation, and learn about the Ticker class.<br>
2323
<strong>Topics:</strong> animation, Ticker, setFPS, timingMode, getTime, setPaused, requestAnimationFrame, Stage.update, time based animation<br>
24-
<strong>Target:</strong> EaselJS v0.7.0
24+
<strong>Target:</strong> EaselJS v0.6.0 and above
2525
</p>
2626
</header>
2727
<p class="highlight">

tutorials/Animation and Ticker/onTick.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
<head>
44
<title>EaselJS demo: DisplayObject.onTick</title>
55
<link href="../_shared/demo.css" rel="stylesheet" type="text/css">
6-
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
6+
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
77
<script>
88

99
var stage, circle;
10+
1011
function init() {
1112
stage = new createjs.Stage("demoCanvas");
1213

@@ -17,19 +18,20 @@
1718

1819
// Stage will pass delta when it calls stage.update(arg)
1920
// which will pass them to tick event handlers for us in time based animation.
20-
circle.addEventListener("tick", function(event) {
21+
circle.on("tick", function(event) {
2122
var tickerEvent = event.params[0];
2223
var delta = tickerEvent.delta;
2324
circle.x += delta/1000*100;
2425
if (circle.x > stage.canvas.width) { circle.x = 0; }
25-
})
26+
});
2627

27-
createjs.Ticker.addEventListener("tick", tick);
28+
createjs.Ticker.on("tick", tick);
2829
}
2930

3031
function tick(event) {
3132
stage.update(event);
3233
}
34+
3335
</script>
3436
</head>
3537
<body onLoad="init();">

tutorials/Animation and Ticker/pausing.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EaselJS demo: Ticker.setPaused()</title>
55
<link href="../_shared/demo.css" rel="stylesheet" type="text/css">
6-
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
6+
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
77
<script>
88

99
var stage, pauseCircle, goCircle, output;
@@ -22,7 +22,7 @@
2222
stage.addChild(goCircle);
2323

2424
// and register our main listener
25-
createjs.Ticker.addEventListener("tick", tick);
25+
createjs.Ticker.on("tick", tick);
2626

2727
// UI code:
2828
output = stage.addChild(new createjs.Text("", "14px monospace", "#000"));

tutorials/Animation and Ticker/simple.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
<head>
44
<title>EaselJS demo: Simple animation</title>
55
<link href="../_shared/demo.css" rel="stylesheet" type="text/css">
6-
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
6+
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
77
<script>
88

99
var stage, circle;
10+
1011
function init() {
1112
stage = new createjs.Stage("demoCanvas");
1213

@@ -15,7 +16,7 @@
1516
circle.y = 50;
1617
stage.addChild(circle);
1718

18-
createjs.Ticker.addEventListener("tick", tick);
19+
createjs.Ticker.on("tick", tick);
1920
createjs.Ticker.setFPS(30);
2021
}
2122

tutorials/Animation and Ticker/timeBased.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
<head>
44
<title>EaselJS demo: Time based animation</title>
55
<link href="../_shared/demo.css" rel="stylesheet" type="text/css">
6-
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
6+
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
77
<script>
88

99
var stage, timeCircle, tickCircle;
10+
1011
function init() {
1112
stage = new createjs.Stage("demoCanvas");
1213

@@ -20,7 +21,7 @@
2021
tickCircle.y = 150;
2122
stage.addChild(tickCircle);
2223

23-
createjs.Ticker.addEventListener("tick", tick);
24+
createjs.Ticker.on("tick", tick);
2425
createjs.Ticker.setFPS(20);
2526
}
2627

tutorials/Fonts/GoogleWebFont.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link href="../_shared/demo.css" rel="stylesheet" type="text/css">
88
<link href='http://fonts.googleapis.com/css?family=Dorsa' rel='stylesheet' type='text/css'>
99
<script src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
10-
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
10+
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
1111
<script type="text/javascript">
1212
WebFont.load({
1313
google: {
@@ -39,7 +39,7 @@
3939

4040
stage.addChild(txt);
4141
stage.update();
42-
createjs.Ticker.addEventListener("tick", tick);
42+
createjs.Ticker.on("tick", tick);
4343
}
4444

4545
function tick() {

tutorials/Getting Started/demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EaselJS demo: Getting started</title>
55
<link href="../_shared/demo.css" rel="stylesheet" type="text/css">
6-
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
6+
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
77
<script>
88
function init() {
99
var stage = new createjs.Stage("demoCanvas");

tutorials/Getting Started/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1>EaselJS: Getting Started</h1>
2121
<p>
2222
<strong>Synopsis:</strong> Set up an HTML document with a canvas tag and the EaselJS libraries, and draw a shape to the stage.<br>
2323
<strong>Topics:</strong> linking libraries, Stage, Shape, addChild, Stage.update(), CDN, source files<br>
24-
<strong>Target:</strong> EaselJS v0.6.0
24+
<strong>Target:</strong> EaselJS v0.7.0
2525
</p>
2626
</header>
2727
<p class="highlight">
@@ -40,7 +40,7 @@ <h2>Setting up your html document</h2>
4040
<!DOCTYPE html>
4141
<html>
4242
<head>
43-
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
43+
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
4444
<script>
4545
function init() {
4646
// code here.

tutorials/HitTest/globalToLocal.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EaselJS demo: globalToLocal</title>
55
<link href="../_shared/demo.css" rel="stylesheet" type="text/css">
6-
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
6+
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
77
<script>
88
var stage, holder;
99
function init() {
@@ -19,7 +19,7 @@
1919
holder.addChild(shape);
2020
}
2121

22-
createjs.Ticker.addEventListener("tick", tick);
22+
createjs.Ticker.on("tick", tick);
2323
}
2424

2525
function tick(event) {

tutorials/HitTest/hitTest.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>EaselJS demo: hitTest</title>
55
<link href="../_shared/demo.css" rel="stylesheet" type="text/css">
6-
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
6+
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
77
<script>
88
var stage, circle;
99
function init() {
@@ -14,7 +14,7 @@
1414
circle.x = 0;
1515
circle.y = 0;
1616

17-
createjs.Ticker.addEventListener("tick", tick);
17+
createjs.Ticker.on("tick", tick);
1818
}
1919

2020
function tick(event) {

0 commit comments

Comments
 (0)