Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoonBase intro animation #4

Open
JFrankfurt opened this issue Jan 31, 2015 · 1 comment
Open

MoonBase intro animation #4

JFrankfurt opened this issue Jan 31, 2015 · 1 comment

Comments

@JFrankfurt
Copy link
Owner

We've got our intro video in mp4, but there doesn't appear to be an easy way to integrate this via Phaser's library (Nothing in docs). If there is, google searches up to now have not revealed how. ("phaser intro video mp4" tends to provide you with introduction to phaser videos, not how-to videos on giving your game an intro.)

Consider playing the video at game scale with html5 video element, then killing the DOM node after it's completed with JS and rendering the game's canvas element.

@JFrankfurt
Copy link
Owner Author

Messy solution mentioned above implemented.

There are two dom elements used here, an html5 video tag and a z-index=-1 black box to compensate for the fact that our video is not the same size as our game. Both are removed with a setTimeout() after 3.3 seconds.

Moved the audio to an html5 tag, which causes the music to start playing from the instant the page loads, instead of when the game loads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant