Does anyone know where the events for orientationchange and resizing are? Looked under System and Browser objects.
Please dont tell me one has to poll the screen width/height every tick - in an event driven framework this would be crazy....
Develop games in your browser. Powerful, performant & highly capable.
I've been looking for the same thing. I thought I saw it one time, so in my planning I didn't look again, but I guess it doesn't exist :(
The polling of current screen width to a global variable that stored the last screen size is working for me accept for when the window is maximized, then it freaks out :(
of course, it could just be that my brain has shut down for the day and I'm missing something. I'll give it another go tomorrow.
Is System -> Set Canvas Size what you were looking for?
For orientation, you can try and use the Touch's Gamma values to detect what orientation you're on, and then use the rotation of layers to compensate. If you're confused, go into System's "Compare two values" to access an object's variable.
I guess 'on size' is missing from the Browser object, will try to add for next build.
Brockatkinson, what is the canvas, and how does it relate to the projects "Window size"? Canvas is not in the manual, unfortunately. I have seen viewport mentioned a few times also, but cant find any reference to it. Are they different?
Any tips appreciated!