all groups > flash actionscript > may 2006 >
You're in the

flash actionscript

group:

Problem with FLVPlayback


Problem with FLVPlayback SoCalMX
5/5/2006 10:21:30 PM
flash actionscript:
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
Re: Problem with FLVPlayback SoCalMX
5/6/2006 5:08:37 PM
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.
AddThis Social Bookmark Button