I have a holder swf that loads in a swf that has its own built in preloader. Problem is those preloaders are not seen. The loaded swf only displays after it is 100% complete. On its own, the swf with preloader works fine.
I created the preloader by using the Frame metadata tag:
(import classes etc.)
[SWF(frameRate=60, width=900, height=580, backgroundColor='#2A3146')]
public class MainClass extends Sprite
Then in the Preloader class when all is loaded:
private function onLoaded():void
var mainClass:Class = Class(getDefinitionByName("MainClass"));
app = new mainClass();
addChild(app as DisplayObject);
In the holder swf it does something like this to load the swf:
gameLoader = new Loader();
private function onGameLoadStart(e:Event):void
preloader = gameLoader.content;
I thought this was the to do a "export classes in frame 2" kind of thing in an actionscript project, and it works great on its own but not when loaded inside another swf. Is there something I'm missing?
I know I could just built a preloader in the holder swf, but the holder swf is loading in games that all have a unique style on thier own and the games' preloaders all dipict its games style.
I've already went back and forth on that, same results. I tested with a swf made in the Flash Pro IDE with "Export classes in frame 2" set its actionscript settings and got the results I wanted. Just trying to figure out the same thing in an ActionScript Project.
You were right. It was the Loader not having the size. After your post I checked the to see if the server was serving with the right mimetype and with no g-zip compression. Everything was in in correct order. Then I checked from my connection at home and everything is loading as intended. Come t find out its something with our firewall. When checking from work and the swfs are on a server outside our firewall the total bytes are unknown. If they are on a server within our firewall they are fine. (Most problematic in Webkit browsers). So I guess i was going about it the right way. Thanks for your help.