#1 (permalink)  
Old 07-23-2008, 04:33 PM
Junior Member
 
Join Date: Jul 2008
Posts: 2
Default specifying a video to play first

Which section in the code would I need to modify if I wanted a specific video to be the first one to load (instead of the first item of xml)?
Reply With Quote
  #2 (permalink)  
Old 07-28-2008, 02:26 PM
Super Moderator
 
Join Date: May 2008
Posts: 518
Send a message via Skype™ to Adrian
Default

Since this is a multilevel structure it is a little bit tricky to search for a selected xml node. This option is not available yet. Maybe in a future version.
Reply With Quote
  #3 (permalink)  
Old 08-04-2008, 12:00 PM
Junior Member
 
Join Date: Jun 2008
Location: Lisboa Portugal
Posts: 7
Send a message via ICQ to MagiCminD Send a message via MSN to MagiCminD Send a message via Yahoo to MagiCminD Send a message via Skype™ to MagiCminD
Default

@Dennisk:

You can search the movide to load at the loading of the XML, setting the Node to point to it:

Code:
xd.onXMLLoadSuccess = function() {
	playlist_mc.root = this.root;
	playlist_mc.data = this.root;
	xlf.node = this.root.firstChild; //XML Level File
//----------------------------------------------------------
	_root.FC.autoPlay = true;
	var thisnode="";
	var fic= xlf.firstFile;
	var Cnnt:Number=0;
	
	var p:XMLNode;
	var temFilme=false;
	p=this.root.firstChild;
	

		var ft=0;
		for (var aNode:XMLNode = p; aNode != null; aNode=aNode.nextSibling) {
			if (aNode.nodeName == "video") {
				temFilme = true;
				break;
			}
			if (temFilme)
					break;
			ft++;
		}
		while (p.hasChildNodes() && (!temFilme)){
			ft=10*ft;
			p = p.firstChild
			for (aNode:XMLNode = p; aNode != null; aNode=aNode.nextSibling) {
					if (aNode.nodeName == "video") {
						temFilme = true;
						break;
					}
				}
			if (temFilme)
				break;
			ft++;
		}
		p.nextSibling;
	
	xlf.node=aNode;
	_global.checkedVars = false;
	_global.OnlineView = false;
	_global.__complete = true;
	_global.isPub = false;
	_global.xlf = xlf;
	_global.xlf.node = aNode;
	_root._visible = true;
};
Explaining: temfilme = "has movie"
;-)
Hope it helps


Fernando, Lisboa Portugal.

______________________________________________
It's not that I'm anti-social.. I'm just not user friendly!
Reply With Quote
  #4 (permalink)  
Old 08-04-2008, 05:22 PM
Junior Member
 
Join Date: Jun 2008
Location: Lisboa Portugal
Posts: 7
Send a message via ICQ to MagiCminD Send a message via MSN to MagiCminD Send a message via Yahoo to MagiCminD Send a message via Skype™ to MagiCminD
Default

please forget about the

p.nextSibling;

'cause it's not needed.
Also, check the globals, as these are used on one of my projects.
So adapt...
;-)



Best,
Fernando
_____________________________________________
It's not that I'm anti-social, I'm just NOT user-friendly!
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.