
LoadVars.decode() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
578
|
ActionScript Language Reference
Description
The contentType property is the MIME content type that is sent to a server when LoadVars.
send( ) or LoadVars.sendAndLoad( ) is invoked. For most practical purposes, its default
value (
application/x-www-form-urlencoded) need never be changed. It is writable to allow
MIME type flexibility in unique circumstances.
The
LoadVars.prototype.contentType property can be used to change the MIME content
type for all LoadVars instances that do not set it themselves. For example:
LoadVars.prototype.contentType = "yourContentTypeGoesHere";
Example
dataSender = new LoadVars();
trace(dataSender.contentType); // Displays: application/x-www-form-urlencoded
See Also
LoadVars.send( ), LoadVars.sendAndLoad( )
LoadVars.decode() Method
Convert a URL-encoded string of variables to properties
Flash 6 (undocumented)
loadVarsObject.decode(varString)
Arguments
varString A string of URL-encoded variables. For information on URL encoding, see
the Description heading under the LoadVars class entry.
Description
The decode( ) method converts the URL-encoded variables in varString to properties of the
specified
loadVarsObject. It offers a handy means of converting URL-encoded variables to
object properties, as required by LoadVars.onData( ). Although undocumented, ...