1 Reply Latest reply on May 6, 2006 10:08 AM by SoCalMX

    Problem with FLVPlayback

    SoCalMX
      Noob question here. I've put together something that lets a user view either movies (FLV's) or a slideshow. The first time through the video portion everything works well. If the user is viewing videos and then chooses to view the slidewhow, I remove the FLVPlayback component and display the slideshow. If they then choose to look at the videos again, I reexecute the following code. The second time through it doesn't work:

      //User wants to see a video - Display FLVPlayback and set the skin
      btn_WatchVideo.onRelease = function() {
      attachMovie("FLVPlayback", "my_FLVPlybk", getNextHighestDepth(), {_width:320, _height:240, x:389, y:226});
      my_FLVPlybk.skin = "file:///C|/Program Files/Macromedia/Flash 8/en/Configuration/Skins/ClearExternalPlaySeekMute.swf";
      };

      //Which video do they want to see? - Set contentPath
      btn_PlayVidOne.onRelease = function() { //Button One
      my_FLVPlybk.contentPath = "file:///C|/Documents and Settings/HP_Administrator/My Documents/My Videos/VidOne.flv";
      };

      btn_PlayVidTwo.onRelease = function() { //Button Two
      my_FLVPlybk.contentPath = "file:///C|/Documents and Settings/HP_Administrator/My Documents/My Videos/VidOne.flv";
      };

      This works fine (at first). The user can select Button 1 and VidOne plays; they select Button 2 and VidTwo plays, select Button 1 again and VidOne plays again. This works fine until I clear what is on the screen by using unloadMovie("my_FLVPlybk"). After that, if I drop back through the above code, attachMovie no longer loads the FLVPlayback component. Any ideas as to what I am doing wrong or suggestions for a better approach to this one? Is unloadMovie not the correct way to get rid of my_FLVPlybk?

      Thanks,

      Mark
        • 1. Re: Problem with FLVPlayback
          SoCalMX Level 1
          Let me try this again...

          I successfully display a .flv using the following:

          attachMovie("FLVPlayback", "my_FLVPlybk", getNextHighestDepth(), {_width:320, _height:240, x:389, y:226});
          my_FLVPlybk.skin = "file:///C|/Program Files/Macromedia/Flash 8/en/Configuration/Skins/ClearExternalPlaySeekMute.swf";
          my_FLVPlybk.contentPath = "file:///C|/Documents and Settings/HP_Administrator/My Documents/My Videos/VidOne.flv";

          After using unloadMovie: unloadMovie("my_FLVPlybk");, the above code will no longer attach FLVPlayback to the stage again.

          Any ideas?

          Thanks.