Player use
Richard Gaskin
ambassador at fourthworld.com
Sat Nov 26 14:07:48 EST 2005
Frank R wrote:
> Richard Gaskin <ambassador at fourthworld.com> wrote:
> If the player is working for you why not use that?
>
> 1. It didn't make sense, and I'm trying to learn the product
The play command is an old interface to the system's video and audio
playback. While not officially depricated, it doesn't offer nearly the
flexibility of the player object.
I may be wrong on this, but I believe the play command is limited in the
variety of formats it can play. Technically speaking, a MIDI files
isn't an audio file per se, but merely instructions to create an audio
experience dynamically. It may be that the play command simple doesn't
handle the MIDI format.
I never use the play command, so I'm sure one of the readers here with
more experience with it can chime in with details, but I do use the
player object regularly and can help you get going with that newer, more
flexible interface.
> 2. The play command makes it easy to play a segment of the
> file, which I need to do
Player objects have a startTime and endTime property, and a
playSelection property which governs whether the startTime and endTime
are honored.
To play a specific segment of a file:
set the playSelection of player 1 to true
set the startTime of player 1 to 500
set the endTime of player 1 to 1000
> 3. I need to start the player programmatically, and while I
> see messages to send to the player, I don't see a way to start
> it yet.
start player 1
And the player can be stopped with:
stop player 1
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode
mailing list