I posted about this before and didn't receive and answer but it is still
causing me issues so I am trying again. I need to load an swf from one
server that is a member of some class. For example:

 

http://server1.mydomain.com/load_me.swf that uses the Document class
"com.mydomain.componet.LoadMe.as".

 

I want to be able to load this swf from a different server, say
http://server2.mydomain.com/load_stuff.swf, and cast it to a LoadMe when
it is done loading. Should this work? I keep getting errors when trying to
cast in the init handler.

 

 

import com.mydomain.componet.LoadMe;

 

var _req:URLRequest = new
URLRequest("http://server1.mydomain.com/load_me.swf";);

var _ldr:Loader = new Loader();

var _context:LoaderContext = new LoaderContext();

_context.securityDomain = SecurityDomain.currentDomain;

_context.applicationDomain = ApplicationDomain.currentDomain;

_ldr.contentLoaderInfo.addEventListener(Event.INIT, initHandler, false, 0,
true);

_ldr.load(_req, _context); 

 

 

private function initHandler($event:Event) () {   

                var _lm:LoadMe = LoadMe(_ldr.content);

}

 

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to