[flexcoders] Re: Application.application.parameters doesn't hold GET query parameters
Well, the documentation sure says so: http://livedocs.adobe.com/flex/3/langref/mx/core/Application.html#parameters I had it working with swfobject using the getQueryParamValue function in JS. I think I my just stick with that, and use swfaddress for my deep linking. Still would like to know what is up with the documentation though. All my web searches seem to imply that it just supposed to work. Thanks --- In flexcoders@yahoogroups.com, Nate Beck n...@... wrote: I don't believe Flash natively reads URL parameters from the browsers query string. However, here are a few ways you can do it: - Write a javascript (or serverside) method that takes the browsers query string and the passes them in as flashvars. - You CAN add a query string directly to the embed code, (ex UrlParams.swf?foo=bar), Those will be treated as flashvars as well. - If you have javascript access on the page, add an ExternalInterface call which will return the query string to your swf. Hope that helps, Nate On Mon, Dec 15, 2008 at 8:53 AM, ozziegt osman.ul...@... wrote: I feel kind of stupid asking this, but I have been beating my head against the wall and I know I am missing something obvious. I created a sample app here (you can view source on it): http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar You will notice there are no URL parameters being reported by the application. The code is pretty basic, so I don't know what I am missing. This is a brand new sample app...I created it, added a few lines of code, and that is it. Any ideas? Thanks private function showParams():void { var params:Object = Application.application.parameters; var s:String = Params: \n; params.runtime = added in code; for (var key:String in params) { s += key +: + params[key] + \n; } txt.text = s; }
Re: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters
I think you're just misreading the documentation. It's exactly as I described before: There are two sources of parameters: the query string of the Application's URL, and the value of the FlashVars HTML parameter (this affects only the main Application). Within the query string of the application's URL... UrlParams.swf?foo=bar The application's URL, not the web page URL where the flash file is being embedded. and FlashVars On Mon, Dec 15, 2008 at 9:14 AM, ozziegt osman.ul...@gmail.com wrote: Well, the documentation sure says so: http://livedocs.adobe.com/flex/3/langref/mx/core/Application.html#parameters I had it working with swfobject using the getQueryParamValue function in JS. I think I my just stick with that, and use swfaddress for my deep linking. Still would like to know what is up with the documentation though. All my web searches seem to imply that it just supposed to work. Thanks --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nate Beck n...@... wrote: I don't believe Flash natively reads URL parameters from the browsers query string. However, here are a few ways you can do it: - Write a javascript (or serverside) method that takes the browsers query string and the passes them in as flashvars. - You CAN add a query string directly to the embed code, (ex UrlParams.swf?foo=bar), Those will be treated as flashvars as well. - If you have javascript access on the page, add an ExternalInterface call which will return the query string to your swf. Hope that helps, Nate On Mon, Dec 15, 2008 at 8:53 AM, ozziegt osman.ul...@... wrote: I feel kind of stupid asking this, but I have been beating my head against the wall and I know I am missing something obvious. I created a sample app here (you can view source on it): http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar You will notice there are no URL parameters being reported by the application. The code is pretty basic, so I don't know what I am missing. This is a brand new sample app...I created it, added a few lines of code, and that is it. Any ideas? Thanks private function showParams():void { var params:Object = Application.application.parameters; var s:String = Params: \n; params.runtime = added in code; for (var key:String in params) { s += key +: + params[key] + \n; } txt.text = s; }
Re: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters
That didn't come out how I wanted it to. Let's try again. I can see how the documentation can be confusing. When they say, Within the query string of the application's URL, they simply mean the URL pointing to the flash file itself. (ex: http://foobar.com/UrlParams.swf?foo=bar) Yea, that's much nicer. On Mon, Dec 15, 2008 at 10:02 AM, Nate Beck n...@tldstudio.com wrote: I think you're just misreading the documentation. It's exactly as I described before: There are two sources of parameters: the query string of the Application's URL, and the value of the FlashVars HTML parameter (this affects only the main Application). Within the query string of the application's URL... UrlParams.swf?foo=bar The application's URL, not the web page URL where the flash file is being embedded. and FlashVars On Mon, Dec 15, 2008 at 9:14 AM, ozziegt osman.ul...@gmail.com wrote: Well, the documentation sure says so: http://livedocs.adobe.com/flex/3/langref/mx/core/Application.html#parameters I had it working with swfobject using the getQueryParamValue function in JS. I think I my just stick with that, and use swfaddress for my deep linking. Still would like to know what is up with the documentation though. All my web searches seem to imply that it just supposed to work. Thanks --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nate Beck n...@... wrote: I don't believe Flash natively reads URL parameters from the browsers query string. However, here are a few ways you can do it: - Write a javascript (or serverside) method that takes the browsers query string and the passes them in as flashvars. - You CAN add a query string directly to the embed code, (ex UrlParams.swf?foo=bar), Those will be treated as flashvars as well. - If you have javascript access on the page, add an ExternalInterface call which will return the query string to your swf. Hope that helps, Nate On Mon, Dec 15, 2008 at 8:53 AM, ozziegt osman.ul...@... wrote: I feel kind of stupid asking this, but I have been beating my head against the wall and I know I am missing something obvious. I created a sample app here (you can view source on it): http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar You will notice there are no URL parameters being reported by the application. The code is pretty basic, so I don't know what I am missing. This is a brand new sample app...I created it, added a few lines of code, and that is it. Any ideas? Thanks private function showParams():void { var params:Object = Application.application.parameters; var s:String = Params: \n; params.runtime = added in code; for (var key:String in params) { s += key +: + params[key] + \n; } txt.text = s; }
[flexcoders] Re: Application.application.parameters doesn't hold GET query parameters
This message may help: http://tech.groups.yahoo.com/group/flexcoders/message/112989 HTH Steve --- In flexcoders@yahoogroups.com, ozziegt osman.ul...@... wrote: I feel kind of stupid asking this, but I have been beating my head against the wall and I know I am missing something obvious. I created a sample app here (you can view source on it): http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar You will notice there are no URL parameters being reported by the application. The code is pretty basic, so I don't know what I am missing. This is a brand new sample app...I created it, added a few lines of code, and that is it. Any ideas? Thanks private function showParams():void { var params:Object = Application.application.parameters; var s:String = Params: \n; params.runtime = added in code; for (var key:String in params) { s += key +: + params[key] + \n; } txt.text = s; }
RE: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters
You should be able to use BrowserManager instead of altering your HTML. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Monday, December 15, 2008 10:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters This message may help: http://tech.groups.yahoo.com/group/flexcoders/message/112989 HTH Steve --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, ozziegt osman.ul...@... wrote: I feel kind of stupid asking this, but I have been beating my head against the wall and I know I am missing something obvious. I created a sample app here (you can view source on it): http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar You will notice there are no URL parameters being reported by the application. The code is pretty basic, so I don't know what I am missing. This is a brand new sample app...I created it, added a few lines of code, and that is it. Any ideas? Thanks private function showParams():void { var params:Object = Application.application.parameters; var s:String = Params: \n; params.runtime = added in code; for (var key:String in params) { s += key +: + params[key] + \n; } txt.text = s; }
[flexcoders] Re: Application.application.parameters doesn't hold GET query parameters
Thanks for all the replies. Yeah I thought about it over lunch and it occurred to me that I might only get the params when I reference the .swf file directly. I think I will stick with my current implementation using swfobject. --- In flexcoders@yahoogroups.com, ozziegt osman.ul...@... wrote: I feel kind of stupid asking this, but I have been beating my head against the wall and I know I am missing something obvious. I created a sample app here (you can view source on it): http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar You will notice there are no URL parameters being reported by the application. The code is pretty basic, so I don't know what I am missing. This is a brand new sample app...I created it, added a few lines of code, and that is it. Any ideas? Thanks private function showParams():void { var params:Object = Application.application.parameters; var s:String = Params: \n; params.runtime = added in code; for (var key:String in params) { s += key +: + params[key] + \n; } txt.text = s; }
RE: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters
Checkout BrowserManager. You may want to use it elsewhere in your app. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ozziegt Sent: Monday, December 15, 2008 11:13 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters Thanks for all the replies. Yeah I thought about it over lunch and it occurred to me that I might only get the params when I reference the .swf file directly. I think I will stick with my current implementation using swfobject. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, ozziegt osman.ul...@... wrote: I feel kind of stupid asking this, but I have been beating my head against the wall and I know I am missing something obvious. I created a sample app here (you can view source on it): http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar You will notice there are no URL parameters being reported by the application. The code is pretty basic, so I don't know what I am missing. This is a brand new sample app...I created it, added a few lines of code, and that is it. Any ideas? Thanks private function showParams():void { var params:Object = Application.application.parameters; var s:String = Params: \n; params.runtime = added in code; for (var key:String in params) { s += key +: + params[key] + \n; } txt.text = s; }