Topic: Game Programming /
AS2 Preloader...FFS [Solved]
The problem is that nothing shows up at all until the file is at 100%. My theory is that this happens because all of my assets are “exported for actionscript” so it’s trying to load them all before running anything else. That totally defeats the point of the preloader.
I think you’re right there. From memory, the way to do it was as follows:
Frame 1 – stop(); then preloader code, including progress bar or other indicator, bytesloaded/bytestotal etc. When complete, gotoAndStop(3);
Frame 2 – here is where you put all your embedded assets. The ones which are ‘exported for Actionscript’ should all have the box for ‘Export on Frame 1’ unchecked. Then you have to include them on this frame so that the .swf will load them now (or else they won’t be usable in the actual game). A simple way to do this is to put them all inside one movieclip (called something along the lines of ‘Assetloader’) and place that movieclip on the timeline. This is assuming you are using Adobe Flash as a tool.
Frame 3 – game code.
I remember reading tutorials about this but not sure I could find them now. Or maybe go down the route suggested about (using AS3) if that works.