LoadVars.toString( ) Method | Flash 6 |
retrieve the same URL-encoded string of variables that would be sent by send( ) or sendAndLoad( ) |
A string of URL-encoded variables.
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.
loadedVars = new LoadVars(); loadedVars.day = 22; loadedVars.month = "Feb."; loadedVars.year = 2002; // Displays: year=2002&month=Feb%2E&day=22 // Notice that the '.' after "Feb" is converted to the hex value %2E. // See the Description heading of the LoadVars class for details on URL encoding trace(loadedVars.toString());
LoadVars.onLoad( ), LoadVars.send( ), LoadVars.sendAndLoad( )