Permalink
Browse files

Show num clicks from the start.

  • Loading branch information...
1 parent 0ede767 commit 4d38704d499240e229a8f7f64e61d359e5d38c49 Wolfram Kriesing committed Dec 13, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 example/library/movies/event-click.js
@@ -14,15 +14,18 @@ stage.addChild(rectPath);
rectPath.on('click', function(data){
- counts.click++; updateCountsText();
+ counts.click++;
+ updateCountsText();
if (++index == colors.length) index = 0;
rectPath.attr({fillColor: colors[index]});
});
rectPath.on('pointerdown', function(data){
- counts.pointerdown++; updateCountsText();
+ counts.pointerdown++;
+ updateCountsText();
});
rectPath.on('pointerup', function(data){
- counts.pointerup++; updateCountsText();
+ counts.pointerup++;
+ updateCountsText();
});
var t = new Text().attr({x: 100, y: 10});
@@ -35,3 +38,4 @@ var counts = {
function updateCountsText() {
t.attr({text: 'counts: ' + JSON.stringify(counts)});
}
+updateCountsText();

0 comments on commit 4d38704

Please sign in to comment.