Wednesday, October 1, 2008

NZFXUG FMS3 Flex presentation

Well it was cool to present at this months user group meeting last night. It was really good to have a lot of questions on the subject. If anyone has further questions just hit me up.

Below is the presentation which I presented

Also here are the apps I presented

Video on Demand

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()" width="414" height="375">

<mx:Script>
<![CDATA[
import mx.events.VideoEvent;
private function init():void {
video.addEventListener(VideoEvent.PLAYHEAD_UPDATE, updateBar);
}
private function updateBar(event:VideoEvent):void {
bar.setProgress(event.playheadTime, video.totalTime);
}

]]>
</mx:Script>


<mx:VideoDisplay source="rtmp://localhost/vod/media/mp4:AdobeBand_1500K_H264" id="video" y="10" width="320" height="240" autoPlay="false"
volume="{volume.value}" x="10"/>
<mx:VSlider id="volume" x="338" value="0.5" minimum="0" maximum="1" snapInterval="0.1" allowTrackClick="true" liveDragging="true" top="10" bottom="80"/>
<mx:Button label="play" click="video.play()" x="10" y="278"/>
<mx:Button label="pause" click="video.pause()" x="68" y="278"/>
<mx:Button label="stop" click="video.stop(); video.playheadTime = 0;" x="136" y="278"/>
<mx:ProgressBar id="bar" x="10" y="305" minimum="0" maximum="100" direction="right" mode="manual" label="" width="320"/>
</mx:WindowedApplication>


Live

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="372" height="303">
<mx:VideoDisplay source="rtmp://localhost/live/livestream" id="video" y="10" width="320" height="240" live="true"
volume="{volume.value}" x="10"/>

<mx:VSlider id="volume" x="338" value="0.5" minimum="0" maximum="1" snapInterval="0.1" allowTrackClick="true" liveDragging="true" top="10" bottom="51"/>

<mx:Button label="play" click="video.play()" top="258" x="10"/>
<mx:Button label="stop" click="video.stop()" top="258" left="136"/>
<mx:Button label="pause" click="video.pause()" top="258" x="68"/>
</mx:WindowedApplication>






No comments: