0 Replies Latest reply on Feb 25, 2010 6:46 AM by Leslie_cel

    Flashvars in Visual C++

    Leslie_cel

      Hi, I am trying to pass Flashvars to a swf in Visual C++, I tried using put_flashvars but it doesn´t work. I am using the videoPalyer.swf that is included in the Adobe Flash Development Server. Using HTML there´s no problem, but in C++ seem not to work.

      I have tried many ways but nothing. thanks a lot

      C++

      m_FlashPlayer.put_FlashVars(L"&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=1 00&DS_Status=true&streamType=vod&autoStart=true&serverURL=http:/vod/sample1.flv");
      m_FlashPlayer.LoadMovie(0,L"D:\videoPlayer.swf");   
      m_FlashPlayer.Play();

       

      In the . as of the swf, this is the function that gets the parameters through flashvars.

       

      private function getHtmlParameters():void{
          var videoH:Number;
          var videoW:Number;
         
          streamType = unescape(parameters.streamType);
      //    streamName = unescape(parameters.streamName);
          serverURL = unescape(parameters.serverURL);
          dynamicStreamControl = unescape(parameters.dsControl);
          dynamicSensitivity = parameters.dsSensitivity;   
          autoStart = unescape(parameters.autoStart);
          ds_Status_ON = unescape(parameters.DS_Status);
          videoW = (parameters.videoWidth);
          videoH = parameters.videoHeight;
         
          videoWidth = (videoW > normalSwfW || videoW == 0) ? normalSwfW : videoW;
          videoHeight = (videoH > (normalSwfH - normalControlH) || videoH == 0) ? (normalSwfH - normalControlH) : videoH;
         
          currentVideoW = videoWidth;
          currentVideoH = videoHeight;

       

      In HTML, i used this:(works ok)

      <object width='640' height='377' id='videoPlayer' name='videoPlayer' type='application/x-shockwave-flash' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' >
      <param name='movie' value='swfs/videoPlayer.swf' /> <param name='quality' value='high' /> <param name='bgcolor' value='#000000' />
      <param name='allowfullscreen' value='true' /> <param name='flashvars' value= '&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&DS_Status=true&streamType =vod&autoStart=true&serverURL=http:/vod/sample1.flv'/>
      <embed src='swfs/videoPlayer.swf' width='640' height='377' id='videoPlayer' quality='high' bgcolor='#000000' name='videoPlayer' allowfullscreen='true' pluginspage='http://www.adobe.com/go/getflashplayer'  
      flashvars='&videoWidth=0&videoHeight=0&dsControl=manual&dsSensitivity=100&DS_Status=true&s treamType=vod&autoStart=true&serverURL=http:/vod/sample1.flv' type='application/x-shockwave-flash'>