     
     /**
      *  @private
-     *  Event handler for mediaPlayerStateChange event.  We only use this 
+     *  Event handler for mediaPlayerStateChange event.
+     */
+    private function videoPlayer_mediaPlayerStateChangeHandler(event:MediaPlayerStateChangeEvent):void
+    {
+        // if the event change caused us to go in to a state where 
+        // nothing is loaded up and we've no chance of getting a 
+        // dimensionChangeEvent, then let's invalidate our size here
+        if (event.state == MediaPlayerState.PLAYBACK_ERROR)
+            invalidateSize();
+        
+        // this is a public event, so let's re-dispatch it
+        dispatchEvent(event);
+    }
+    
+    /**
+     *  @private
+     *  Event handler for mediaPlayerStateChange event--used only  
      *  when trying to load up the video without playing it.
      */
-    private function videoPlayer_mediaPlayerStateChangeHandler(event:MediaPlayerStateChangeEvent):void
+    private function videoPlayer_mediaPlayerStateChangeHandlerForLoading(event:MediaPlayerStateChangeEvent):void
     {
         // only come in here when we want to load the video without playing it.
         

        if (thumbnailSource)
        {
            var bitmapImage:BitmapImage;
            if (!thumbnailGroup)
            {
                bitmapImage = new BitmapImage();

                
                thumbnailGroup = new Group();
                thumbnailGroup.addElement(bitmapImage);
            }
            else
            {
                bitmapImage = thumbnailGroup.getElementAt(0) as BitmapImage;
            }
            
            // if thumbnailGroup isn't on the display list, then add it.
            if (!this.contains(thumbnailGroup))
                addChild(thumbnailGroup);
            
            bitmapImage.source = thumbnailSource;
            invalidateSize();
        }
        else
        {
            if (thumbnailGroup)
            {
                // null out the source and remove the thumbnail group
                bitmapImage = thumbnailGroup.getElementAt(0) as BitmapImage;
                if (bitmapImage)
                    bitmapImage.source = null;
                if (this.contains(thumbnailGroup))
                    removeChild(thumbnailGroup);
                invalidateSize();
            }
        }
    }
    
