Change lime embed size at runtime

Hello, I would like to know if it is possible to modify the width and height properties of the Lime canvas at runtime, so that it changes when the orientation of the mobile phone is changed, for example. My current dimensions now in the tag are the same even if I change the canvas size, and I cannot modify them from haxe.

This is the way Im trying to modify the canvas but it doesn’t work.

var canvas:CanvasElement = cast Browser.document.getElementById(“openfl-content”).firstChild;
canvas.width = 1280;
canvas.height = 720;

Even if that worked you would need logic to accommodate for the change.

When I have to work with multiple resolutions and “responsive” games I usually set the width and height of the game to zero in the Project.xml.

Then you hear for the event Event.RESIZE of Stage and then you do your logic to process the new size of the game.

The actual size of the screen can be taken from stage.stageWidth and stage.stageHeight