Player messages

J. Landman Gay jacque at hyperactivesw.com
Sat Dec 20 19:52:07 EST 2003


On 12/20/03 7:47 PM, J. Landman Gay wrote:

> On 12/20/03 6:15 PM, Scott Rossi wrote:
> 
>>> Brian's suggested method works (bravo!) It is simple and I'm
>>> embarrassed I didn't think of it myself, though I claim frustration and
>>> lost time as an excuse. Here's what I did:
>>>
>>>   put the duration of player 1 into theDur
>>>   put (theDur/the timeScale of player 1) into theSecs
>>>   start player 1
>>>   send "movieStop" to me in theSecs seconds
>>>
>>> And then there is a "movieStop" handler like this:
>>>
>>> on movieStop
>>> playNextSegment -- includes the above script bit
>>> end movieStop
>>>
>>> So I'm back in business. I've bug reported the problem though.
>>
>>
>>
>>
>> Hi Jacqueline:
>>
>> Just curious if you ever found a reliable time/loop workaround for audio
>> playback.  I just tried building an MC 2.5 standalone on OSX using the
>> following overkill tracking script and it seems to loop the player (4 
>> second
>> AIFF file) relatively seamlessly.
>>
>> [button script]
>>
>> on mouseUp
>>   if the paused of player 1 then
>>     set the uAllowTrack of me to true
>>     set the looping of player 1 to true
>>     start player 1
>>     trackTime
>>   else
>>     set the uAllowTrack of me to false
>>     stop player 1
>>     set the currentTime of player 1 to 0
>>   end if
>> end mouseUp
>>
>> on trackTime
>>   if not the uAllowTrack of me then exit trackTime
>>   if the currentTime of player 1  = the duration of player 1 then \
>>     start player 1
>>   send "trackTime" to me in 10 milliseconds
>> end trackTime
>>
>> Curious to know what you've found.
> 
> 
> I ended up with something almost identical to what you did above. In the 
> standalone I was working on, I didn't actually need looping, though I 
> used that in my posts to show the bug. I really did want a short pause 
> between each movie. Still, the solution was very similar to what you're 
> doing. I had to send a repeated message every few milliseconds to check 
> whether the movie was playing or not. If not, I loaded the next movie. 
> If so, I just kept checking until it did stop.
> 
> I don't see any way around this until they fix "playstopped".

Oh, I forgot to mention. I had to abandon Brian's original suggestion 
(way up at the top of this message) for using "the duration" when it 
turned out that this isn't accurate either. It's off enough to make me 
wonder if that's the real problem with playstopped -- it isn't that 
"playstopped" is not being sent, it is that the message is sent at 
wildly varying times because the duration is wrong.
-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the metacard mailing list