PDA

View Full Version : Flash 8 .flv Playback component


AndyT
04-29-2008, 08:26 AM
Hi Folks

I am wondering whether it is possible to populate the contentPath string of the FLVPlayback component by writing a function that passes the path of the video into the player. There are many examples of this using the NetStream object and a list component but I don't want to do it this way. I will be using FlashComm 1.5 to stream the video but for the moment progressive download is fine.

All I want to do is have 4 simple movie clips acting as buttons and passing the new string to the player onRelease.

If we had an FLVPlayback component with the instance name of player could I create a variable of the contentPath parameter as below:



var vidPath:String = ""
vidPath = player.contentPath



and have a button passing the new content string



_root.btn.onRelease = function() {
vidPath = "video/video.flv";
};



Obviously this doesn't work but it gives you an idea of what I am trying to achieve. I would have to use the NetStream and NetConnection objects to make this work.

Any ideas? Thanks muchly...

Andy

atomic
04-29-2008, 02:22 PM
The following works for me...


var vidPath:String = "";

_root.btn.onRelease = function() {
vidPath = "video/video.flv";
player.contentPath = vidPath;
};

AndyT
04-29-2008, 11:17 PM
Hi Atomic

Spot on as usual! Hope you are well.

Thanks muchly!;)

Cheers

AndyT

atomic
04-30-2008, 01:13 AM
Grrrrreat! ;)