Nikita1334
05.10.2013, 14:16
респонсе как преобразовать в переменную??
import vk.APIConnection;
var flashVars:Object = stage.loaderInfo.parameters as Object;
//s1.text= flashVars['api_id'];
//s2.text= flashVars['viewer_id'];
//s3.text= flashVars['sid'];
//s4.text= flashVars['secret'];
// -- For local testing enter you test-code here:
flashVars['api_id'] = 3593884;
flashVars['viewer_id'] = 44213819;
flashVars['sid'] = "b7761955876244daf147b25722db42a0154b295f269cb420db1ebd5643c7849392f7923358f7f0b0e69db";
flashVars['secret'] = "d1edce0450";
flashVars["is_app_user"] = "1";
flashVars["api_url"] = "http://api.vk.com/api.php";
var VK:APIConnection = new APIConnection(flashVars);
VK.api('likes.getList', {type:'photo',owner_id:flashVars['viewer_id'],item_id:309128593}, onProfileLoaded, onError);//Узнаем имя и фамилию пользователя
function onProfileLoaded(data: Object):void
{
result_tf.text = data[0];
}
function onError(data: Object):void
{
result_tf.text = data.error_msg;
}
подскажите как преобразовать полученные данные в переменные, я получаю строку
{"response":{"count":5,"users":[91525757,30046180,208090345,108397866,50959423]}}
как вывести "5"- count в поле result_tf ???
import vk.APIConnection;
var flashVars:Object = stage.loaderInfo.parameters as Object;
//s1.text= flashVars['api_id'];
//s2.text= flashVars['viewer_id'];
//s3.text= flashVars['sid'];
//s4.text= flashVars['secret'];
// -- For local testing enter you test-code here:
flashVars['api_id'] = 3593884;
flashVars['viewer_id'] = 44213819;
flashVars['sid'] = "b7761955876244daf147b25722db42a0154b295f269cb420db1ebd5643c7849392f7923358f7f0b0e69db";
flashVars['secret'] = "d1edce0450";
flashVars["is_app_user"] = "1";
flashVars["api_url"] = "http://api.vk.com/api.php";
var VK:APIConnection = new APIConnection(flashVars);
VK.api('likes.getList', {type:'photo',owner_id:flashVars['viewer_id'],item_id:309128593}, onProfileLoaded, onError);//Узнаем имя и фамилию пользователя
function onProfileLoaded(data: Object):void
{
result_tf.text = data[0];
}
function onError(data: Object):void
{
result_tf.text = data.error_msg;
}
подскажите как преобразовать полученные данные в переменные, я получаю строку
{"response":{"count":5,"users":[91525757,30046180,208090345,108397866,50959423]}}
как вывести "5"- count в поле result_tf ???