moving/resizing game window

165 views
Skip to first unread message

Chase de Languillette

unread,
Jun 18, 2015, 7:11:40 PM6/18/15
to haxef...@googlegroups.com
Is it possible to move the game window programmatically at runtime?  (running the game via lime test mac)

I stumbled upon this snippet on the internet, but it won't compile for me - 
openfl.Lib.application.window.move(x,y);

error - 
Class<openfl._legacy.Lib> has no field application

is there some other way to move the window? while I'm at it, is there a way to resize the window programmatically?

Ohmnivore

unread,
Jun 19, 2015, 7:37:07 PM6/19/15
to haxef...@googlegroups.com
Here's the source: https://github.com/openfl/openfl/blob/master/openfl/Lib.hx

As you can see the whole code is replace by a single line: "typedef Lib = openfl._legacy.Lib;" if the "openfl_legacy" haxedefine is passed. This probably has to do with OpenFL next (aka 3.0) vs the old OpenFL. The code you're using is possibly written for OpenFL 3.

Ohmnivore

unread,
Jun 19, 2015, 7:40:13 PM6/19/15
to haxef...@googlegroups.com
Looking at openfl._legacy.Lib we can see that the application field is only defined if the "lime_hybrid" haxedefine is present. I suggest looking into how to compile your Flixel project using OpenFL 3 or its hybrid option.
Reply all
Reply to author
Forward
0 new messages