OpenFL 8.2 Released

OpenFL 8.2 has been released! Here’s a list of recent changes:

OpenFL

8.2.0 (06/01/2018)

  • Updated to Lime 6.4.*
  • Updated file-saverjs dependency on NPM to file-saver
  • Updated to avoid implements Dynamic since it is being removed in Haxe 4
  • Added ES6 modules (as an alternative to the default CommonJS modules)
  • Added openfl.utils.setTimeout on NPM-based builds
  • Added openfl.utils.Dictionary for NPM builds
  • Added Gzip and Brotli min.js files for NPM builds
  • Improved the texture size used for rendering TextField
  • Improved behavior of texture.uploadFromBitmapData when the source is HTML5 canvas
  • Improved compilation on AS3 by including flash.* versions of OpenFL types
  • Improved extern types for NPM builds
  • Improved using generated SWF classes with dead-code elimination
  • Fixed initialization of the stencil/depth buffers when using Stage3D
  • Fixed the behavior of textField.getTextFormat to handle some edge cases
  • Fixed a regression in software bitmap filters for certain cases
  • Fixed cases where HTML5 would dispatch MOUSE_LEAVE instead of RELEASE_OUTSIDE
  • Fixed support for Vector.<T> on the AS3 target
  • Fixed a possible loop when dispatching UncaughtErrorEvent throws an error
  • Fixed Lib.setTimeout and Lib.setInterval to make the last argument optional
  • Fixed a possible null issue when hit-testing within Sprite
  • Fixed the default value for vector.lastIndexOf
  • Fixed some minor issues when forcing power-of-two textures
  • Fixed some edge cases in justified text word-wrapping
  • Fixed the behavior of the displayObject.visible property if it is overridden
  • Fixed behavior of setting Stage3D max anisotropy to invalidate less often
  • Fixed keyboard shortcuts to move text cursor to work only if selectable is true
  • Fixed a regression in the SWF generator when using it from Node.js

8.1.1 (05/17/2018)

  • Fixed minor issues with some ActionScript 3.0 externs

8.1.0 (05/16/2018)

  • Added (initial) support for ActionScript 3.0 as a source language on NPM
  • Fixed inconsistencies in mask shape rendering on the Cairo renderer
  • Fixed some types and behaviors when using the global “openfl.js” library

Lime

6.4.0 (06/01/2018)

  • Updated NPM dependency to file-saver from file-saverjs
  • Updated Android ARMv7 builds to use armeabi-v7a instead of armeabi-v7
  • Added (Beta) support for electron (html5 -electron) target
  • Added window.onExpose event (useful when not rendering every frame)
  • Added raspberrypi or rpi as a target alias
  • Improved Locale to better handle en_US-en style strings
  • Improved handling of iOS locale values
  • Improved support for current Xcode versions by using an .entitlements file
  • Improved support for mouse “release outside” behavior on HTML5
  • Improved support for current Raspberry Pi OpenGL/EGL libraries
  • Improved Android Gradle template to include Maven for native extensions
  • Improved error handling when a library handler does not execute properly
  • Fixed crash in ObjectPool when setting initial size
  • Fixed setting powerOfTwo = true for an ImageBuffer with a canvas source
  • Fixed SWF font generation to limit kerning values to the SWF spec maximum
  • Fixed some cases where HOME environment variable might return null

We’ve also released updated versions of Away3D and Starling as well. Enjoy! :grinning:

9 Likes

Awesome ! i am excited about

Added (Beta) support for electron (html5 -electron) target

This is a great update :kissing_smiling_eyes:

After update old project throw a TextFormat errors !!!

Uncaught TypeError: Cannot set property 'align' of null
    at com_black_views_ThirdSection.onAdded (HTMLsite.js:7472)
    at openfl_events__$EventDispatcher_Listener.f [as callback] (HTMLsite.js:81212)
    at com_black_views_ThirdSection.__dispatchEvent (HTMLsite.js:1292)
    at com_black_views_ThirdSection.__dispatchEvent (HTMLsite.js:2204)
    at com_black_views_ThirdSection.__dispatchWithCapture (HTMLsite.js:2244)
    at openfl_display_Sprite.addChildAt (HTMLsite.js:3559)
    at openfl_display_Sprite.addChild (HTMLsite.js:3511)
    at com_black_views_BaseView.startSection (HTMLsite.js:6668)
    at openfl_events__$EventDispatcher_Listener.f [as callback] (HTMLsite.js:81212)
    at com_black_views_Core4.__dispatchEvent (HTMLsite.js:1292)

