Created
June 19, 2012 19:59
-
-
Save Nek/2956195 to your computer and use it in GitHub Desktop.
Animatron player contains examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var circleOne = b('c1').circle([0, 0], 30) | |
.trans([0, 3], [[0, 200], [400, 200]]); | |
var handler = function (evt) { | |
console.log("SCENE CLICKED"); | |
if (this.$.contains(evt.pos)) { | |
console.log("CIRCLE CLICKED"); | |
} | |
}; | |
circleOne.on(C.X_MCLICK, handler); | |
return b().add(circleOne); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var circleOne = b('c1').circle([0, 0], 30) | |
.trans([0, 3], [[0, 200], [400, 200]]); | |
var handler = function (evt, time) { | |
console.log("SCENE CLICKED"); | |
if (this.$.contains(evt.pos, time)) { | |
console.log("CIRCLE CLICKED"); | |
} | |
}; | |
circleOne.on(C.X_MCLICK, handler); | |
return b().add(circleOne); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment