Page 1 of 1

Problem in passing values from jsp to flash as3

Posted: 11 Jun 2009, 14:52
by vasanth
Hi everyone,

I have problem with passing values from jsp to flash as3

In my flash code

Code: Select all

<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" width="1024" height="728">
<param name="movie" value="aa.swf">
<param name="FlashVars" value="s1=hello & s2=hi " >
<embed src="aa.swf" quality="high" 
type="application/x-shockwave-flash" width="1024" height="728"></embed>
</object>

In my jsp code

Code: Select all

var loader:URLLoader =new URLLoader();
var request1:URLRequest =new URLRequest("aa.jsp");
loader.load (request1);
var a:String =root.loaderInfo.parameters.s1;
var b:String =root.loaderInfo.parameters.s2;
It gives null values

so plz tell me how to pass values from jsp to flash and is there any another way to get values........

thanks in advance

Posted: 11 Jun 2009, 19:11
by Lapo
You are passing the FlashVars as a parameter of the <Object> tag but you are not doing it in the <Embed> tag which is also needed.
Make sure to consult the Adobe documentation on Flash vars, there you'll find all the details