
LocalConnection Class
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
589
// Before sending our variables, we'll display them
// in the Output window. (Good for debugging)
trace("Sending " + varSender.toString());
// Now send the variables to the server, and wait for a reply
varSender.sendAndLoad("http://www.yourserver.com/cgi-bin/lookup.pl",
varReceiver, "GET");
See Also
LoadVars.load( ), LoadVars.onLoad( ), LoadVars.send( ), LoadVars.toString( )
LoadVars.toString() Method
retrieve the same URL-encoded string of variables that would be sent by send() or sendAndLoad()
Flash 6
loadVarsObject.toString()
Returns
A string of URL-encoded variables.
Description
The toString( ) method returns the enumerable properties of loadVarsObject as a string of
URL-encoded variables (the enumerable properties are those exposed to a for-in loop). It
returns the same data that would be sent to a server script in a send( ) or sendAndLoad( )
call, which is handy for debugging. Properties are added to the returned string in the
reverse order of their creation (the most recently created property is first in the string,
followed by the second most recently created, and so on). Each property’s value is
converted to a string before being URL encoded.
Example
loadedVars = new LoadVars();
loadedVars.day = 22;
loadedVars.month = "Feb.";