Problem in passing values from jsp to flash as3

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
vasanth
Posts: 5
Joined: 27 Jun 2008, 08:44
Location: india

Problem in passing values from jsp to flash as3

Post 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
Thanks & Regards
vasanth
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply