OpenFL 7.0 Release


#1

We have been hard at work preparing our seventh major release, but in addition to the ordinary improvements and refinements, this release opens up an entirely new way to use OpenFL.


This is a companion discussion topic for the original entry at http://www.openfl.org/blog/2018/01/16/openfl-7-release/

#2

This is an awesome news !


#3

I read something about being able to use the DOM without making all the game run in the DOM. Is there any example of how to do this? (Did I misunderstand?)


#4

First, the changes make it possible to select a DOM renderer without rebuilding OpenFL. This is important, because the NPM version of OpenFL does not have defines. However, you can use the DOM target, and blend in the canvas renderer by using cacheAsBitmap = true on an object, or bitmapData.draw :slight_smile:


#5

Wow, this is a huge release! A lot of respect to you guys!


#6

Wow big release! But where is output compile with C#? :confused: Respect to you!


#7

There’s some support for C#, using openfl test cs, but it’s not stable, and would require more work


#9

Hooray. I’ve updated. Thank you very much.
I tried to compile my project under AIR and caught the error.

Error: You must define AIR_SDK with the path to your AIR SDK

This SDK is installed, what should I do?


#10

Use openfl config AIR_SDK path/to/air/sdk :slight_smile:


#11

Its working. Thank you.


#12

My application for Android began to weigh less with the transition to version 7.0. Almost a megabyte. This is a pleasant surprise.


#13

UWP should mean console support could be coming soon? At least for Xbone?


#14

@singmajesty how can I test this fix https://github.com/openfl/openfl/issues/1710 ?
How can I merge manually to OpenFL 7.0?


#15

Copy the changes made here:

Into your “src/openfl/display/MovieClip.hx” file in your local install. It may likely be located at “C:\HaxeToolkit\haxe\lib\openfl\7,0,0\src\openfl\display” or similar


#16

Is the .pak file available through some setup in the project.xml ?


#17

Yes, you can do something such like:

<library name="level1" type="zip" />
<assets path="Assets/level1" library="level1" />

The types are “zip”, “gzip”, “deflate” or “pack” / “pak”. You can use library="default" to apply it to the default (unnamed) library if you wish.

The “pack” type blobs assets together, but does not compress. “zip” is the same as “gzip” I believe, for gzip compression, and “deflate” uses deflate compression


#18

I can confirm my issue has been fixed


#19

@singmajesty
How do you get the content of a .pak file ?
If I pak my sounds for example :

<library name="sound" type="pak" />
<assets path="assets/sounds" library="sound"/>

Do I need to unpak it ?
If I use Assets.getSound(), It always tell me that the sound doesn’t exist in assets.


#20

For your example, try:

Assets.loadLibrary ("sound").onComplete (function (library) {
    var sound = library.getSound ("mysound.wav");
    // or
    var sound = Assets.getSound ("sound:mysound.wav");
});

You may also be able to set the “default” asset library to type “pak”, or set your custom asset library to preload


#21

Awesome thanks, I will try this