Starting A Progress Or Busy Bar; Updating A Progress Or Busy Bar - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
A busy bar does not display a progress value; instead, it rotates the spiral indicator about once a second.
For example:
app.startProgress( 'Please wait', 'Processing', true); //busy bar
These are the same dialogs GoLive displays as part of its own user interface. Three methods of the
Object
make these dialogs available to extensions:
The
startProgress
The
setProgress
The
stopProgress
As an alternative to these globally-available predefined dialogs, you can define a progress-bar control in
your own window; see

Starting a progress or busy bar

The startProgress method has this syntax:
app.startProgress(
You must specify the string that appears in the progress window's title bar, such as "Please wait" in
the examples.
The optional message argument provides the initial status message displayed when the dialog opens.
The method opens a progress bar, unless you pass true for the optional doBusy argument.
The optional seconds argument is a number of seconds to delay before Golive displays the dialog. For
example, a value of 2 means that GoLive displays the dialog only for operations that take more than 2
seconds to complete.

Updating a progress or busy bar

While the progress window is displayed, your code must update the position of the progress bar. It can
optionally update the message text as well. Your code must also determine whether the user clicked the
Stop button and act accordingly to abort the operation in progress. To perform these tasks, call the
setProgress method periodically:
setProgress(
The value argument is a value between 0 and 1 that specifies the portion of the progress bar to be
drawn. For example, the value .50 specifies that 50 per cent of the progress bar is drawn to indicate a
task half completed.
Adobe GoLive CS2 SDK
method initializes and displays the progress dialog.
method updates the status bar or busy bar display.
method hides the progress dialog.
Creating controls with
title
message, doBusy, seconds
[,
value
message
, [
])
parameters.
])
The JavaScript Environment
app
38

Advertisement

Table of Contents
loading

Table of Contents