title: Flash Actionscript 3.0 FLVPlayback and VideoEvent.STATE_CHANGE Oddities
body: <p>This is my first post, but this question has racked my brain and Google's servers all night, so I thought I would pose the question here.</p>
  
  <p>Let me get started on the preliminaries of my problem so I can elaborate the issue. I know <strong>FLVPlayback</strong> is buggy but this seems like either a version problem or I might be in need of an update.</p>
  
  <p>I currently monitor the <strong>VideoEvent.STATE_CHANGE</strong> event. When I first play a video with <strong>FLVPlayback</strong> by setting its <strong>.source</strong> property the <strong>VideoEvent.STATE_CHANGE</strong> event fires in this order:</p>
  
  <p><em>loading</em></p>
  
  <p><em>buffering</em></p>
  
  <p><em>playing</em></p>
  
  <p>This is exactly what I need, however if I 'load a new video' by yet again setting the <strong>.source</strong> property the <strong>VideoEvent.STATE_CHANGE</strong> event fires in this order:</p>
  
  <p><em>loading</em></p>
  
  <p><em>paused</em></p>
  
  <p><em>buffering</em></p>
  
  <p><em>playing</em></p>
  
  <p><em>paused</em></p>
  
  <p><em>buffering</em></p>
  
  <p>Which, incidentally, throws my event system out of wack, due to the video successfully playing while the last event fired is buffering. This causes my event tracking to be in an incorrect state.</p>
  
  <p>I do handle the <strong>VideoEvent.READY</strong> event to run these methods on the <strong>FLVPlayback</strong> object:</p>
  
  <p><em>video.pause();</em></p>
  
  <p><em>video.playWhenEnoughDownloaded();</em></p>
  
  <p>Am I doing something wrong in the order that I am calling the methods, or am I omitting a step in closing (which I've tired by getting the VideoPlayer.close() method) or disposing of something in the <strong>FLVPlayback</strong> object?</p>
  
  <p>Any help or tips/direction pointing would be greatly appreciated! Thank you!</p>