OpenFL 9.1.0 Release

Hey everyone!

There’s a new version of OpenFL available! A huge thanks to @Dimensionscape and @MSGhero for their awesome work!

Keep building awesome everyone :sunglasses:


  • Updated for Haxe 4.2
  • Added for TCP sockets on native platforms
  • Added for UDP sockets on native platforms
  • Added openfl.utils.ObjectPool
  • Added shape caching to improve TextField rendering performance
  • Migrated OpenFL sources to a simpler package structure for better tooling compatibility
  • Improved Loader to prevent use of addChild/removeChild methods
  • Improved dynamic field access on openfl.utils.Object references
  • Improved handling of new lines and line breaks in TextField
  • Improved handling of layout calculations in TextField
  • Improved the rendering of selected text in TextField
  • Improved the performance when using nested TileContainer instances with Tilemap
  • Fixed an issue where graphics.lineStyle could cause an additoinal draw
  • Fixed a rounding issue that could clip graphics rendering by one pixel
  • Fixed sprite.transform.colorTransform to return a new ColorTransform object
  • Fixed issues rendering some bitmap.scrollRect objects on the HTML5 canvas renderer
  • Fixed issues rendering some gradient fills on HTML5 canvas renderer
  • Fixed an incorrect reference when dispatching some MouseEvent.ROLL_OUT events
  • Fixed renderer remaining active on Tilemap that includes no tiles

Very cool @singmajesty!!

And thank you @Dimensionscape and @MSGhero!


Wow, sounds like a time to upgrade ))

TextField.autoSize stopped working correctly on html5 after I updated the last version:

tf.defaultTextFormat = new TextFormat("Arial", 24, 0xffffff);
tf.autoSize = TextFieldAutoSize.LEFT;
tf.text = "test 1\ntest 2\ntest 3";

Only 2 lines are displayed.
To see line 3, you need to scroll the text field.
Снимок экрана 2021-07-07 в 12.32.08 Снимок экрана 2021-07-07 в 12.32.12

It’s been my experience that you usually should set autoSize after setting the text, not before. Otherwise, there’s nothing for the text field to size itself against.

In normal behavior, this flag is set once and means that the field keeps track of changes and adjusts its size according to the content.

I temporarily solved the problem by adding an extra pixel to the height on line 741 in TextEngine

Definitely there is problem with text.autoSize in this version. I also do some workarounds…

I think that the autoSize issue with the last line being cut off is fixed on Github, so you could potentially install the latest code from there.

1 Like