Receiving data with no commas or special characters
- February 11th, 2011
- Write comment
This promblem occurs in AS3 when you’re sending and loading data through a URLrequest like this
var myData:URLRequest = new URLRequest(“http://www.mydomain.com/somescript.php”)
myData.method = URLRequestMethod.POST
var variables:URLVariables = new URLVariables()
variables.password = “somepassword”;
myData.data = variables
var loader:URLLoader = new URLLoader()
loader.dataFormat = URLLoaderDataFormat.VARIABLES
loader.addEventListener(Event.COMPLETE, dataOnLoad)
loader.load(myData)
function dataOnLoad(evt:Event){trace (loader.data.someVar)
}
The variable if it is a string say comma delimited, will have no commas. It is because you didn’t send any variables ie you didn’t include the line in red.
