RE: [flexcoders] Application.application.parameters.
The html wrapper does not automatically pass parameters into the swf. You need some java script like this to get the parameters into an array: var _sPassedUrlParms = new String(document.location).split('?')[1]; //Get any passed-in querystring parms then pass that into the SF in the AC_FL_RunContent() function: flashvars, _sPassedUrlParms, Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Vikram Singh Sent: Wednesday, April 01, 2009 1:13 AM To: Flex Coders Subject: [flexcoders] Application.application.parameters. Hello Everybody. I am facing problem in getting value using Application.application.parameters. I will run my application with http://www.XYZ. http://www.XYZ.com/home.html?user_id=10 com/home.html?user_id=10 in Flex at initialize() function i wrote like this user = Application.application.parameters.user_id but i don't get value 10 in user variable which is declare like [Bindable] private var user : uint; is there any package to include for this? -Vikram. _ Add more friends to your messenger and enjoy! Invite http://in.rd.yahoo.com/tagline_messenger_6/*http:/messenger.yahoo.com/invit e/ them now.
[flexcoders] Application.application.parameters.
Hello Everybody. I am facing problem in getting value using Application.application.parameters. I will run my application with http://www.XYZ.com/home.html?user_id=10 in Flex at initialize() function i wrote like this user = Application.application.parameters.user_id but i don't get value 10 in user variable which is declare like [Bindable] private var user : uint; is there any package to include for this? -Vikram. Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
RE: [flexcoders] Application.application.parameters.
Make sure your HTML wrapper passes the params to the SWF. You can also try using BrowserManager. It knows how to pick those parameters off the URL. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Vikram Singh Sent: Tuesday, March 31, 2009 10:13 PM To: Flex Coders Subject: [flexcoders] Application.application.parameters. Hello Everybody. I am facing problem in getting value using Application.application.parameters. I will run my application with http://www.XYZ.com/home.html?user_id=10 in Flex at initialize() function i wrote like this user = Application.application.parameters.user_id but i don't get value 10 in user variable which is declare like [Bindable] private var user : uint; is there any package to include for this? -Vikram. Add more friends to your messenger and enjoy! Invite them now.http://in.rd.yahoo.com/tagline_messenger_6/*http:/messenger.yahoo.com/invite/
[flexcoders] Application.application.parameters doesn't hold GET query parameters
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] Application.application.parameters doesn't hold GET query parameters
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...@gmail.com 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] Application.application.parameters doesn't hold GET query parameters
Yes, as nate says. Remember, you are callling an *html* file. Html is dumb unless you code in javascript. Here are some snippets that you can add to the html wrapper that pass querystring parameers into Flex. First, declare a variable to hold the params: var _sPassedUrlParms = new String(document.location).split('?')[1]; //Get any passed-in querystring parms Then, pass that into the Flex app: AC_FL_RunContent( src, Coalesce, ... flashvars, _sPassedUrlParms, ... ); From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nate Beck Sent: Monday, December 15, 2008 12:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Application.application.parameters doesn't hold GET query parameters 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...@gmail.com 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; }