Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default Progress Bar

    Hello,

    I'm trying to implement progress bar for calculations. I opened dialog
    (none-modal) with ProgressBar and set Max value for ProgressBar with
    nrecords. In the loop I increase progress value by 1.

    Forms("Progress")![Progress].Max = nrecords
    Forms("Progress")![Progress].Value = 0
    Do While Not rst.EOF
    rst.Edit
    rst![ANSumma] = rst![NLitri] * rst![rate]
    rst.Update

    Forms("Progress")![Progress].Value =
    Forms("Progress")![Progress].Value + 1

    rst.MoveNext
    Loop
    rst.Close

    I've noticed that Access has been hanging in this loop. The Access stops
    redrawing itself. Is there any universal solution for large amount of
    calculations? What about timer?

    Thnx,
    Sergey


    Sergey Bogdanov Guest

  2. Similar Questions and Discussions

    1. no progress bar on IE7
      hello; when I use javascript to: document.getElementById( "my_shockwave_container_div").innerHTML = my_object_embed_string the progress bar...
    2. ADM progress bar
      Hello! I have tried to create an ADM progress bar (kADMProgressBarType) in my plugin. However, it doesn't seem to be a way to update it. Anyone...
    3. progress
      I am getting a "little" frustrated with a guy here that keeps insisting Informix is crap, and Progress is the best database in the world. Anyone...
    4. Progress Bar help, please
      Greetings.. i'm a Flash newbie using Flash MX. I need to do a "progress bar" and I don't know where to start. I have a swf file ready to go on the...
    5. progress bar GO AWAY!
      I'm using the 2004pro component progress bar and i'm using it with the scrollpane inside my movie. it works just fine except for the fact that after...
  3. #2

    Default Re: Progress Bar

    Hi,
    Try adding DoEvents within yout loop.

    --
    HTH
    Dan Artuso, Access MVP


    "Sergey Bogdanov" <des@softex.lv> wrote in message news:#YG2z12TDHA.2260@TK2MSFTNGP12.phx.gbl...
    > Hello,
    >
    > I'm trying to implement progress bar for calculations. I opened dialog
    > (none-modal) with ProgressBar and set Max value for ProgressBar with
    > nrecords. In the loop I increase progress value by 1.
    >
    > Forms("Progress")![Progress].Max = nrecords
    > Forms("Progress")![Progress].Value = 0
    > Do While Not rst.EOF
    > rst.Edit
    > rst![ANSumma] = rst![NLitri] * rst![rate]
    > rst.Update
    >
    > Forms("Progress")![Progress].Value =
    > Forms("Progress")![Progress].Value + 1
    >
    > rst.MoveNext
    > Loop
    > rst.Close
    >
    > I've noticed that Access has been hanging in this loop. The Access stops
    > redrawing itself. Is there any universal solution for large amount of
    > calculations? What about timer?
    >
    > Thnx,
    > Sergey
    >
    >

    Dan Artuso Guest

  4. #3

    Default Re: Progress Bar

    Thnx, it works!

    "Dan Artuso" <dartuso@NoSpampagepearls.com> wrote in message
    news:u5tM1N3TDHA.2180@TK2MSFTNGP12.phx.gbl...
    > Hi,
    > Try adding DoEvents within yout loop.
    >
    > --
    > HTH
    > Dan Artuso, Access MVP
    >
    >
    > "Sergey Bogdanov" <des@softex.lv> wrote in message
    news:#YG2z12TDHA.2260@TK2MSFTNGP12.phx.gbl...
    > > Hello,
    > >
    > > I'm trying to implement progress bar for calculations. I opened dialog
    > > (none-modal) with ProgressBar and set Max value for ProgressBar with
    > > nrecords. In the loop I increase progress value by 1.
    > >
    > > Forms("Progress")![Progress].Max = nrecords
    > > Forms("Progress")![Progress].Value = 0
    > > Do While Not rst.EOF
    > > rst.Edit
    > > rst![ANSumma] = rst![NLitri] * rst![rate]
    > > rst.Update
    > >
    > > Forms("Progress")![Progress].Value =
    > > Forms("Progress")![Progress].Value + 1
    > >
    > > rst.MoveNext
    > > Loop
    > > rst.Close
    > >
    > > I've noticed that Access has been hanging in this loop. The Access stops
    > > redrawing itself. Is there any universal solution for large amount of
    > > calculations? What about timer?
    > >
    > > Thnx,
    > > Sergey
    > >
    > >
    >
    >

    Sergey Bogdanov Guest

  5. #4

    Default Progress bar

    I need to make a loading screen to show progress while my projector loads
    from CD-ROM.
    How do I do this?

    I have asked this before and recieved only one suggestion which was to load
    graphics off the stage over a period of frames and extend a progress bar as
    each frame loads.

    Is there any other way of doing this in lingo? Would I use a stub projector
    ??

    Very much appreciate some help on this

    Regards,

    Flashster


    flashster Guest

  6. #5

    Default Re: Progress bar

    The initial delay is that unnerving moment while the projector is
    loading with no indication things are progressing. There are 3rd party
    sub launcher applications that quickly put up a static greeting image
    while the projector is taking perhaps 30 seconds to start up.

    There's said to be an undocumented build in loading screen founction
    enabled by placing projectorNane.bmp file in with the projetor.
    JB Guest

  7. #6

    Default Re:Progress bar

    Apart from using a splash screen, no lingo-based progress bar is going to work until your project has started running, you can't monitor the startup process.

    The preload method you describe is if you need to preload graphics for an upcoming animation for example.

    You can minimise the startup process by creating a fast-start projector and by only including the required xtras. See the link below

    hth

    johnAq



    Referring URLs
    [url]http://www.macromedia.com/support/director/ts/documents/d8_fast-start_stub_proj.htm[/url]




    johnAq webforumsuser@macromedia.com Guest

  8. #7

    Default progress bar

    I would like to have a progress bar appear when loading images on my
    portfolio website. I would also like to create my own customised progress
    bar, that is more fitting with my website. I know about the publish setting
    where you can choose to create a progress bar but do not know how to
    implement it within a movie.

    If anyone has any advice it would be much apreciated.

    thanks
    steve


    steve Guest

  9. #8

    Default Re: progress bar

    One scheme is to have the initial 'loader' .dcr preload the main file to
    local drive using preloadNetThing command, you can get percent loaded
    info with periodic netEvent status calls (i forget that function name...)
    JB Guest

  10. #9

    Default Re: progress bar

    thanks for your help i will see if i can figure this out.
    "JB" <lingoguy@sbcglobal.net> wrote in message
    news:lingoguy-441988.12484402032004@forums.macromedia.com...
    > One scheme is to have the initial 'loader' .dcr preload the main file to
    > local drive using preloadNetThing command, you can get percent loaded
    > info with periodic netEvent status calls (i forget that function name...)

    steve Guest

  11. #10

    Default progress bar

    My client's site has some rather large PDF files that take a while to download.
    I need some help creating a progress bar to indicate how far along the download
    is. Or if I just used some kind of animated gif to 'pass the time' where does
    it go in the code to make it show up on the page while the user is waiting for
    the download to complete?

    mfitz Guest

  12. #11

    Default Progress Bar

    Hello everyone,

    Hope this is a simple question!

    I want to export my datagrid data to excel, so I just loop through every cell
    to generate HTML string. But because the data amount is too large, it will
    take tens of seconds to process it. So I want to give a client a progress bar
    to indicate how much time left.

    But the problem is the progress bar seems only update after all the process
    finished, that is the application is too busy and looks like stopped during the
    runtime. Can I make the progress bar keep updating and the process "export to
    excel" run in the backgroud. Or can I have two threads to run two different
    processes?

    Thank you very much.



    cialeen Guest

  13. #12

    Default Re: Progress Bar

    Hi,
    Can I ask, how do you actually do the export. Do you generate an EXCEL file
    and save it to the server, and then link to the file on the server, or do you
    pass it directly to the client without writing to the server?

    Vackar Guest

  14. #13

    Default Re: Progress Bar

    Hi,

    I used the navigateToURL(request, "_blank") to open a page on the server after
    I generate all data to HTML string.

    I tried to use ExternalInterface API to access Javascript in the wrapper page,
    but it only works for Firefox not for IE. It kept saying that "trend" is
    undefined. (which trend is the of in the embed object.) So I gave up but
    actually this method is my preferred solution.

    Any suggestions for the progress bar???

    Thank you very much.



    cialeen Guest

  15. #14

    Default Re: Progress Bar

    I created my own Progress Bar component, setting properties that will always
    keep the bar moving, and then show/hide the component using event listeners and
    handlers (see attached code).

    CustomProgressBar.mxml:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Box xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="setProgress();"
    backgroundColor="white" borderStyle="solid" cornerRadius="10"
    paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10">
    <mx:Script>
    <![CDATA[

    [Bindable]
    public var progressBarLabel:String = "Retrieving Data..."

    public function setProgress():void
    {
    progressBar.setProgress(5, 10);
    }

    ]]>
    </mx:Script>

    <mx:ProgressBar
    id="progressBar"
    mode="manual"
    indeterminate="true"
    label="{progressBarLabel}"
    textAlign="center"
    indeterminateMoveInterval="20"
    minimum="1"
    maximum="10" />
    </mx:Box>

    CustomCanvas.mxml:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%"
    height="100%" show="init();">
    <mx:Script>
    <![CDATA[
    private var customProgressBar:CustomProgressBar;

    // Handler for Creation Complete event
    public function init():void
    {
    // Create a Progress Bar Component
    customProgressBar = new CustomProgressBar();

    // Update the Display and Properties of the Progress Bar Component, so
    that the Height and Width will be measured
    customProgressBar.validateNow();

    // Hide the Progress Bar Component
    customProgressBar.visible = false;
    customProgressBar.includeInLayout = false;

    // Add the Progress Bar Component to this Component
    this.addChild(customProgressBar);

    // Add Event Listener for WebService Faults in child components to hide
    the Progress Bar and show the report
    this.addEventListener("evtFault", endProgressBar);

    // Add Event Listener for the start of retrieval of data to show the
    Progress Bar
    this.addEventListener("dataRetrievalStart", startProgressBar);

    // Add Event Listener for the end of retrieval of data to hide the
    Progress Bar and show the report
    this.addEventListener("dataRetrievalEnd", endProgressBar);
    }

    // Show the Progress Bar
    private function startProgressBar(event:Event):void
    {
    // Set the coordinates of the Progress Bar Component to the center it over
    this Component
    customProgressBar.x = (this.width/2)-(customProgressBar.measuredWidth/2);
    widgetProgressBar.y = (this.height/2)-(customProgressBar.measuredHeight/2);

    // Unhide the Progress Bar Component
    customProgressBar.visible = true;
    customProgressBar.includeInLayout = true;
    }

    // Hide the Progress Bar
    private function endProgressBar(event:Event):void
    {
    // Hide the Progress Bar Component
    customProgressBar.visible = false;
    customProgressBar.includeInLayout = false;
    }

    ericbelair Guest

  16. #15

    Default Re: Progress Bar

    Thank you very much for your reply, Eric.

    I tried your code but it didn't work for me.

    My code is
    private function openPage( pageFormat:String ):void
    {
    this.dispatchEvent( new Event( "dataRetrievalStart" ) );

    if ( dataHtml == "" )
    dataHtml = convertDataToHTMLDisplay();

    this.dispatchEvent( new Event( "dataRetrievalEnd" ) );
    }

    The method "convertDataToHTMLDisplay" will do the actual converting job. When
    run method "openPage", first dispatch an event to make progress bar visible,
    and then go to the convertion, remove progress bar. But to the client's point
    of view is the progress par never show up and application is stopped for a
    while (actually busy for generating HTML).

    If I remove the latst line :
    this.dispatchEvent( new Event( "dataRetrievalEnd" ) );
    then it looks like the progress bar will show up after the generation
    finished. That's no use for me.

    The thing I want to do is while the application is doing the HTML generation,
    the progress bar can show the status at the same time.

    Please help!


    cialeen Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139