Open GoogleCodeExporter opened 9 years ago
Hi Arnaud,
Can you send me some code example? You are using modules, as I see, so please
make sure all your classes are accesible within module domain. Remember, that
each module/main app has separate fabrication and you cannot acces one actor
from moduleA within fabrication from moduleB.
Original comment by rafael.s...@gmail.com
on 29 Sep 2010 at 8:16
Here is the code I use for loading a module (inside my ShellMediator.as):
_loader = new Loader();
var req:URLRequest = new URLRequest("FBAuth.swf")
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteModuleA)
_loader.load(req)
and here is the callback, after loading COMPLETE :
var content:FlashApplication = _loader.content as FlashApplication;
content.router = applicationRouter;
content.defaultRouteAddress = applicationAddress;
// app is the main viewcomponent of the shell mediator
app.addChild(content)
Im pretty sure it's related to an applicationDomain issue, and maybe the same
as this bug : http://forums.puremvc.org/index.php?topic=1763.0
but as I dont use any flex module (or any flex at all) I cant find out where
the problem comes from (see above comment for details about the runtime error)
But maybe theres a better way for loading a module (the loading code is taken
from the flash-only example, which uses v.0.6 swc)
When i use "fabrication-0.6-flex.swc", everything works fine but when I switch
for fabrication-0.7.5.5-as3.swc (or whatever other 0.7.* version), i get this
error
I'm really willing to find (and kill!!!) this bug, so if you can put me in the
right direction, that would be great
thanks,
Arnaud
Original comment by arnaud.h...@gmail.com
on 29 Sep 2010 at 1:37
bug closed, it was related to the use of bulkloader for loading modules
Original comment by arnaud.h...@gmail.com
on 5 Nov 2010 at 7:52
What do You mean by Your last comment? Probably I'll figure it out myself, but
currently I'm struggling with the same problem. Is the loader bad for doing
this? Do You mean BulkLoader should be used?
Original comment by broadysm...@gmail.com
on 24 Nov 2010 at 5:11
Oh my God... Because tutorial didn't explicitly say everything, i copy pasted
your solution that didn't work and forgot about it... Then when it didnt work
for me i came back here, but i didn't guess that the error is here:
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteModuleA)
should be
_loader.addEventListener(Event.COMPLETE, onCompleteModuleA)
I found that out only because the error changed from the one you mention to
#1009 somehow...
Original comment by broadysm...@gmail.com
on 24 Nov 2010 at 6:11
Whoops, no, still having a problem. I'm struggling in FlashDevelop and will
post some example code soon...
Original comment by broadysm...@gmail.com
on 24 Nov 2010 at 8:08
Sorry for spam, but I feel obligated to write a solution here. It's simple...
And this time I tested it from beginning to the end, fabrication works and it's
great!
Original code:
ldr = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadHandler);
var url:String = 'module.swf';
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
Change it to:
var ldrContext:LoaderContext = new LoaderContext(false,
ApplicationDomain.currentDomain); //here...
ldr = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadHandler);
var url:String = 'module.swf';
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq, ldrContext); //...and here
That's everything!
Original comment by broadysm...@gmail.com
on 24 Nov 2010 at 9:30
Original issue reported on code.google.com by
arnaud.h...@gmail.com
on 27 Sep 2010 at 8:59