Код: Выделить всё
package { import flash.display.LoaderInfo; import flash.display.Sprite; import flash.events.Event; import flash.events.*; import flash.net.URLLoader; import flash.net.URLRequest; import flash.net.URLRequestMethod; import flash.net.URLVariables; import flash.text.TextField; import vk.APIConnection; import vk.events.*; /** * ... * @author Lampy */ public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init);} private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); // entry point var flashVars:Object = stage.loaderInfo.parameters as Object; var VK:APIConnection = new APIConnection(flashVars); var stat_loader:URLLoader = new URLLoader(); var stat_request:URLRequest = new URLRequest("http://social-times.ru/FLASH/stat.php"); stat_request.method = URLRequestMethod.POST; var stat_vars:URLVariables = new URLVariables(); stat_vars['auth_key'] = LoaderInfo(root.loaderInfo).parameters.auth_key;// auth_key из FlashVars stat_vars['viewer_id'] = LoaderInfo(root.loaderInfo).parameters.viewer_id;// ID просматривающего приложение stat_request.data = stat_vars; // выполнение запроса stat_loader.load(stat_request); } }