It is one example, others throw diffrent params such as leading*, font* and so on of textFormat Class. Simple code below

var f:TextFormat = this._tf1.getTextFormat();
		f.leading = -10;
		this._tf1.defaultTextFormat = f;

So getTextFormat() - return NULL.

but, var f:TextFormat = this._tf1.defaultTextFormat; - is working

Are you using haxelib or npm release? Sounds like some DCE problem

I found that the Openfl-html5 version will automatically load resources. Can it be changed to dynamic loading? :grinning:

Try embed="false" on your assets, then use Assets.loadBitmapData (etc) at runtime

Thanks, we’ll look into this!

Thanks, I don’t know where there will be more project.xml configuration related content?

<asset path="assets" /> will preload by default, but <asset path="assets" embed="false" /> will not.

When assets are not preloaded, you can use Assets.getPath or the Assets.load* methods to either get the location or load them asynchronously

Those that mean full screen on android will work perfectly

New bug acquared. (dont know, maybe in old versions too)

class Main extends Sprite 
{
	private var _al1:Sprite = new Sprite();
	private var _al2:Sprite = new Sprite();
	
	public function new() 
	{
		super();
		
		this._al1.graphics.beginFill(0x32ABAB);
		this._al1.graphics.drawRect(0, 0, 700, 350);
		this._al1.graphics.endFill();
		
		this._al2.graphics.beginFill(0xff0000);
		this._al2.graphics.drawRect(0, 0, 700, 350);
		this._al2.graphics.endFill();
		
		_al1.alpha = _al2.alpha = 0;
		
		stage.addEventListener(MouseEvent.CLICK, open);
		
		addChild(_al1);
		addChild(_al2);
	
	}
	
	public function open(e:MouseEvent = null):Void
	{
		
		trace("wtf");
		
		_al1.y = 100;
		_al2.y = 100;
		_al1.alpha = 1;
		_al2.alpha = 1;
		
		Actuate.tween(_al1, 1, {alpha:0, y: 0}).ease(Linear.easeNone);
		Actuate.tween(_al2, 1.1, {alpha:0, y: 200}).ease(Linear.easeNone);
		
	}

Event appears every click, but after actuate tween once, in other click the objects don’t shown !!!
Wtf ? :))) And one more : bulid as html5 only, and build with -final statement - are diffrent shown!!!
Please test this code!

p.s and one more : if test with textField for example, bug never appears

Actuate automatically sets the visible property to false when animating alpha to 0. You can disable this behavior by using .autoVisible (false) on your tween.

You can fix your sample by using Actuate.apply (_al1, { alpha: 1 }); or by doing _al1.visible = true; _al1.alpha = 1;.

I would recommend apply, because that handles visible, but also will cancel any running animations (if there are any) so that they do not conflict with the state you want to use for your target objects

ohhhhhhhhhhhh ))) its really hard guess ))) For example in TweenMax - property alpha - works as alpha, but if we want autoVisible - we use autoAlpha property. Thanks for u answer

Hi

I just updated to the new openfl 8.2 and i has and issue with texfield.getTexformat()

well this is the thing, i cant get the size of a textfield if this is init with the value ‘’ or “” i leave a simple piece of code to check.

package;

import openfl.text.TextFormat;
import openfl.display.Sprite;
import openfl.text.TextField;

class Main extends Sprite {

	public function new () {
		
		super ();
		
		var t:TextField=new TextField( );
	
		var tf:TextFormat = new TextFormat( null ,21);
		
		t.setTextFormat( t.defaultTextFormat = tf );

		//t.text = 'a'; //any value here and i can get 21 

		trace(">>>>>>>> , should it be 21? in this case is null >>>>   ", t.getTextFormat().size); //
		trace("is this working in the correct way?");
   
	}
}

thanks.

This appears to be the way getTextFormat works on Flash. I just added a test to confirm

If you set t.defaultTextFormat, you can use t.defaultTextFormat.size to look it up. Otherwise it appears the value is null unless text is set to something more than ""

I want to know if I can compile a copy of the output used by the Window system from Mac. I don’t want to use neko because it doesn’t perform very well.

You could use MingW (I think), though using a VM, or using AppVeyor or another online build solution may be a better approach