Player messages

J. Landman Gay jacque at hyperactivesw.com
Fri Dec 5 13:14:20 EST 2003


On 12/5/03 12:04 PM, Scott Rossi wrote:

> On 12/5/03 9:24 AM, "J. Landman Gay" <jacque at hyperactivesw.com> wrote:
> 
> 
>>>Possibly related: I've noticed some screwy behavior over here similar to
>>>what you describe but with looping audio-only players.  When the stack with
>>>the player is frontmost, the audio stops.  As soon as I make the message box
>>>active, meaning the mainStack is no longer frontmost, the audio starts up
>>>and plays fine.
>>
>>By the way, have you found a work-around to the problem? I really need one.
> 
> 
> No but like I said, I haven't tried any serious isolating yet.
> 
> If you build a small stack that contains basic player behavior (start, stop,
> pause, etc) can you reproduce the problem behavior?  Last night I made a
> simple playback stack that seemed to work OK with an MP3 file as the source,
> but this was by no means a real test.

Yes. My test stack doesn't have the full range of playback behavior 
(that all seems to work okay in my project anyway) it just has the 
problematic loop test. Make a stack with a single player object, and 
assign the player an audio filename. I haven't tried with MP3 files, 
because my sources are all audio-only quicktime movies. So maybe try one 
of those.

Then put this script into the card:

on playLoop
   global gPlay
   if the shiftkey is down then -- stop loop
     put false into gPlay
   else
     put true into gPlay
     start player 1
   end if
end playLoop

on playStopped
   global gPlay
   if gPlay = true then playLoop
end playStopped

Trigger it with either a button or from the message box, with 
"playloop". While it plays, click back and forth between the stack and 
the message box. You should see the problem. If the stack is frontmost, 
you don't get a playStopped message. You can verify by watching the 
message watcher, though the behavior speaks for itself.

I am going so far as to think I should create a dummy stack offscreen 
and set the focus to that while the thing is playing, but I really don't 
want to use that approach. It's klunky and ugly, and I don't even know 
if it would work.

Also, I just tested on Windows and I don't see the problem there, but 
I'm not sure if that's because my PC box is using an older version of QT 
or whether it just doesn't happen in Windows. It does happen in both 
Jaguar and Panther, I just checked for that, but both my Macs are 
running QT 6.4 so I don't know if it is a Mac problem or a QT version 
issue. Any ideas would be very welcome.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the metacard mailing list