Ok lets chop them off. As for non-name/value pairs, I'm not sure how those could be more properly handled - If you were using a server side script to gather them, they would show as existing, but not having a value, so I think leaving them set, but with an undefined value is the proper thing to do, and let the user sort it out in their swf/javascript.
On Tue, Jan 13, 2009 at 3:15 PM, Aran Rhee <[email protected]> wrote: > > Parsing ? and #: > > The swf does not parse out the ? or #, as can be seen in the test page: > > > http://www.misterhee.com/tests/params/params.flashvars.test2.html?var1=test& > abc=123<http://www.misterhee.com/tests/params/params.flashvars.test2.html?var1=test&abc=123> > > > http://www.misterhee.com/tests/params/params.flashvars.test2.html#adef-name- > A > > > I am unsure what you guys want to do about the anchor link. Do we really > even want that coming through? As an anchor does not have an associated > value (rather the anchor name IS the value), I am unsure as to the > usefulness of having it available. Basically you will have an undefined var > called whatever your anchor was named... > > > Combining data: > > As Bobby rightly says, you can combine the flashvars in the params object > and variables in the flashvars object AND variables from the swf > querystring > without overwriting! > > > http://www.misterhee.com/tests/params/params.flashvars.test3.html?var1=test& > abc=123<http://www.misterhee.com/tests/params/params.flashvars.test3.html?var1=test&abc=123> > > > Cheers, > Aran > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Bobby > Sent: Wednesday, 14 January 2009 7:56 AM > To: SWFObject > Subject: Re: New Query String / FlashVars method -- gathers *all* query > string pairs with single method > > > I think we should get rid of the ? and # anyway. > > Although unusual, the flashvars object and the params flashvars > notation can be mixed and matched, this is the code we currently have > in place: > > var par = {}; > if (parObj && typeof parObj > === OBJECT) { > for (var j in parObj) > { > par[j] = parObj > [j]; > } > } > if (flashvarsObj && typeof > flashvarsObj === OBJECT) { > for (var k in > flashvarsObj) { > if (typeof > par.flashvars != UNDEF) { > > par.flashvars += "&" + k + "=" + flashvarsObj[k]; > } > else { > > par.flashvars = k + "=" + flashvarsObj[k]; > } > } > } > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---
