не работает..

Код AS3:
public function Main():void
{
// получаем данные из flashVars
// id просматривающего приложение
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
viewer_id = flashVars['viewer_id'];
// secret для генерации сигнатуры
secret = flashVars['secret'];
// id сессии
sid = flashVars['sid'];
// адрес API-сервиса
api_url = flashVars['api_url'];
auth_key = flashVars['auth_key'];
// вызываем функцию получения профиля пользователя, просматривающего приложение
// var VK:APIConnection = new APIConnection(flashVars);
VK = new APIConnection(flashVars);
//getProfile(viewer_id);
VK.api('getProfiles',{ uids: viewer_id,fields:'photo_big,sex,bdate,city,country,education'},onComplete, onError);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
const flashVars:Object = stage.loaderInfo.parameters;
}
и CS5 выдает :
Цитата:
TypeError: Error #1009: Не удается вызвать свойство или метод со ссылкой на объект "null".
at Main()
|