now wanna use createSWF where format is name1=value1&name2=value2 the same rules apply (spaces only to value part and what about before and after the equal sign?)
On Dec 23, 11:52 pm, Aran Rhee <[email protected]> wrote: > Kind of. The value can have a space in front / behind it, but the name is > not valid with a leading or trailing space: > > some e.g. > > {"foo" : " some text "}; // OK > {"foo" : 1234}; // OK - number type value > {"foo" : [" some text "]} // OK - string in Array type value > {" foo" : " some text "}; // BAD - leading space in var name > {"foo " : " some text"}; // BAD - trailing space in var name > > Cheers, > A > > > > > > > > On Fri, Dec 23, 2011 at 1:08 PM, mikek12003 <[email protected]> wrote: > > the flashvars as well as all other parameters neede for embedSWF come > > from a JSON file, so before I try to display the SWF I must check the > > format > > P.S. Cause JSON format requires "name":"value" the following " > > name " : " value " (spaces inside the name's double quotes) is also > > acceptable right? > > > On Dec 23, 8:23 pm, Aran Rhee <[email protected]> wrote: > > > Correct, spaces between the : will not affect the validity of the > > flashvars. > > > > BTW - at what point are you wanting to run the regex on the flashvars ? > > > After they have been defined in a Flashvars object, or are the values > > > coming from a querystring in the address and being passed into the swf > > > somehow? > > > > Also, flashvars can be defined on the generic Object in a few ways: > > > > // a var previous defined > > > var2 = "bar"; > > > > var fv = {var1 : "foo", 'var2' : var2, var3:"other" }; > > > > or > > > > var fv = {}; > > > fv.var1 = "foo"; > > > fv['var2'] = var2; > > > fv.var3 = "other"; > > > > (note the variations of quotes and references of external vars and Array > > > notation vs. dot notation) > > > > Anyhow, If you Google "name value pair regex" you will see plenty of > > > entries... > > > > Cheers, > > > Aran > > > > On Fri, Dec 23, 2011 at 12:05 PM, mikek12003 <[email protected]> > > wrote: > > > > the flashvars come in name:value pairs, would also name : value > > > > work as well? > > > > P.S. wanna make a regular expressions about this rule so for the above > > > > wrote > > > > ^\s*[a-zA-Z_$][0-9a-zA-Z_$]*\s*:\s*'.*'\s*$ > > > > and would like some feedback, at 1st look seems to work > > > > > -- > > > > 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. > > > -- > > 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. -- 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.
