Progress bar for player?

Hi All,
I am developing a player,
I not able to get how to create a progress bar  which shows download data and the player
Like YouTube which show the download as well as the player head.
Thanks in advance.

if the video is a live stream, it's impossible to do it.
You can't work out your player position or amount downloaded because the end position and total file size are unknown.
I'm guessing you may actually mean you want the progress bars to be live and not manually controlled, in which case you could use a timer
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="top"
    horizontalAlign="center" paddingTop="0" applicationComplete="init()">
    <mx:Script>
        <![CDATA[
          private var j:uint=1;
          private var m:uint=1;
          import flash.utils.Timer;
          import flash.events.TimerEvent;
            private const MS_MASK:String = "000";
            private const TIMER_INTERVAL:int = 1;
            private var baseTimer:int;
            private var t:Timer;
            private function init():void
                t = new Timer(TIMER_INTERVAL);
                t.addEventListener(TimerEvent.TIMER, updateTimer);
                startTimer();
            private function updateTimer(evt:TimerEvent):void {
                var d:Date = new Date(getTimer() - baseTimer);
                var ms:String = (MS_MASK + d.milliseconds).substr(-MS_MASK.length);
                if (int(ms) > 100)
                    //Update & Calculation functions go here//
                    runit2();
                    runit();
                    stopTimer();
            private function startTimer():void {
                baseTimer = getTimer();
                t.start();
            private function stopTimer():void {
                t.stop();
                startTimer();
          private function runit2():void
              if(j<=100)
                 bar2.setProgress(j,100);
                 j+=2;
              if(j>100)
                 j=0;
          private function runit():void
              if(m<=100)
                 bar.setProgress(m,100);
                 m+=1;
              if(m>100)
                 m=0;
        ]]>   
    </mx:Script>
    <mx:Panel title="ProgressBar Control" layout="absolute" color="0xffffff" borderAlpha="0.15"
         paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center" x="307" y="297" height="152" width="409">
        <mx:ProgressBar id="bar" labelPlacement="bottom" themeColor="#EE1122" minimum="0" visible="true" maximum="100"
             color="0x323232" direction="right" mode="manual" width="100%" x="10" y="74"/>
         <mx:ProgressBar id="bar2" labelPlacement="bottom" themeColor="#0088FF" minimum="0" visible="true" maximum="100"
             color="0x323232" direction="right" label="" mode="manual" width="100%" x="10" y="74" alpha="0.1"/>  
    </mx:Panel>
</mx:Application>
a function you might find useful in doing this would be the PHP filesize function
http://php.net/manual/en/function.filesize.php
you could send off a script at the begging on the stream calculating the total filesize, and then compare that against amount downloaded in you AS3, what would be download progress sorted.

Similar Messages

  • After updating to the latest version of Firefox on my Mac there is no progress bar for the page load. I really miss this feature and can't seem to find a way to obtain it.

    The page load progress bar that was on the lower right of the window is no longer there. After updating to the latest version of Firefox on my Mac there is no progress bar for the page load. I really miss this feature and can't seem to find a way to obtain it. The tab has a circular progress wheel but this is useless for determining a stuck or slow loading page.
    PLEASE NOTE: I am typing this in from a Windows based work computer but am asking about my Apple MacBook Pro that i use at home.

    Firefox 4 saves the previous session automatically, so there is no longer need for the dialog asking if you want to save the current session.<br />
    You can use "Firefox > History > Restore Previous Session" to get the previous session at any time.<br />
    There is also a "Restore Previous Session" button on the default <b>about:home</b> Home page.<br />
    Another possibility is to use:
    * [http://kb.mozillazine.org/Menu_differences Firefox (Tools) > Options] > General > Startup: "When Firefox Starts": "Show my windows and tabs from last time"

  • How to use progress bar for Main and Subsequences in teststand

    HI,
    I have one main sequence in that I am calling different subsequences (Containing many steps and for loop).
    I am trying to use progress bar for this sequence, but my requirement is progressbar is able to show the progress of all the steps containing in Main and subsequences.
    I have developed sequence in that I am able to show the progress for only Main sequence steps not for subsequences steps.
    Is it possible? If yes please let me know the suggestions.
    Thank You

    Hi Santosh
    Here you are
    Greetings
    Juergen
    never Double Click on Submit
    Message Edited by j_dodek on 08-05-2008 08:05 AM
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
    Attachments:
    Progress_ts351.seq ‏52 KB

  • Problem with a progress bar for downloading attachment

    I display the progress bar for downloading attachments and it works fine … but when I am downloading some attachments I get the exception message:
    Exception in thread "main" com.sun.mail.util.DecodingException: BASE64Decoder: Error in encoded stream: needed 4 valid base64 characters but only got 1 before EOF, the 10 most recent characters were: "Q3w5ilxj2P"
    I found the explanation:
    Certain IMAP servers do not implement the IMAP Partial FETCH
    functionality properly. This problem typically manifests as corrupt
    email attachments when downloading large messages from the IMAP
    server. To workaround this server bug, set the
         "mail.imap.partialfetch"
    property to false. You'll have to set this property in the Properties
    object that you provide to your Session.
    http://java.sun.com/products/javamail/NOTES113.txt
    So I turned off partial fetch:
    Properties props = System.getProperties();
    props.setProperty("mail.store.protocol", "imaps");
    props.setProperty("mail.imaps.partialfetch", "false");
    Session session = Session.getDefaultInstance(props, null);
    Store store = session.getStore("imaps");
    store.connect("imap.gmail.com", "<username>","<password>");this solved the problem ….however the method getInputStream() from the Part class blocks the thread until the attachment is completely downloaded and it is impossible to get the information about the number of bytes which have been already downloaded from mailbox.
    Without this information it is impossible to display the progress bar. So is there a way to obtain this information and display the progress bar?
    Edited by: 911161 on 2012-01-31 10:55

    Try the answer I provided to your post on stackoverflow.com:
    http://stackoverflow.com/questions/9086700/how-to-displaly-progress-bar-for-downloading-attachment

  • Progress bar for movieclip animations

    Hello,
    I have to create a presentation with audio and animation synced - it's about 5 minutes.  It has 5 buttons at the bottom that the user can use to navigate to a particular subject of the presentation.  But I was asked if there could be a progress bar for each subject so that the user could see how far they've gone.  I'm thinking I could have something check to see how far along the audio is and have a bar move along as the audio moves along.
    This seems like a project that's probably been done, if anyone could help that'd be great, thanks!

    I don't deal with sound much, but you should be able to monitor the position property against the duration property much like CL mentioned using the frames.  You would use the ratio of position/duration to determine how far along the playtime is (percent complete), and you can use that value to control the width of a progress bar.
    A progress bar can be as simple as a rectangular strip whose normal width would be the 100% complete size.  You control the width by using the percentage complete times that full width value.  To make it more visually representative of when the end is coming, when you draw that rectangle, include a line border.  But isolate the fill as as the progress bar movieclip.  That way, the border lets you know what the full size is while the fill as a movieclip changes to fill up the outline.  You can also include a textfield if you like to display the percent completion.

  • Progress bar for FLV

    Hi -
    I have a site with some pretty hefty FLV's and I want to show
    the user that they are loading...the progress bar thing.
    So I used the code right out of the livedocs for "Creating a
    progress bar for loading FLV files with Actionscript". I used it
    with their sample FLV and with my FLV and got the same result. I
    saw a progress bar and percent text, I heard the audio, but no
    video. Can anyone help me either fix the livedoc code or use some
    other to get this to work??
    Thanks,
    Josh

    “…but no video.”
    Ok. From the beginning;
    1. CTRL+L to open up the library panel.
    2. On the very top right corner there is an icon. Click on
    it.
    3. A menu will appear and then select “New
    Video”.
    4. Drag this instance from the library onto the stage.
    5. Give it an instance name of “my_video”
    6. Put the code from the livedocs into frame one.
    That should work. If you can actually compile the code with
    nothing on stage and you can hear the audio from that FLV. So that
    means you don’t have a Video instance on stage or incorrect
    instance name. Good luck.

  • Progress bar for animation

    I am trying to make a progress bar for my animation, similar
    to the stock flv players that came with CS3.
    I am controlling a swf file loaded into the 'container'
    movieclip, and I can get the scroll bar to control the movieclip.
    In other words, the animation will jump to the right frames when I
    drag the bar. However, when I put in code to make the progress bar
    follow the action (using a onEnterFrame event handler) It follows
    the animation, but now I can't scroll.
    Question: How do I make my scroll bar stop following the
    action when you click on it to scroll somewhere else???
    Thanks in advance for your help!

    Ok, so i took another crack at it and fixed the action script issues which for some reason half disappeared when i loaded it back up ( Maybe it didn't properly register the change back to AS 3? I resolved the other ones that popped up in it's stead after staring at the code for a bit ). Next a related issue so i'm gonna post it here, but does anyone know how to get the image rotation loop to play while it loads?

  • Progress Bar for file upload

    Dear sirs...
    i have an ADF UIX page that uploads an ORDVideo file. is it possible to display the progress in the upload operation using a progress bar for example???
    thanks for any help

    Did you get to know how to do it?
    Anuj

  • TS3681 the device displays the Apple logo with no  progress bar for 8 hours until battery run flat.

    My Iphone4 displays the Apple logo with no progress bar for 8 hours until battery went flat this was after i try to make an up date know the  i tunes dosent reconise my phone.
    Can you please help me
    Thank you.

    http://support.apple.com/kb/ht1808

  • HT201263 my iphone 3g Stops responding, showing the Apple logo with no progress bar or a stopped progress bar, for over ten minutes ..plz give me suggusition ?

    Stops responding, showing the Apple logo with no progress bar or a stopped progress bar, for over ten minutes

    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

  • Progress bar for RTMP protocol

    Hi Guys,
    Anyone know about progress bar in rtmp i m making player using rtmp protocol because it allow to seek in any position even if the video data is not cache but i did not solve this issue how to display progress bar data is loaded i can do this in http protocol using Netstream.bytesLoaded and Netstream.bytesTotal i know rtmp is streaming video but i just want to know the when we pause in youtube u can see bufferlength in light gray which indicate this much of video cache i want to does they rtmp protocol or something else.

    Hi,
    Why can't you use NetStream.bytesLoaded and NetStream.bytesTotal for RTMP streams as well ? NetStream is a top level object that can bind to both HTTP as well as RTMP streams. Please give it a try and let us know if that worked for you.
    Thank you  !

  • Playback progress bar for shockwave?

    Hi I’m currently playing a lot of movies in my shockwave player enbedded in my webbrowser (chrome). Is it possible to se a progress bar and to rewind and fast forward on the playback?
    It would be so good because now I have to relisten to the whole video to skip back just a couple of seconds...
    All the best and thanks for help.

    Controls are dependent on the developer of the Shockwave movie adding them. This isn't a Player property but something the author needs to create - you should contact the developer.

  • Creating Progress Bar for File Upload

    Hi, I'm trying to implement a progress bar indicator for a file upload in WebDynpro, without very good results.
    I'm using a fileupload UI element, a TimerTrigger and a ProgressIndicator UI elements for this purpose.
    It seems that using the fileupload UI element the iview is locked during the file upload, and therefore it prevents for the timer triggered action to be performed (this action updates the progress bar).
    Additionally I havent been able to capture the transfered bytes from the upload. Maybe I'm using the wrong elements?
    How could I achieve this. Has anyone done it?
    I would really appreciate all the help I could get.
    Homer Vargas

    Hi,
    Can anyone please tell me the way to upload file from client system to server.
    The code i have is as follows:-
    Jsp:-
    function saveImage(){
         //projectname.javafilename
         var strStatus = "save";
         document.saveImageForm.action="/irj/servlet/prt/portal/prtroot/TestXML.TextImageLink?frmstatus="+ strStatus;
         document.saveImageForm.method="post";
         document.saveImageForm.submit();     
    <form name="saveImageForm" encrypt="multipart/form-data">
    <table width="388" cellpadding="1" cellspacing="1" bgcolor="#F0F0F0" border='0'>
           <tr>
                 <td><font color="blue" face="verdana" size="2">IMAGE:</font></td><td><input id="image" type="file" name="image" value=""/></td>
         </tr>
    <tr>
         <td><input type="submit" name="submit" value="Submit" onclick="saveImage();"/></td>
         </tr>
    </table>
    </form>
    now i am not getting what to write in java file
    using IPortalComponentRequest.
    Using the jsp file upload in tomcat is working but here it is not working
    please help meee
    Thanks in Advance
    Regards
    Sirisha

  • Progress bar for report?

    Hi there,
    Does anyone have any advice on how to display a progress bar while a report is running (PDF report, web, using Reports 6, OAS)? We have the report output pop up in a new dialog browser window. The window pops up, but depending on the report, sometimes it takes a minute or so before the report output is actually displayed in the window. The users are requesting a progress bar to show them that it's working and how far they are from seeing the output.
    Any ideas? Any built-in functionality? Should I bring Forms into the mix?
    Thanks in advance
    Dave

    user-Rachna wrote:
    I created a dynamic action on 'Before page submit' and showed an alert to see if it works or not. But it doesn't work for my report as the report gets refreshed without submitting the page.
    Here is exactly what I have:
    http://apex.oracle.com/pls/apex/f?p=54687:38:109840028367746
    Thanks.
    It would seem to be an obvious step to create additional dynamic actions on the Before/After Refresh events for the report region to show/hide the plug-in loading frame.

  • Progress bar for unmarshalling?

    Hi all,
    Can anyone give me an idea on how to track unmarshalling with progress bar.
    Here is a situation: I'm unmarsalling XML file to get my working object(s).
    Object obj = unmarshaller.unmarshal(file)Anyway, for big files I would like to present a user with some progressbar which
    will indicate loading progress.
    Is this doable?
    Thanks

    If you are trying to update the progress bar display when your upload is 10%, 20%, , , x% complete, then you have to 'pretend' that the progress bar display corresponds to the percentage completness of your file upload. I believe that there is no other way to get around this without comprimising the speed of your upload.
    Check out the swing forum, I believe there is a lot of discussion on this topic.

Maybe you are looking for

  • Multiple instances of the same BSP app for the same user

    Hi, I currently have a BSP application which has a main page which consists of three frames.  Each of the frames within the page is linked to its own controller, with one other controller controlling the whole page. due to the nature of the program i

  • 3.0.1 have a serious problem with 3G signal?

    Hello. I've installed the 3.0.1 on my iPhone 3G S. My home is in an area usually covered by the 3G signal of TIM (Italy). After the update the 3G signal strenght is very low and the phone is always switching to Edge. It's a shame. I want to put my iP

  • Personal hotspot always disconnects

    Not sure if anyone else has a problem with their iPad 2 constantly disconnecting from the iPhone 4 personal hotspot if left for any period of time, but is there any way to prevent this from happening? Very annoying as you have to into settings every

  • Want a constant time axis in waveform chart

    hello, my time axis in waveform chart is changing .how can i keep it constant say 1-100 .the whole point of this is to make waveform chart luk like a CRO.please need help. thanks in advace naveen.rabelli

  • Device doesn't have a QFS superblock (SBLK)

    Hello, I am trying to set up a QFS shared file system between 2 Solaris machines and a SLES 11 SP1 machine. I have downloaded SUN QFS 5.3 and installed it on both Solaris machines and SLES 11 SP1 machine. I have chose one of the Solaris server to be