QT player question

Chris Carroll-Davis chris at carroll-davis.co.uk
Mon Apr 4 10:40:23 EDT 2005


Thanks Klaus!

your solution works fine, but you were beaten off-list.

  >> use:  the paused of player x

doh!  as simple as that!!!!

I *hate* missing simple stuff!

Thanks again,

Chris


On 4 Apr 2005, at 15:25, Klaus Major wrote:

> Hi Chris,
>
>> Hello all -
>>
>> I expect this is an easy question, but I can't seem to see how to do 
>> it!    How do I see if a player is playing?
>
> Watch very hard :-)
>
>> The playrate property always returns 1 (I want to play movies at 
>> normal speed)
>
> The playrate determines the plaback speed of your movie and 0 means 
> that a playing
> movie is currently paused ;-)
>
>> I had thought it might return "0" if the movie was not playing.
>> The movie() function only seems to work with video clips, not player 
>> objects.  So I can't say "if the movie is done..."
>>
>> I need the equivalent of a "playing()" function that would return 
>> true or false.
>
> Since there is no direct way to dtermine what you want, use a little 
> trick:
>
> function movie_is_playing
>   put the currenttime of player xyz into ct
>   wait 10 millisecs
>   return (the currenttime fo player xyz < ct)
>  ##will be true if the movie is inded playing, else will be false
> end movie_is_playing
>
> Here i just check 2 different "times" and see if they are identical or 
> not...
>
> Hope that helps...
>
>> A (virtual) Mars bar to the first person with the answer!!!
>>
>> Chris
>
> Best
>
> Klaus Major
> klaus at major-k.de
> http://www.major-k.de
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list