Slide Controls ?

use-revolution-admin at lists.runrev.com use-revolution-admin at lists.runrev.com
Fri Jun 6 05:55:00 EDT 2003


Hi Richmond,

> I should like to include a slide control in various
> stacks.....
>
> Ideally as the user slid the control back and forwards
> along the control bar a value (let us say between 0 and 1)
> would be returned to  a holder (e.g. Xnumber) which could
> then be used to control things such as volume, rates of
> play, and so forth.
>
> Um.............how could I do that?
>
> All positive suggestions gratefully received.
>
> Richmond Mathewson

here's a little script that will control the volume of player x

1. Create a scrollbar, type "slider"
2. set its "startvalue" to 0
3. set its "endvalue" to 100

and put this into the script of this scrollbar

on scrollbardrag the_value
   ## this messages is being send to the scrollbar while the user
   ## is dragging and even the current value is being
   ## passed as a parameter (i called it descriptively "the_value" here,
   ## but you could even name it "klaus" ;-) that we can react on...
   ## this works in real-time, so maybe checking "showvalue"
   ## will be a cool thing. You might have to enlarge the scrollbar
   ## to see the values... just play around a bit :-)
   set the playloudness of player x to the_value
end scrollbardrag

That's all... One line.. works fine :-)

Hope that helps...


Have a nice weekend.


Regards

Klaus Major
klaus at major-k.de




More information about the use-livecode mailing list