2 Replies Latest reply on Nov 2, 2008 6:17 PM by salut

    How to display multiple videos?

    salut Level 1
      I'm a Flex newbie and struggling to display several videos on a page. I'm using the Repeater and VideoDisplay tags, but got error messages such as

      1. {myRepeater.currentItem.id} is not a valid identifier.
      2. When I click on the play, pause, or stop button, it says that play, pause, or stop is not a function.

      Could you please give me pointers or tell me where to find sample code that displays multiple videos?

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
      import mx.collections.ArrayCollection;
      private var arrayData:Array=[

      private var dp:ArrayCollection= new ArrayCollection(arrayData);


      <mx:Repeater id="myRepeater" dataProvider="{dp}">
      <mx:VideoDisplay id="{myRepeater.currentItem.id}" source="{myRepeater.currentItem.xlink}" autoPlay="false"/>
      <mx:Button label="Play" click="{myRepeater.currentItem.id}.play();"/>
      <mx:Button label="Pause" click="{myRepeater.currentItem.id}.pause();"/>
      <mx:Button label="Stop" click="{myRepeater.currentItem.id}.stop();"/>