Title: quote


Dan Rossi said the following:
John Kirby wrote:

 public function timeHandler(event:TimerEvent):void{
            this.elapsedTime = stream.time
            rFlex.bar.setProgress(new Number(this.elapsedTime),uint(mmd.duration));
            if(this.elapsedTime >= uint(mmd.duration)){
                this.elapsedTime  = 0;
                dispatchEvent(new Event(TimerEvent.TIMER_COMPLETE));
            }
        }


<mx:ProgressBar>
Ok wow, i didnt know flex had a progress bar component ?? where is this rFlex.bar.

Here is the code for formating

private function formatTimeString(sTime:String):String{
            var hours:String;
            var mins:String;
            var secs:String;
            var formatter:NumberFormatter = new NumberFormatter();
            formatter.rounding =  NumberBaseRoundType.DOWN;
            formatter.precision = -1;
           
            var iDuration:int = uint(sTime)
            var iHours:int = iDuration/3600;
            var iMinutes:int = iDuration/60;
           
            // Do hours string
             if (iHours < 1){
                 hours = "00";
             }else if(iHours >= 10){
                 hours = formatter.format(iHours);
             }else{
                 hours = "0" + formatter.format(iHours);
            }
           
            // Do minutes String
            if(iMinutes < 1){
                 mins = "00";
             }else if(iMinutes >= 10){
                 mins = formatter.format(iMinutes);
             }else{
                 mins = "0" + formatter.format(iMinutes);
            }
            var iSeconds:int = iDuration - (iMinutes * 60);
           
            if (iSeconds < 10){
                secs = "0" + formatter.format(iSeconds);
            }else{
                secs =  formatter.format(iSeconds);
            }
           
            return hours + ":" + mins + ":" + secs;
           
        }

I looked at DateFormatter and I couldn't figure how to take just seconds and convert it to the string (00:00:00).      If there is a simpler way ... someone please show me.

Thanks, that seems alot of code, the dateformatter does it all in one line i think :)


Took forever?  Hmmm... what type of pipe do you have?

I left it alone for about 1 minute. We have crap aussie internet here mate a 1MB down adsl connection.


_______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org

--


Whether you think that you can, or that you
can't, you are usually right.
 - Henry Ford
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to