RE: [flexcoders] Noob Querystring questions

2007-04-13 Thread Peter Farland
A SWF is loaded via a URL inside the HTML OBJECT / EMBED tag... so you'd
need to put the parameters on that URL, not the URL that loaded the
wrapper SWF?
 
 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Friday, April 13, 2007 6:19 PM
To: [EMAIL PROTECTED]
Subject: [flexcoders] Noob Querystring questions



I'm trying to pass in variable via the URL.

I have:
var QueryString:String = this.parameters.test

http://myserver.com/myapp.html?test=systems
http://myserver.com/myapp.html?test=systems 

I always get nullWhere is my problem?

(I have also tried Application.application.parameters.test)



 


RE: [flexcoders] Noob Querystring questions

2007-04-13 Thread Tracy Spratt
Nate, sorry it is not quite that easy.  You are passing a parameter to
an html file.  The html file has no way to see that arg and pass it to
the Player instance.

 

This will work if you call the .swf directly, with the querystring
parameter.  Use Application.application.parameters.test.

 

To do this in a production environment (if the parameters are dynamic)
you will need to have a server platform generate the html file.

 

The easiest way to do this is to look at the generated html file that
FlexBuilder creates.  In the javascript call, you will need to add your
parameters to the flashvars line in AC_FL_RunContent(...  like:

flashvars,'historyUrl=history.htm%3Flconid=' + lc_id + test=system
+ '',

 

Of course you will have the server (asp, jsp...) output the actual value
you want for system.

 

Tracy

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Friday, April 13, 2007 6:19 PM
To: [EMAIL PROTECTED]
Subject: [flexcoders] Noob Querystring questions

 

I'm trying to pass in variable via the URL.

I have:
var QueryString:String = this.parameters.test

http://myserver.com/myapp.html?test=systems
http://myserver.com/myapp.html?test=systems 

I always get nullWhere is my problem?

(I have also tried Application.application.parameters.test)