djungle
04-03-2003, 06:43 PM
Hi,
Is it possible to have a listBox selection pause for, say, 10 seconds and automatically select the next entry?
My Code looks like this.
pics_xml = new XML();
pics_xml.ignoreWhite = true;
pics_xml.onLoad = function(sucess) {
if (sucess) {processList(pics_xml);}
}
// Load up the XML file into Flash
pics_xml.load('pictures.xml');
function processList(List)
{
pictures = new Array();
var children = List.firstChild.childNodes;
for(i = 0; i < children.length; i++)
{
tmp = children[i].childNodes;
tmpObj = new Object();
for(j=0;j<tmp.length;j++)
{
if(tmp[j].nodeName == 'Name') {
lb_myPictures.addItem(tmp[j].firstChild.nodeValue, j);
}
tmpObj[tmp[j].nodeName] = tmp[j].firstChild.nodeValue;
}
pictures.push(tmpObj);
}
lb_myPictures.setChangeHandler("clickHandler");
}//end function processList
function clickHandler()
{
index = lb_myPictures.getSelectedIndex();
trace ("Show " + pictures[index].Name + " Picture");
loadMovie(pictures[index].picLink,_root.myPics);
}
Thanks
Django
Is it possible to have a listBox selection pause for, say, 10 seconds and automatically select the next entry?
My Code looks like this.
pics_xml = new XML();
pics_xml.ignoreWhite = true;
pics_xml.onLoad = function(sucess) {
if (sucess) {processList(pics_xml);}
}
// Load up the XML file into Flash
pics_xml.load('pictures.xml');
function processList(List)
{
pictures = new Array();
var children = List.firstChild.childNodes;
for(i = 0; i < children.length; i++)
{
tmp = children[i].childNodes;
tmpObj = new Object();
for(j=0;j<tmp.length;j++)
{
if(tmp[j].nodeName == 'Name') {
lb_myPictures.addItem(tmp[j].firstChild.nodeValue, j);
}
tmpObj[tmp[j].nodeName] = tmp[j].firstChild.nodeValue;
}
pictures.push(tmpObj);
}
lb_myPictures.setChangeHandler("clickHandler");
}//end function processList
function clickHandler()
{
index = lb_myPictures.getSelectedIndex();
trace ("Show " + pictures[index].Name + " Picture");
loadMovie(pictures[index].picLink,_root.myPics);
}
Thanks
Django