topical media & game development

talk show tell print

component-playlist.mx

component-playlist.mx [swf] flex


  <?xml version="1.0"?>
  <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
  xmlns:ae="*" 
  >
  <mx:Script>
   <![CDATA[
    import flash.events.MouseEvent;
  

video(s)


    // [Bindable] public var video:Object;
    [Bindable] public var index:uint = 0;
    [Bindable] public var max:uint = 4;
    public var list:Array = [
        "../assets/clips/blip/rgbxyz.flv",
        "../assets/clips/shout/strangest.flv",
        "../assets/clips/tube/baby-laugh.flv",
        "../assets/clips/tube/strings.flv"
    ];
    [Bindable] public var source:String = list[index];
  

click


    public function click ( video:Object):void
    {
        index += 1; if (index > (max-1)) index = 0;
        video.stop();
        source = list[index]; // bindable
        video.play();
    }
   ]]>
  </mx:Script>
  </mx:VBox>
  


(C) Æliens 27/08/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.