-
Notifications
You must be signed in to change notification settings - Fork 6
Customizing the embed page and size
Flambe uses a default page
to embed the game, if one isn't provided. You can provide one by copying that file to web/index.html
in your project directory and customizing it.
The size of the game stage is controlled with CSS. To always make the game a certain size, change the #content CSS sizing in the default embed page (and remove the media query that goes fullscreen on small screens).
More about dealing with different screensizes, read Responsive game
The order of the array matters.
// prioritizes flash over html
flambe.embed(["targets/main-flash.swf", "targets/main-html.js"], "content");
// prioritizes html over flash
flambe.embed(["targets/main-html.js", "targets/main-flash.swf"], "content");
If you want to display a message when you have an old FlashPlayer version or non-supported device.
var isEmbedded = flambe.embed(["targets/main-flash.swf", "targets/main-html.js"], "content");
if (!isEmbedded) alert("Sorry, but your browser or flashplayer is too old!");
Documentation guide for Flambe - Targeted to version 4.0+
Flambe | Installation | Demo projects | Showcase | API Reference | Forum
Flambe is MIT licensed and available for free. Feel free to contribute!
- Home / Installation
- Entity / Components
- Core
- Assets
- Publish your game
- Other
- Editors
- Plugins, tools, extensions
- Help
- More Flambe