play next video or play first video
I would like to refine my code to play the first video when it is on the last item of the xml. So far, the code
Actionscript Code:
setupvideo(_global.file[i + 1],i + 1);
_root.iinfo.tag.tagTxt.htmlText = _global.info[i + 1];
_root.iname.tag.tagTxt.htmlText = _global.tag[i + 1];
_root.iname.update();
_root.iinfo.update();
tags();
works great. Except when it gets to the last item on the xml. Then it loops on a single random video. Please help!
I have even tried this code,
Actionscript Code:
if(_global.file == 0)
{
setupvideo(_global.file[0],0);
_root.iinfo.tag.tagTxt.htmlText = _global.info[0];
_root.iname.tag.tagTxt.htmlText = _global.tag[0];
_root.iname.update();
_root.iinfo.update();
tags();
}
else
{
setupvideo(_global.file[i + 1],i + 1);
_root.iinfo.tag.tagTxt.htmlText = _global.info[i + 1];
_root.iname.tag.tagTxt.htmlText = _global.tag[i + 1];
_root.iname.update();
_root.iinfo.update();
tags();
}
but it still does not work. :confused: