Только начинаю осваиваться с пхп и пытаюсь сделать взаимодействие с AS3. Возник вопрос, если у меня есть объект [Object object] который я хочу отдать пхп, как я могу это сделать?
Я пробую вот так:

Код AS3:
// Btn listener
submit_btn.addEventListener(MouseEvent.CLICK, btnDown);
// Btn Down function
function btnDown(event:MouseEvent):void
{
// Assign a variable name for our URLVariables object
var variables:URLVariables = new URLVariables();
// Build the varSend variable
// Be sure you place the proper location reference to your PHP config file here
var varSend:URLRequest = new URLRequest("http://localhost/as3_php/config_flash.php");
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
// Build the varLoader variable
var varLoader:URLLoader = new URLLoader;
varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
varLoader.addEventListener(Event.COMPLETE, completeHandler);
variables.uname = uname_txt.text;
variables.sendRequest = "parse";
variables.testObj = {are:5, b:10, c:30};
// Send the data to the php file
varLoader.load(varSend);
// When the data comes back from PHP we display it here
function completeHandler(e:Event):void
{
var phpVar3 = e.target.data.var3;
trace(phpVar3.are);
}
}
В пхп делаю следующее

PHP код:
<?php
// Only run this script if the sendRequest is from our flash application
if ($_POST['sendRequest'] == "parse") {
// Access the value of the dynamic text field variable sent from flash
$uname = $_POST['uname'];
$testObj = $_POST["testObj"];
// Print two vars back to flash, you can also use "echo" in place of print
print "var1=The name field with a variable of $uname has been sent to PHP and is back.";
print "&var2=$uname is also set in variable 2 from PHP.";
print "&var3=$testObj";
}
?>
В итоге он мне трейсит что пришол [Object object], но при обращении к свойствам данного объекта пишет

Код:
ReferenceError: Error #1069: Property are not found on String and there is no default value.
at MethodInfo-1()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()