0 Replies Latest reply on Mar 10, 2007 1:38 PM by joe_the_flow

    Radio button stops move at end of play

    joe_the_flow
      I have two radio buttons that are controlling my flv movies. The first one is "cont" which is for continuous play, e.g. once the current movie is finished it starts the next one in the order list.

      What I want to add a radio button that, when selected, will only allow the end-user to view one movie at a time. If they want to view the next, or any movie for that matter, they must select the movie from the drop-down list.

      Here's the actionscript that I have currently. Thanks in advance for any help. I'm new to this.

      ____________________________________

      var xml:XML = new XML();
      xml.ignoreWhite = true;

      xml.onLoad = function() {
      var nodes = this.firstChild.childNodes;
      for(i=0;i<nodes.length;i++) {
      list.addItem(nodes .attributes.desc,nodes.attributes.flv);
      }
      vid.play(list.getItemAt(0).data);
      list.selectedIndex = 0;
      }

      xml.load("playlist.xml");

      var lList:Object = new Object();
      lList.change = function() {
      vid.play(list.getItemAt(list.selectedIndex) .data);
      count = list.selectedIndex;
      }

      list.addEventListener("change",lList);

      var vidList:Object = new Object();

      var count:Number = 0;

      vidList.complete = function() {
      if(cont.selected) {
      if(count == list.length-1) {
      count = 0;
      }
      else {
      count++;
      }
      }
      vid.play(list.getItemAt(count).data);
      list.selectedIndex = count;
      }

      vid.addEventListener("complete",vidList);