<script src="http://vkontakte.ru/js/api/xd_connection.js?2" type="text/javascript"></script>//добавим подключение скрипта <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> VK.loadParams(document.location.href);//вызов параметров <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. --> var swfVersionStr = "10.0.0"; <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. --> var xiSwfUrlStr = "playerProductInstall.swf"; var flashvars = { viewer_id: VK.params.viewer_id,//заносим нужные параметры в массив flashVars auth_key: VK.params.auth_key //заносим нужные параметры в массив flashVars }; var params = {}; params.quality = "high"; params.bgcolor = "#cd2727"; params.allowscriptaccess = "sameDomain"; params.allowfullscreen = "true"; var attributes = {}; attributes.id = "myFlash"; attributes.name = "myFlash"; attributes.align = "middle"; swfobject.embedSWF( "myFlash.swf", "flashContent", "100%", "100%", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes); <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. --> swfobject.createCSS("#flashContent", "display:block;text-align:left;"); </script>
2. В самой флэшке вызываем параметры (пример для Flex 4) ну и выводим их в виде текста в Label:
public function init():void { var stat_vars:URLVariables = new URLVariables(); stat_vars['auth_key']=parameters['auth_key'];// auth_key из FlashVars stat_vars['viewer_id']=parameters['viewer_id'];// ID просматривающего приложение auth_i.text = stat_vars['auth_key']; viewer.text = stat_vars['viewer_id']; }