In my previous post I wrote about how I encountered a few issues implementing a very basic stage setup for my Haxe library and explained how I solved a particular type error. In this post I'm going to show how I made a "fullscreen" HTML application, using the normal compile process NME provides.
The NME compiler uses a *.nmml document for various target settings, including the window size of your applications. So my first guess to make my HTML programm fill the entire browser was to specify the width and height in the application.nmml to 100% like I would do in CSS/HTML.
<window width="600" height="480" if="flash" />
<window width="???" height="???" if="html5" /> <!-- how 100%? only INT allowed ... -->
But using the % character causes errors when compiling for HTML. Another way would be to simply change the generated index.html but although the index might not need to be generated, it will be every time you compile and replaces any change you might have made. Not so cool :|
<div id="haxe:jeash"
style="background-color: #FFFFFF; width: 100%; height: 100%"
data-framerate="60">
</div>
Maybe there is a way to prevent the compiler from replacing your
index.html but ideally I would be able to change the dimesion at runtime
anyway.