Re: [flexcoders] SWF Loading and Query Strings

2007-04-24 Thread Michael Wills
I don't know if this is related, but can you confirm with an HTTP 
debugger or perhaps Firefox's LiveHTTPHeaders extentions what it is 
trying to load? Flex URL encodes requests going out so it may correctly 
load the SWF, but everything else may be encoded to something like

foo.swf%3Ftest%3Datest

I'm not sure if you're experiencing this though, but just thought it 
might be worth a try if it hasn't been solved yet.

Michael

jay.baird wrote:

 Hi all,

 Here's the scenario:

 We've got a SWF we're trying to load with a custom class that looks 
 like this:

 public class Foo extends MovieClip {
 public function Foo():void {
 var loader:Loader = new Loader();
 var request:URLRequest = new URLRequest(url);
 loader.load(request);
 addChild(loader);
 }
 }

 then the call looks like this:

 var theFlash:Foo = new Foo(http://localhost/assets/foo.swf?test=atest 
 http://localhost/assets/foo.swf?test=atest);
 otherContainer.addChild( theFlash );

 test is a variable in the swf that then outputs to trace. The problem 
 is is that test comes
 through undefined. I've tried this with SWFLoader, and now Loader. 
 Does Flex strip these
 arguments off when loading? Is this a crossdomain problem? (I do have 
 crossdomain set
 up locally to allow all hosts).

 If Flex does strip off the vars to the SWF then is the only recourse 
 LocalConnection?

 Thanks,

 Jay

  


Re: [flexcoders] SWF Loading and Query Strings

2007-04-24 Thread Manish Jethani
Have you tried this with a standalone AS3 example?

Try accessing the value of systemManager.loaderInfo.parameter from
your sub-application (the loaded one).

On 4/23/07, jay.baird [EMAIL PROTECTED] wrote:
 Hi all,

 Here's the scenario:

 We've got a SWF we're trying to load with a custom class that looks like this:

 public class Foo extends MovieClip {
 public function Foo():void {
 var loader:Loader = new Loader();
 var request:URLRequest = new URLRequest(url);
 loader.load(request);
 addChild(loader);
 }
 }

 then the call looks like this:

 var theFlash:Foo = new Foo(http://localhost/assets/foo.swf?test=atest;);
 otherContainer.addChild( theFlash );

 test is a variable in the swf that then outputs to trace. The problem is is 
 that test comes
 through undefined. I've tried this with SWFLoader, and now Loader. Does Flex 
 strip these
 arguments off when loading? Is this a crossdomain problem? (I do have 
 crossdomain set
 up locally to allow all hosts).

 If Flex does strip off the vars to the SWF then is the only recourse 
 LocalConnection?

 Thanks,

 Jay



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links