Search code examples
haxeopenflhaxeflixel

HaxeFlixel: Custom Preloader not Working


I am a beginner to HaxeFlixel and I would like to replace the default preloader. Instead of it displaying the standard HaxeFlixel logo, I would like it to display a "Loading..." message.

After extensive searching, the only useful resource I found was this. My problem is not with writing the preloader class, but instead getting HaxeFlixel to use my custom preloader.

From what I have found, this is how I would go about doing it (Project.xml):

<app preloader="MyLoader" />

Unfortunately, HaxeFlixel seems to completely ignore it. Is it maybe a bug with OpenFL?


Solution

  • First of all you could simply disable HaxeFlixel splash screen

    new(GameSizeX:Int = 640, GameSizeY:Int = 480, ?InitialState:Class, Zoom:Float = 1, UpdateFramerate:Int = 60, DrawFramerate:Int = 60, SkipSplash:Bool = false, StartFullscreen:Bool = false)

    SkipSplash - Whether you want to skip the flixel splash screen in FLX_NO_DEBUG or not.

    If you want use your custom preloader show your MyLoader class or upload minimal project somewhere to see