Help with videoclips

Geoff Canyon gcanyon at inspiredlogic.com
Tue Jan 15 13:52:01 EST 2002


At 12:23 PM -0500 1/15/02, Charles Silverman wrote:
>on mouseup
>  play videoclip "tempfile1"
>  repeat
>    if movie() = "done" then exit repeat
>    end repeat
>end mouseup
>
>I'm running off a Powerbook Pismo with 384 megs lots of hard drive space and
>Mac OS 9.2.
>
>The file is a quicktime audio recording that I'm saving as a videoclip.
>I was able to get this working earlier. I'm trying to create my own
>"callbacks" approach for the embedded audio files. Any insights/help
>appreciated.
>
>Here's another, slightly different problem. If I record and then import in
>the same handler, it doesn't work.
>
>on mouseup
>  get flushevents("all")
>  put the seconds into tStart
>  record sound file "tempfile1" as "MAC3" with good quality
>  set the endvalue of scrollbar 1 to 6
>  set the thumbpos of scrollbar 1 to 0
>  repeat
>    set the thumbpos of scrollbar 1 to (the seconds - tStart)
>    if the seconds - tStart > 6 or the mouse is down then exit repeat
>  end repeat
>  stop recording
>  import videoclip from file "tempfile1"
>end mouseup

Check out the playStopped message for the first issue. In all cases, avoid using a repeat where you check the status of something. Instead, look at the send command and use the "send message to object in time" form to loop instead.

regards,

geoff




More information about the use-livecode mailing list