I'm trying to make a preloader for my bigger games using the getBytesLoaded() and getBytesTotal() functions.. but the entire file loads before my preloader rendering it useless. my guess is that the problem is that I load everything in by script but I don't know how to get around that problem. I have tried to remove the "Export in first frame" from the "linkage properties" but then the object don't load at all..
I've had this problem too, and sadly I don't know (yet) how to change it - in AS3 that is. The basics are that since you don't export them in the first frame, you have to have a frame in your movie where every object is placed so they do load - but not in the first frame. This allows your preloader to load first, and then display a nice loading bar or whatever - since it hasn't yet loaded everything else!
While I'm sure other AS guys can tell you the REAL answer, have you tried simply having a swf with the preloader that loads your game SWF in it? That would seem like the logical step to me.
While I'm sure other AS guys can tell you the REAL answer, have you tried simply having a swf with the preloader that loads your game SWF in it?
That leaves you on the hook for bandwidth costs when your game starts to spread. People will embed the loader SWF on their sites, but your server will still be the one serving up the game SWF. You're better off trying to get everything encapsulated into a single SWF.
I wasn't suggesting that they should be separate SWF files, simply that your main timeline, with the preloader, should have the MC of the game encapsulated. But again, I have yet to play with preloaders since everything I've made has been small so I'm sure even tracking down a good online tutorial may be more helpful than this post.
How about: http://www.actionscript.org/forums/showthread.php3?t=151850