actionscript 3 - JSON encoding in as3 -


i have code im using pass data in json encoded format php. there way can check @ php end if received , beamed in proper format?

var people:array = new array();     var person:object = new object();     var url:string = "http://localhost/ping.php";     var request:urlrequest = new urlrequest(url);     var requestvars:urlvariables = new urlvariables();     var loader:urlloader = new urlloader();     person.fullname = "jon jay junior";     person.username = "jjj";     person.role = "admin";     people.push(person);     request.method = urlrequestmethod.post;     requestvars.myobject = json.encode(people);     request.data = requestvars;     loader.load(request); 

as others have mentioned, should @ request firebug, livehttpheaders, or similar tool (there several firefox). let see format of data.

if $_request['myobject'] indeed null in php, wrong. should attach loader.addeventlistener(ioerrorevent.io_error, handleioerror); check problems and/or run debug flash player can see exceptions going on.

if running in browser, debug trick call firebug's console.log via externalinterface.call()


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -