This content has been marked as final. Show 8 replies
enter your commands in plain text and load into flash using loadVariables or LoadVars() and use the flash escape function to url encode your string.
Thank you for helping. I tried what you Said, and I think that I realized what the underlying problem is. As crazy as it seems the Controller only uses "partially" encoded URL's. This is exactly, character for character what the Controller expects to see: http://my_website:9876/sendcommand.cgi?var1=%23%23%25286C0685F509010100&var2=str&var3=%23% 23%250
Now why the # and % are encoded but the & and = are not is beyond me. I Contacted the manufacturer and they were not Sure why. But the Combination of characters URL encoded and not is wreaking havoc with LoadVars. I was trying to accomplish this without calls to movie clips, extra data retrieval functions, etc. which is what I understand you have to do with Load Variables. Am I totally wrong here? The load.newvars and escape functions are encoding the & and = throwing the String off.
once again, thanks for your help Kglad, Zach
By the way when in plain text load.newvars is breaking apart the string at the & symbols.
there must be some logic to the code that should be passed to your controller. if it doesn't require all url-encoded data, what part of the data is NOT supposed to be url-encoded?
the & and =.
then escape everything but those two characters.
Ok, IM not sure how to do that. Could you possibly show me an example?
well, i don't know what your unencoded commands should look like. but if you have unencoded variables var1,var2,var3,var4 where the unencoded values are:
and you want to load those variables from a text file. then you must url-encode the %, = and & symbols. so, your text file would contain:
then if you wanted to url-encode all the characters of var1, var2, var3 and var4 EXCEPT for the ampersand and equal sign, you could use: