At 12:33 PM 9/12/00, sundeep bhatia wrote:
>hi list
>  i have a 6 second avi. i want it to loop just after it reaches 4 seconds
>(it should go to beginning as soon as 4 sec are finished) and go further
>from 4 seconds only after a user clicks the avi. on a frame script i have
>used
>   on exitframe
>       if the movietime of sprite 1 = 4*60 then
>       set the movietime of sprite 1 to 0
>         else
>        go the frame
>end if

The chances are pretty slim that the movieTime will be exactly 4 * 60 when 
that line happens to get executed. You'll need to provide some level of 
tolerance, say >= 4 * 60.

Here's one (untested) possibility.

-- behavior on video sprite
property spriteNum
property pLoop
on beginSprite me
   pLoop = 1
end

on exitFrame me
   if pLoop then
     if sprite(spriteNum).movieTime >= (4 * 60) then
       sprite(spriteNum).movieTime = 0
     end if
   end if
end

on mouseUp me
   -- toggles the loop on/off
   pLoop = NOT pLoop
end


-- frame script
on exitFrame
   go the frame
end

--
Mark A. Boyd
Keep-On-Learnin' :)


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to