"init" precedes "complete", so if you use Event.COMPLETE the properties
of loaded asset are readily available.

In AS2 things were the other way round: onLoadInit is fired after
onLoadComplete.

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Jason Van Pelt wrote:
Also, I think you may want to use Event.INIT instead of Event.COMPLETE

Jason Van Pelt
Interactive Developer
504.210.1232 (p) / 504.581.2731 (f)
Peter A. Mayer Advertising, Inc.
www.peteramayer.com


e.target.content


Kenneth Kawamoto
http://www.materiaprima.co.uk/

Omar Fouad wrote:
 > Hi list,
 >
> I am loading an swf that contains two MovieClips into an AS3 Project, B1 and
 > B2.
 > in the fist (and only) frame of the swf loaded I added:
 >
 > B1.Pid = 1;
 > B2.Pid = 2;
 >
> Now I would like to access that property from the class wich loads that SWF
 > here is the code I used:
 >
 > public function getMap(link:String):void {
 >             var ldr:Loader = new Loader();
 >             var urlReq:URLRequest = new URLRequest("Maps/" + link);
 >             ldr.load(urlReq);
 >             Map_Container.addChild(ldr);
 >             ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,
 > getProject);
 >         }
 >         public function getProject(e:Event):void {
 >             trace("Movie Loaded"); // works
 >             trace(ldr.B1.Pid); //undefined.
 >         }
 >
> How can I access it? In AS2 I used to write the name of the container like:
 >
 > container.MC.property;
 >
 > But how in AS3?
 >
 > Thanks.


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

Reply via email to