Is it a bad idea to resize the div containing my openfl app outside of haxe?

Hi,

My app* should run in a 1024 x 768 box. When the user’s screen is smaller than this, what is the best strategy?:

  1. Resize the div outside of Haxe, via CSS?
  2. Resize visual elements dynamically?

I worry that performance would take a hit if I went with option 1. But it would be a lot easier to implement!

Many thanks,
Andy.

*we’re creating opensource software to let scientists run behavioural studies on the web / devices / toaster.

There are multiple ways to handle this via code. The easiest is to scale Lib.current. The second- and third-easiest options are the two offered by Advanced Layout, and the fourth is Joshua’s old Layout library.

try using a window width of what you want, it should already resize the div to fit the screen and scale by default :wink: