Hi,
I'm using a PHP Script to create XML. Which pulls through the data from a Database.
I have an video list, which pulls through X amount of videos. But I want to show them 5 at a time. I want to hide a button once it reaches the amount of videos in the XML.
Hope there's enough detail in this question. My script is as follows.....
// Event Handler
protected function videoRetrieval_resultHandler(event:ResultEvent):void {
var videoData:ArrayCollection = event.result.videos.video;
var viddata:Videoinfo;
for each (var vid:Object in videoData)
{
viddata = new Videoinfo();
viddata.id = vid.id;
viddata.title = vid.title;
viddata.thumbnail = vid.thumbnail;
videos.addItem(viddata);
}
}
protected function button1_clickHandler(event:MouseEvent):void
{
// Handle the button
videoArea.verticalScrollPosition += 5;
videoArea.liveScrolling = true;
}
protected function button2_clickHandler(event:MouseEvent):void
{
//Handle the button
videoArea.verticalScrollPosition -= 5;
videoArea.liveScrolling = true;
}
I need an IF statement in there to check the number of videos in the XML file and show or hide the relevant button too.
Thanks in advance.