progress bar

Sarah Reichelt sarah.reichelt at gmail.com
Fri Jul 21 02:56:20 EDT 2006


Just one addition to Mark's suggestion: include a mouseRelease handler
that does the same as the mouseUp. This will catch the mouse if the
user moves it off the control before releasing the button.

Sarah


On 7/21/06, Mark Smith <mark at maseurope.net> wrote:
> I think I'd do something like:
>
> button script:
>
> on mouseDown
>    send "startProgressing" to sb theProgressBar
> end mouseDown
>
> on mouseUp
>    send "reset" to sb theProgressBar
> end mouseUp
>
>
> and in the sb script:
>
> on startProgressing
>    set the thumbPos of me to the thumbPos of me + 1
>    send "startProgressing" to me in 20 milliseconds -- pick a value
> that suits
> end startProgressing
>
> on reset
>    get lineOffset("startProgressing", the pendingMessages)
>    if it > 0 then cancel item 1 of line it of the pendingMessages
>    set the thumbPos of me to 0
> end reset
>
> Best,
>
> Mark
>
> On 21 Jul 2006, at 00:47, Nicolas Cueto wrote:
>
> > Hello List,
> >
> > As a visual cue for a game, I'd like to
> > use a progress bar to indicate to a
> > user how long they are holding down
> > a button -- the reason being, the longer
> > the button is held down (mouseDown),
> > the faster an image object will move
> > upon the button's release (mouseUp)
> >
> > One experiment I've tried is to use a
> > repeat loop within the mouseDown
> > handler so as to set the progress bar's
> > thumbPos property. Can't get it to
> > work, though.
> >
> > Any sugestions?
> >
> > Thank you.
> >
> > --
> > Nicolas Cueto
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list