This is my first project with LoaderMax, and I believe I uncovered a bug. This bug does not occur when loading the project from within the Flash dev environment. It only shows when loading files from a server. I've boiled the code down to the bare minimum so you can see the bug, plus I've linked to my source.
Here's my set-up
Mac OS X 10.6
Safari 5.0
Flash Player 10.0 r45
Flash CS4
Code written in AS3
Here's the synopsis:
I have three files, Main.swf, letter-a.swf and letter-b.swf. Main.swf contains two LoaderMax instances that load letter-a.swf and letter-b.swf respectively. I first built this demo without Class names defined on the letter swfs, using that set-up everything worked fine. Then, I added the Class name "Main" to each of the letter swfs, that's when the bug shows. You won't see it when loading the project from the Flash dev environment, but it shows when you upload to a server and load remotely.
You can see the error in action here: http://www.danmyers.name/loadermax-test/index.html
You can download the entire project from http://www.danmyers.name/loadermax-test/error-demo.zip
Here are my class definitions:
Main.swf
package {
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.events.LoaderEvent;
import com.greensock.loading.*;
import com.greensock.loading.display.*;
import com.greensock.plugins.*;
import flash.display.*;
import flash.text.*;
public class Main extends MovieClip {
private var _loader1:SWFLoader;
private var _loader2:SWFLoader;
public function Main():void {
_init();
}
private function _init():void {
//create a LoaderMax named "mainQueue" and set up onProgress, onComplete and onError listeners
var queue1:LoaderMax = new LoaderMax({name:"queue1", maxConnections:1, auditSize:false, integrateProgress:false});
var queue2:LoaderMax = new LoaderMax({name:"queue2", maxConnections:1, auditSize:false, integrateProgress:false});
//var patha:String = "a/letter-a.swf";
var patha:String = "http://www.danmyers.name/loadermax-test/letter-a.swf";
_loader1 = new SWFLoader(patha, {name:"letter-a", estimatedBytes:10, x:0, y:0, autoPlay:true});
queue1.append( _loader1 );
addChild(_loader1.content);
//var pathb:String = "b/letter-b.swf";
var pathb:String = "http://www.danmyers.name/loadermax-test/letter-b.swf";
_loader2 = new SWFLoader(pathb, {name:"letter-b", estimatedBytes:10, x:250, y:0, autoPlay:true});
queue2.append( _loader2 );
addChild(_loader2.content);
//start loading
queue1.load();
queue2.load();
}
}
}
letter-a.swf & letter-b.swf (Both use this same code)
package {
import flash.display.MovieClip;
public class Main extends MovieClip {
public function Main():void {
}
}
}