Counter for Player

Ken Ray kray at sonsothunder.com
Sun Oct 6 17:56:01 CDT 2002


Mark,

You can tell if a user clicked on a movie by trapping the mouseUp in the
movie. You can tell if a movie is playing in the following way:

on mouseUp
  answer isPlaying(long id of player 1)
end mouseUp

function isPlaying tTarget
  put the currentTime of tTarget into tTimeA
  wait 10 milliseconds
  put the currentTime of tTarget into tTimeB
  return (tTimeA <> tTimeB)
end isPlaying

Hope this helps,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




----- Original Message -----
From: "Mitchell Mark" <cowhead at ztv.ne.jp>
To: <use-revolution at lists.runrev.com>
Sent: Sunday, October 06, 2002 5:48 AM
Subject: Counter for Player


> Trying to make a simple 'counter' for a player.  Putting the currentTime
> of the player into a field while the player is playing does not seem to
> work.  Since the playRate is 600 units/second, I guess you could use the
> milliseconds from start and calculate what the current time should be.
> Problem is, there is a playPaused message, a playStopped, a
> selectionChanged, but no playStarted.  So there appears to be no way to
> tell if the user has just clicked somewhere on the player, or if she has
> actually started it.  Is there anyway to tell if a player is actually
> playing?
>
> I thought of making my own start button for the player, but you cannot
> stick a button over a player.  I suppose I could hide the player
> alltogether and reconstruct one out of my own buttons and progress bars,
> but I have a feeling there is a very easy way to do this that I'm just
> missing.   Can any of you buddhas out there enlighten me?
>
> tia,
> mark mitchell
> Japan
>
> _______________________________________________
> 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