Skip to content

Instantly share code, notes, and snippets.

@Nek
Created June 19, 2012 19:59
Show Gist options
  • Save Nek/2956195 to your computer and use it in GitHub Desktop.
Save Nek/2956195 to your computer and use it in GitHub Desktop.
Animatron player contains examples
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);
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