PDA

View Full Version : reading a PHP return in flash


vee
01-16-2011, 10:56 PM
Can you read this number in flash when return from php like this. I cna get it to read all the echo tags and name value paris that come before the return but I can't figure out how to just read the number in the return.return 0;

public static function handleResponse(evt:Event):void {
var completeLder:URLLoader = URLLoader(evt.target);
trace('RECEIVING ALL= ' + completeLder.data);

switch (completeLder.data) {
case 0:
trace('0');
break;
case 1:

trace('1');
break;
case 2:
trace('2');
break;
}
}

vee
02-10-2011, 12:09 AM
Can you read the return value/object from PHP in AS3 or does it have to come back in the form of an echo tag.

CyanBlue
02-10-2011, 03:17 AM
Basically it needs to be echoed out as string(name=value) so that Flash can read/understand...

vee
02-10-2011, 04:23 PM
Thanks Cyan

CyanBlue
02-10-2011, 05:54 PM
Sure thing... :)