: Playing audio clips
Jim Hurley
jhurley at infostations.com
Wed Oct 12 14:56:30 EDT 2005
>
>Message: 9
>Date: Wed, 12 Oct 2005 15:18:25 +0200
>From: Eric Chatonet <eric.chatonet at sosmartsoftware.com>
>Subject: Re: : Playing audio clips
>To: How to use Revolution <use-revolution at lists.runrev.com>
>Message-ID: <682BC880-2F90-4FDA-875A-7F7E46F1A7E8 at sosmartsoftware.com>
>Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed
>
>Hi Jim,
>
>You might be interested in "How to Monitor a QuickTime Player by
>Script", a tutorial available through "Tutorials Picker".
>On my website or Rev Online (user: So Smart Software)
>
>> This stack shows you how to monitor a QT player to play music (mp3
>> included) and provide all the usual commands, and more, to the user.
>> How to know if the right version of QT is installed, manage
>> durations, progress, quick searches, sound level, loops, play-
>> lists, etc.
>> The main commands are embedded in a scripted group, which you can
>> export into any project. This scripted group is able to monitor,
>> not only sound files, but also the video files as well.
>> Print function included.
>
>Best Regards from Paris,
>
>Eric Chatonet.
>
>Le 12 oct. 05 ý 02:02, Jim Hurley a Ècrit :
>
>> New problem: I have a scrollbar which I would like to use to show
>> the progress of the player. I have tried the following:
>>
>> on update
>> set the thumbposition of scrollbar "duration" to the currenttime
>> of player myPlayer
>> send "update" to me in 1 sec
>> end update
>>
>> But the "Send" command momentarily interrupts the player and the
>> speech is bumpy. Is there an asynchronous way to iterate the update
> > without using a "send" command?
>
Hi Eric,
Thanks for the heads up. Loved your stack.
I was puzzled that you weren't getting the static
that I get when the thumbposition of the
scrollbar is set with the update.
Turns out that my scrollbar has a scrollbarDrag
handler which sets the currentTime of the player.
(I want to be able to drag the thumb to any point
along the bar. This allows me to choose the
starting point with the slider.)
What I needed was a way to avoid the execution of
the scrollbar handler when the thumbposition was
moved by an external handler, but to allow the
script when the thumb was dragged. That can be
done with the same device one uses in a mouseMove
handler. I added a mouseDown handler in the
scrollbar which puts a value into the variable
myName and then exiting the scrollBarDrag handler
if myName is empty.
Thanks again,
Jim
More information about the use-livecode
mailing list