Skip to content

Instantly share code, notes, and snippets.

@ekelokorpi
Created November 11, 2014 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekelokorpi/a76dfc148bf92eb840e0 to your computer and use it in GitHub Desktop.
Save ekelokorpi/a76dfc148bf92eb840e0 to your computer and use it in GitHub Desktop.
Video: Basic usage
var video = new game.Video('video.mp4');
video.sprite.anchor.set(0.5, 0.5);
video.sprite.position.set(game.system.width / 2, game.system.height / 2);
video.sprite.addTo(this.stage);
video.onLoaded(function() {
// Video loaded
});
video.onComplete(function() {
// Video complete
});
video.play();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment