Chad:

 

I don't know why that traces out undefined for you, this is what I am doing
in my mxml to pass variables in a query string and it works.

 

Thanks,
Patrick

 

 

            private function createTextEffects(s:String):void{

                        var swf:SWFLoader = new SWFLoader();

                        panelMain.addChild(swf);

                        swf.load("components/someswf.swf?somevar="+s);

                        }

                        

 

  _____  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Chad Callahan
Sent: Thursday, March 15, 2007 11:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] SWFLoader query string?

 

When programming in AS2 for Flash, I was always able to have an AS2 swf load
into it another AS2 swf and pass that swf variables using query string as
such:

swfToLoad.swf?var1=1&var2=2

When the swfToLoad ran, it automatically had the var1 and var2 variables
declared and assigned the same values that were added onto the query string.

I now need to use the same idea but have Flex load an AS2 swf and pass the
swf a query string. 

<mx:SWFLoader source="swfToLoad.swf?var1=1&var2=2"/>

However, when the swfToLoad (which is a flash 8 as2 swf) loads, those var1
and var2 variables trace out as undefined.

I've also tried using the SWFLoader's load command rather than source, but
the same problem.  I've also tried using an mx:Image instead of SWFLoader,
same problem.  Is there a way to pass variables into the swf OTHER than
using a local connection?  

(I say other than using a local connection because that is the whole purpose
of me doing this. I'm trying to pass a random connection id from Flex into
the Flash swf so they use the same (random) connection id)

 

 




CHAD CALLAHAN
PROGRAMMER


T8DESIGN.COM | P 319.266.7574 - x195 | 877.T8IDEAS | F 888.290.4675

 


This e-mail, including attachments, is covered by the Electronic
Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential, and may be
legally privileged. If you are not the intended recipient, you are hereby
notified that any retention, dissemination, distribution, or copying of this
communication is strictly prohibited. Please reply to the sender that you
have received the message in error, and then please delete it. Thank you.

  _____  

 

 

<<attachment: image001.jpg>>

Reply via email to