Question
Please help me with FLV Playback
I have set a FLV player in my flash document. It loads
external videos. Over the FLV Player screen I have a MovieClip
called "Videoclick" which says "Press here to start video" and
disappears when you press the play button. Here is the code:
//Setting the FLV Player Component//
var cfp:mx.video.FLVPlayback;
var cppb:MovieClip;
var cpsb:MovieClip;
var cpvb:MovieClip;
var cpmb:MovieClip;
player_mc.cfp.playPauseButton = player_mc.cppb;
player_mc.cfp.stopButton = player_mc.cpsb;
player_mc.cfp.volumeBar = player_mc.cpvb;
player_mc.cfp.muteButton = player_mc.cpmb;
//the code to make Videoclick disappear and start playback//
player_mc.cppb.onPress = function() {
if (_root.VideoClick._alpha=100) {
_root.VideoClick._alpha = 0;
_root.player_mc.cfp.play();
} else if (FLVPlayback.playing=true) {
_root.player_mc.cfp.pause();
} else if (FLVPlayback.playing=false) {
_root.player_mc.cfp.play();
}
};
player_mc.cpsb.onPress = function() {
_root.VideoClick._alpha = 100;
_root.player_mc.cfp.stop();
};
player_mc.cfp.contentPath = ("videos/"+Teaser[_root._currentframe-FrameDifMarketing]);
The problem I'm having is that the "Videoclick" movieclip disappears and the video starts playing (as I want) but after that, the pause button doesn't work anymore.
I haven't many actionscrip experience and any help would be appreciated.
Thanks
Alberto
//Setting the FLV Player Component//
var cfp:mx.video.FLVPlayback;
var cppb:MovieClip;
var cpsb:MovieClip;
var cpvb:MovieClip;
var cpmb:MovieClip;
player_mc.cfp.playPauseButton = player_mc.cppb;
player_mc.cfp.stopButton = player_mc.cpsb;
player_mc.cfp.volumeBar = player_mc.cpvb;
player_mc.cfp.muteButton = player_mc.cpmb;
//the code to make Videoclick disappear and start playback//
player_mc.cppb.onPress = function() {
if (_root.VideoClick._alpha=100) {
_root.VideoClick._alpha = 0;
_root.player_mc.cfp.play();
} else if (FLVPlayback.playing=true) {
_root.player_mc.cfp.pause();
} else if (FLVPlayback.playing=false) {
_root.player_mc.cfp.play();
}
};
player_mc.cpsb.onPress = function() {
_root.VideoClick._alpha = 100;
_root.player_mc.cfp.stop();
};
player_mc.cfp.contentPath = ("videos/"+Teaser[_root._currentframe-FrameDifMarketing]);
The problem I'm having is that the "Videoclick" movieclip disappears and the video starts playing (as I want) but after that, the pause button doesn't work anymore.
I haven't many actionscrip experience and any help would be appreciated.
Thanks
Alberto
