AS2 Load Video From XML In Respective Video Objects
Hello Flash Kit
Iv been a long time troller of the flash kit forums but never needed to ask for help until today. Me and XML are not friends, it never wants to work for me. So i have come to you for help. I need to load videos via XML into its respective video objects.
so ..... this is what i need to do
onClick of video1_btn play the first video in the XML in videoObj_1
onClick of video2_btn play the second video in the XML in videoObj_2
onClick of video3_btn play the third video in the XML in videoObj_3
also i have failed at creating the functional as2 code. after doing it 5 times i have just taken it out and started to seek out help from communities. so AS code would be a blessing
// load the xml file
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("videos.xml");
// parse the nodes of the xml into an array
function loadXML(){
vidArray = new Array();
aNode = this.firstChild.childNodes;
len = aNode.length;
for(var n=0;n!=len;n++){
vidArray[n] = aNode[n].attributes.url;
}
};
// buttons
video1_btn.onRelease = function(){
trace(vidArray[0]);
// videoObj_1 - instance name of FLVPlayback component
videoObj_1.contentPath = vidArray[0];
};
The thing i want to do is almost what you publish on your FLA.
What i want is...
Having 2 buttons(image) to let the visitor choose the video they want to see.
After that the video play .. and a button appear ( back to choice ) or automaticly reload the swf to return to the "first frame"
Actually i need something like ... 195 width and almost 200 height.
So i try to put your script / button in a new one, but if they are suppose to play inside my little space, actually they play both but, i'm not able to play the choice #1 ( it's over #2) because #2 overlap #1 player!