Hello,
The preloader I use (I only target flash) does not work on Microfost Edge under Windows 10. It does work on other browsers but with Edge, nothing is displayed while the game loads . It is very basic, I don’t understand what could be wrong. Can anyone give me a hint on how to fix this?
GamePreloader.hx
package ;
import openfl.Lib;
import openfl.display.Bitmap;
import openfl.display.BitmapData;
import openfl.text.TextField;
@:bitmap("Assets/preload_screen.png") class Background extends BitmapData {}
class GamePreloader extends NMEPreloader
{
private var logo:Bitmap;
private var topText:TextField;
override public function new()
{
super();
removeChild(outline);
removeChild(progress);
Lib.current.stage.color = 0x850706;
addChild(new Bitmap(new Background(960, 540)));
topText = new TextField();
topText.height = 50;
topText.x = 0;
topText.y = 160;
topText.text = "0%";
addChild(topText);
}
override public function onUpdate(bytesLoaded:Int, bytesTotal:Int)
{
var percent = Math.ceil(bytesLoaded / bytesTotal * 100);
topText.text = Std.string(percent) + "%";
}
}
project.xml
<?xml version="1.0" encoding="utf-8"?>
<project>
<window fullscreen="true" width="960" height="540" />
<meta title="test-game" package="com.mysite.testgame" version="1.0.0" company="Mine" />
<app main="Main" path="Export" file="preolader-test-game" preloader="GamePreloader" />
<source path="Source" />
<haxelib name="openfl" />
<haxelib name="actuate" />
<assets path="Assets/" rename="assets" />
</project>
Thanks!