progress bar

Mark Smith mark at maseurope.net
Thu Jul 20 20:01:29 EDT 2006


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




More information about the use-livecode mailing list