showController for audio question???

Klaus Major klaus at major-k.de
Thu Jul 14 04:52:55 EDT 2005


Hi Ban,

> Since you do not work with player objects you should change the  
> line to:
>
> on scrollbardrag t_value
>     set the playloudness to t_value
> end scrollbardrag
>
> ----->It works.  Thanks
>
> ---------------------------------------------------------------------- 
> --
> --
>
> I use this code for the pause button:
> on mouseUp
>     global gClickVar
>     play pause audioClip gClickVar
> end mouseUp
>
> It stops the song and plays the beginning of the song when I  
> release the
> mouse.  I want to pause it and click again to continue play (not
> beginning)
>
> Klaus, do you have any idea?  Thanks

yes, new day, new idea :-)
(It is 10:30 AM here in germany)

There are some ways to do this, and it depends if you are using icons  
or just
label in your buttons...

But here is an idea that will always work (hopefully ;-)

on mouseUp
     global gClickVar
     if the sound is "done" then
        play resume ac gClickVar
     else
       play pause ac gClickVar
    end if
end mouseUp

ac = abbrev. for audioClip

This will check, if the sound is NOT playing (= "done"),
which menas it has been stopped somehow and will (try) to
resume the sound.

Otherwise (sound is PLAYING = NOT "done") it will simply pause
the sound...

NOT tested yet!


Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list