0 Replies Latest reply on Sep 15, 2010 7:39 AM by EMelville

    Play NEXT VIDEO in same Video Display yet Playhead doesn't reset?

    EMelville

      I've tried pretty much everything. I Scrub to random point, the script will then remove the playhead update event listener, stop the video, try clearing the video, get next video, and play. Yet it plays the next video at timecode 03:04 where I last scrubbed!

       

      The scrubber code:

       

       

      private function slider_thumbPress():void

      {

           AmbientArchiveWindow.pause();           

           AmbientArchiveWindow.removeEventListener(VideoEvent.PLAYHEAD_UPDATE, videoDisplay_playheadUpdate);            

      }

       

      private function slider_thumbRelease():void

      {

           ResetProgressBar();

           AmbientArchiveWindow.playheadTime = ambientSlider.value;

           AmbientArchiveWindow.addEventListener(VideoEvent.PLAYHEAD_UPDATE, videoDisplay_playheadUpdate);

           AmbientArchiveWindow.play(); 

      }

       


      The play next video code:

       

      private function playNextVideo():void

      {  

           AmbientArchiveWindow.removeEventListener(VideoEvent.PLAYHEAD_UPDATE, videoDisplay_playheadUpdate);            

           AmbientArchiveWindow.stop();

           AmbientArchiveWindow.mx_internal::videoPlayer.clear();

           AmbientArchiveWindow.source = AmbientXMLCollection[idx].@source;

           AmbientArchiveWindow.addEventListener(VideoEvent.COMPLETE, ambientVideoDone);

           AmbientArchiveWindow.addEventListener(VideoEvent.PLAYHEAD_UPDATE, videoDisplay_playheadUpdate);

           AmbientArchiveWindow.play();

      }

       

       

      Can anyone tell me what i'm missing in the process? It all goes awry when I scrub the video before I go to the next video. If I leave the scrubber alone, everything works ok. Maybe the key is to throw a fake complete event?