         
         // create the underlying FLVPlayback class
         createUnderlyingVideoPlayer();
+        
+        // added and removed event listeners to see whether we should
+        // start or stop the video
+        addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
+        addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler);
     }
     
     //--------------------------------------------------------------------------


import spark.components.mediaClasses.StreamItem;
import spark.components.mediaClasses.StreamingVideoSource;
import spark.core.IGraphicElement;
import spark.events.VideoEvent;

use namespace mx_internal;

        {
            // The progressive case
            var sourceString:String;
            
            // if paused, pass in null as the flvSource.  Otherwise, calling 
            // play(source) will reset the stream back to zero.  To restart the 
            // stream where it was paused, one needs to call play(null).
