I'm trying to cut my preloader in HaxeFlixel . I tried to run it with an “empty” preloader, I got an error in ApplicationMain.hx .

In it, I discovered the following:

 config = { build: "4", company: "...", file: "Danmaku", fps: 60, name: "Danmaku", orientation: "", packageName: "com.example.myapp", ... } 

I understand that the error is here - com.example.myapp .

The preloader is registered in Project.xml .

Here is the preloader code:

 package tk.castit.randomia; import flixel.system.FlxBasePreloader; import flash.Lib; /** * ... * @author ... */ class GamePreloader extends FlxBasePreloader { public function new(MinDisplayTime:Float=0, ?AllowedURLs:Array<String>) { super(MinDisplayTime, ?AllowedURLs); } override function create():Void { this._width = Lib.current.stage.stageWidth; this._height = Lib.current.stage.stageHeight; var ratio:Float = this._width / 800; super.create(); } } 
  • "Error in ApplicationMain.hx" - what? - D-side

1 answer 1

In Project.xml you need to assign the full path to the preloader. In this case - domain.ui.GamePreloader"