Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-23-2007, 12:46 PM   #1
rprincejr
Registered User
 
Join Date: Mar 2006
Posts: 11
Exclamation FLV Playback questions

I am setting up a video player with xml playlist using the flvplayback component. The xml playlist works fine, but when I click on a video in the list nothing happens. Im not sure what exactly is wrong. Heres my actionscript which is in frame 1.

Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);

vPlayer.attachVideo(ns);


var vlist:XML = new XML();
vlist.ignoreWhite = true;

vlist.onLoad = function() {
	var videos:Array = this.firstChild.childNodes;
	for (i=0;i<videos.length;i++) {
		VideoList.addItem(videos[i].attributes.desc,videos[i].attributes.url);
	}
	
	ns.play(VideoList.getItemAt(0).data);
	VideoList.selectedIndex = 0;
}

var vidList:Object = new Object();

vidList.change = function() {
	ns.play(VideoList.getItemAt(VideoList.selectedIndex).data);
}

VideoList.addEventListener("change",vidList);
vlist.load("http://localhost/usab/video/videos.xml");
I have left contentPath for the flvplayback component blank but named the component instance vPlayer.

Lastly, this is a cosmetic question.

My xml is listed in a listbox. The mouse over and highlights are green. How do I change the colors to something better?
rprincejr is offline   Reply With Quote
Old 02-23-2007, 07:17 PM   #2
rprincejr
Registered User
 
Join Date: Mar 2006
Posts: 11
Default

Problem resolved.

This section of actionscript was the problem.

Code:
ns.play(VideoList.getItemAt(VideoList.selectedIndex).data);
I was calling out ns.play instead of defining the content path for the component. Here is the correct code.

Code:
vPlayer.contentPath = VideoList.getItemAt(VideoList.selectedIndex).data;
rprincejr is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Proxus FLV Player and referencing FLV file in HTML (flashvar or ?) lotuscreative Components 2 02-12-2009 04:41 AM
Problems with FLV playback Gillies ActionScript 2.0 6 02-13-2007 09:16 PM
questions about flv functionality funwithdirt1` ActionScript 2.0 1 02-13-2007 07:16 AM
Randomly Loading Questions from XML for Quiz. Dave At ADC ActionScript 2.0 0 12-14-2005 01:49 PM
[Q] Do we need those forums??? CyanBlue General Chat 59 07-27-2004 11:13 AM


All times are GMT. The time now is 09:42 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.