title: Using FLVPlayBack in FlashDevelop
body: <p>Trying to learn some flash and got a question. How do I play a flv video, below code compiles correctly and load flash player but doesn't play anything<br>
      
  
      
          
  
  <pre><code>            var vid:FLVPlayback = new FLVPlayback();
              var ui:UIComponent = new UIComponent();
              this.addChild( ui );
              ui.addChild( vid );
                  vid.width = 320;                
              vid.height = 240;
              vid.source = "http://www.helpexamples.com/flash/video/caption_video.flv";
              vid.skinBackgroundColor = 0x666666;
              vid.skin = "SkinUnderPlaySeekMute.swf";
              vid.addEventListener(VideoEvent.STATE_CHANGE , onCreationComplete);
  
          private function onCreationComplete():void
          {
  
              vid.scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO;
              vid.skinAutoHide = false;
  
          }
      ]]&gt;
  &lt;/mx:Script&gt;
  &lt;/mx:Application&gt;
  </code></pre>
  
  <p>Do I need to call a load method on vid ? Appreciate any help.</p>
  
  <p><strong>EDIT:</strong> I changed the code as below and it works fine.</p>
  
  <pre><code>import fl.video.*;
  import fl.video.VideoEvent;
  import flash.events.MouseEvent;
  var flvPlayer:FLVPlayback = new FLVPlayback();
  
  addChild(flvPlayer);
  flvPlayer.addEventListener(MouseEvent.CLICK, onCreationComplete);
  
  flvPlayer.skin = "./SkinUnderPlaySeekMute.swf";
  
  flvPlayer.source = "http://www.helpexamples.com/flash/video/water.flv";
  
  // on the event of mouose click, 
  function onCreationComplete(eventObj:MouseEvent):void
  {                  
     // do some stuff         
   }
  </code></pre>
  
  <p>Thanks for your help.</p>