I am playing 4 video in video component at a time using XML. And if XML is updated then without refreshing page I want updated result. I am using Flash 8 and Actionscript 2.0
XML file code is:
<?xml version="1.0"?>
<root>
<video name="video1.flv"></video>
<video name="video2.flv"></video>
<video name="video3.flv"></video>
<video name="video4.flv"></video>
</root>
Actionscript code is:
stop();
import mx.alert;
import mx.video.;
importXML = new XML();
importXML.ignoreWhite = true;
importXML.onLoad = function(success) {
if (success) {
var depth = 100;
var nextY = 10;
var root = this.firstChild;
// The root node
var attr = root.attributes;
var cnt123 = 0;
var video:Array = new Array();
var cname:Array = new Array();
for (var i = root.firstChild; i != null; i=i.nextSibling) {
var j = i.attributes.name;
video[cnt123] = i.attributes.name;
my_btn = i.attributes.name;
cname[cnt123] = i.attributes.cname;
cnt123++;
}
for (var l = 0; l<4; l++) {
var stt:String;
stt = video[l];
//trace(stt+“-----”);
if (!(stt.indexOf(“.flv”, 0))) {
video[l] = “novideo.flv”;
}
trace(video[l]+“*“);
//trace(l+””+video[l]);
}
if (video[0]) {
my_btn0.contentPath = video[0];
my_btn0.volume = 100;
}
}
if (video[1]) {
my_btn1.contentPath = video[1];
my_btn1.volume = 100;
}
if (video[2]) {
my_btn2.contentPath = video[2];
my_btn2.volume = 100;
}
if (video[3]) {
my_btn3.contentPath = video[3];
my_btn3.volume = 100;
}
};
importXML.load(“video.xml”);
Can anyone help me!!!