You can also use a bit of JavaScript code to simply pass whatever URL 
parameters have been specified for the HTML on to your SWF, if that's 
what you're after.  I usually edit the HTML template and include the 
following:

// In the Globals area near the top
var myvars = new String(document.location).split('?')[1];

// the line in AC_FL_RunContent that specifies flashvars
"flashvars",'historyUrl=history.htm%3F&lconid=' + lc_id + '&' + 
myvars,


--- In [EMAIL PROTECTED], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> 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%3F&lconid=' + 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 null....Where is my problem?
> 
> (I have also tried Application.application.parameters.test)
>


Reply via email to