Passing a variable to the FLVPlayback Object

Hello to all,

I need some help, I don’t even know if its possible. But can you pass a variable with a query string to FLVPlayback Object.

I did manage to figure out how to do this if the videoHolder that is created by going to the Library box menu and selecting New Video and then setting the video properties to be controlled by action script.

This is what I have:

var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
var rootNode:XMLNode;
var videoXML:XML = new XML();
videoXML.ignoreWhite = true;
videoXML.onLoad = loadCombo;
videoXML.load(myVideo);

var listener:Object = new Object();
listener.change = function(evtObj:Object):Void {
playVideo();
}
video_cbo.addEventListener(“change”, listener);

function playVideo():Void {
var videoName:String = video_cbo.selectedItem.data;
dynamic_video.attachVideo(stream_ns);
stream_ns.onStatus=function(infoObject:Object):Void {
if(infoObject.code==“NetStream.Play.Stop”){
stream_ns.seek(0);
stream_ns.play();
}
};
stream_ns.play(“FLV/” + videoName);
}

function loadCombo(success:Boolean):Void {
if (success) {
var cboLabel:String, cboFile:String;
rootNode = this.firstChild;
for (var i:Number=0;i<rootNode.childNodes.length;i++){
cboFile = rootNode.childNodes*.attributes.src;
cboLabel = rootNode.childNodes*.attributes.caption;
video_cbo.addItem({label: cboLabel, data: cboFile});
}
playVideo();
}
}

I’m basically building a video player that has a list component that gets populated with a xml file of flv files locations and when you click on a particular title in the list it plays it in my videoHolder.

Here is the problem I now need to build a seek bar to be able to navigate through the movie, which is a pain and I don’t even know where to start for my videoHolder.

But if my video was using an FLVPlayback component I can then use one of the skins or build a custom one because it’s easy for this Component.

But placing an FLVPlayback component on the stage instead of the videoHolder I have and giving it an instance name of dynamic_video just like my videoHolder had, doesn’t seem to work. I hear the sound of the video but I don’t actually see any video.

What am I doing wrong here? In theory shouldn’t any video player method given the same instance act the same way with the same actionscript.