Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Playing multiple FLV videos.

Status
Not open for further replies.

Dustman

Programmer
May 7, 2001
320
US
I'm loading several different link to .flv videos. I want each one to play in the same window. Currently, I can get the first one I click to play but the others just make it sit there like its trying to download. My trace function still outputs but the video just goes blank. It doesn't matter which one either.

Code:
class ClipMenuItem extends MovieClip {
	var ClipURL:String;
	var txtClipName:TextField;
	
	function init(myVideo:VideoClip) {
		this.ClipURL = myVideo.filename;
		this.txtClipName.text = myVideo.VideoTitle;
	}
	
	function showClip() {
		this._parent._parent.ClipPlayer.load(this.ClipURL);
		this._parent._parent.ClipPlayer.play();
		trace("Loading "+this.ClipURL);
	}
	
	function onPress() {
		this.showClip();
	}
}

Any ideas?

-Dustin
Rom 8:28
 
Well.. I finally got it to work, but I'm confused as to why it wasn't working. I deleted the FLVPlayback from the stage and removed and added it from code everytime. No big deal.. just confusing as to why you can't just change the content of an existing player.

Here's my final load code:
Code:
function showClip() {
		this._parent._parent.removeMovieClip("ClipPlayer");
		this._parent._parent.attachMovie("FLVPlayback", "ClipPlayer", this._parent._parent.getNextHighestDepth(), {_x:198.3, _y:6.3, _width:271.4,_height:205.3, autoPlay:true});
		this._parent._parent.ClipPlayer.autoSize = false;
		this._parent._parent.ClipPlayer.maintainAspectRatio = false;
		this._parent._parent.ClipPlayer.skin= "SteelExternalNoVol.swf";
		this._parent._parent.ClipPlayer.volume = 0;
		this._parent._parent.ClipPlayer.volume = 100;
		this._parent._parent.ClipPlayer.contentPath = this.ClipURL;
	}

Another odd thing.. if you notice, I have to set the volume to 0 and then back to 100 everytime. If I remove that, or if I just set the volume to 100, it works for the first video but all the videos after that have no audio until I actually click the mute button off then on.

-Dustin
Rom 8:28
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top