I want an urgent help. From metadata information i got the frame rate as 15. So between every second i want to display the values 1 to 15 using timer. But i dont know how to do this . Please help me. its urgent I have attached code also.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top" backgroundColor="white"> <mx:Script> <![CDATA[ import mx.events.VideoEvent; import mx.events.SliderEvent; private function formatTime(item:Date):String { return dateFormatter.format(item); } private function videoDisplay_playheadUpdate():void { /* If playhead time is 0, set to 100ms so the DateFormatter doesnt return an empty string. */ var pT:Number = videoDisplay.playheadTime || 0.1; var tT:Number = videoDisplay.totalTime; /* Convert playheadTime and totalTime from seconds to milliseconds and create new Date objects. */ var pTimeMS:Date = new Date(pT * 1000); var tTimeMS:Date = new Date(tT * 1000); timeLabel.text = formatTime(pTimeMS) ; } private function slider_thumbPress():void { videoDisplay.removeEventListener( VideoEvent.PLAYING, onPlayingVideoUpdate ); videoDisplay.pause(); } private function slider_thumbRelease():void { videoDisplay.addEventListener( VideoEvent.PLAYING, onPlayingVideoUpdate ); videoDisplay.playheadTime = slider.value; videoDisplay.play(); } private function videoDisplay_ready():void { videoDisplay.addEventListener( VideoEvent.PLAYING, onPlayingVideoUpdate ); videoDisplay.visible = true; controlBar.visible = true; } private function onPlayingVideoUpdate() :void { slider.value = videoDisplay.playheadTime; } private function sliderThumbDragHandler( event:SliderEvent ):void { videoDisplay.playheadTime = slider.value; } ]]> </mx:Script> <!-- Only show minutes and seconds. --> <mx:DateFormatter id="dateFormatter" formatString="NN:SS" /> <mx:Zoom id="zoom" /> <mx:Panel title="{videoDisplay.source.split('/').pop()} ({videoDisplay.state})"> <mx:VideoDisplay id="videoDisplay" visible="false" showEffect="{zoom}" playheadUpdate="videoDisplay_playheadUpdate()" ready="videoDisplay_ready()" rewind="videoDisplay.play()" source="video.flv" /> <mx:ControlBar id="controlBar" visible="false"> <mx:HSlider id="slider" width="100%" allowTrackClick="false" invertThumbDirection="true" liveDragging="false" maximum="{videoDisplay.totalTime}" minimum="0" thumbPress="slider_thumbPress()" thumbRelease="slider_thumbRelease()" tickInterval="1" /> <mx:Label id="timeLabel" textAlign="right" /> </mx:ControlBar> </mx:Panel> </mx:Application> Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/