RE: [flexcoders] Referencing methods in dynamically loaded swfs

2007-04-12 Thread Alex Harui
content is valid until the "complete" event.  creationComplete is too
soon.



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of gerardjamesmcbreen
Sent: Thursday, April 12, 2007 5:03 AM
To: [EMAIL PROTECTED]
Subject: [flexcoders] Referencing methods in dynamically loaded swfs



I'm using the swfloader to load swfs which are named in an xml file:


All loads fine except I can't reference the loaded swfs via:
public function initNestedAppProps(e:Event):void {
loadedSM = e.target.content;
loaderArray.push(loadedSM);
}

public function callee():void { 
for each(var mc:MovieClip in loaderArray ){
mc.application["lblResults"].text = "I was just updated";
}

In debug loaderArray has only null items

However when I hard code the swfname in the swfloader tag I can
reference all props and methods ok. In debug loaderArray has access to
the loaded swf as expected.

I'd be grateful for help - Thanks in advance.



 


[flexcoders] Referencing methods in dynamically loaded swfs

2007-04-12 Thread gerardjamesmcbreen
I'm using the swfloader to load swfs which are named in an xml file:


All loads fine except I can't reference the loaded swfs via:
  public function initNestedAppProps(e:Event):void {
   loadedSM = e.target.content;
   loaderArray.push(loadedSM);
  }
   
  public function callee():void {  
  for each(var mc:MovieClip in loaderArray ){
  mc.application["lblResults"].text = "I was just updated";
 }

In debug loaderArray has only null items

However when I hard code the swfname in the swfloader tag I can
reference all props and methods ok. In debug loaderArray has access to
 the loaded swf as expected.

I'd be grateful for help - Thanks in advance.