views:

45

answers:

1

Hi, I have recently begun to develop a game in haXe which targets the Flash platform. I can say that I'm not really used to Flash and how it works, it is really apparent that it was intended for animations. But anyway, now that game I'm making is starting to be that big that it takes a few seconds for it to load that I want to have a nice preloader that makes a good impression while the user is waiting.

I found this haXe flash preloader written in haXe and it seemed like the perfect thing, but it is broken since haXe changed how its start-up mechanism works - and I do not really know what it is doing so I do not know how to fix it either. It seemed to work at first but then it just stuck into some kind of loop and utilizing 100% of one CPU-core.

I also found this sort of "half-preloader", it is only half in the sense that it only loads assets that is needed later. But in my game the assets is, as of now, a small fraction compared to the code, that means that there is still a few seconds of a grey square before the preloader shows up. I guesses that many might think that the game is broken and just leave if they do not see anything happen in 1-3 sec (or maybe more).

I wounder if someone has a fully functional method that allows me to code preloader animation using haXe. I'm also using swfmill, my coding station is an 10.04 64-bit Ubuntu laptop if that is relevant.

A: 

There is no out-of-the box solution for that problem, but it should be possible. (E.g.: http://stackoverflow.com/questions/1813355/haxe-simple-flash-preloader)

Another solution would be create two separate swf files and load the second through flash.display.Loader.

Hippo