At 10:21 PM +0800 4/28/02, noelle cheng wrote:
>Hi,
>
>From the archives I know that this script is executed once and it 
>may be placed in a frame script.
>
>My questions are :
>
>1. must a beginSprite always end with a  end  beginSprite?

It should end with an "end" statement just for consistency.  It will 
work without an end statement, buut it is a good idea to have one. 
Anything written after the final "end" of a handler is considered a 
comment.  So, a beginSprite handler can end: a) with nothing, b) with 
an "end" statement, or c) with an "end beginSprite" statement.

>
>2. has a beginSprite ever caused a movie to  terminate at the point 
>and stop executing ?
>
>This is the code I used and it was used  in a frame script at frame 140:
>
>on beginSprite
>   startTimer
>end
>on exitFrame me
>   --This waits for 2 seconds
>   if the timer<60*2 then
>     go to the frame
>   end if
>
>end
>

Don't use the timer for something like this - because there is only 
one of this kind of timer available.  If you are doing timing 
somewhere else in your program, then there might be an interaction. 
Instead, set up your own timing with either using either ticks or 
milliseconds, e.g,

property pEndTicks

on beginSprite me
   pEndTicks = the ticks + (2*60)  -- two seconds from now
end

on endSprite me
   if the ticks < pEndTicks then
      go to the frame
   end if
end

Irv
-- 

Lingo / Director / Shockwave development for all occasions. 
          
   (Home-made Lingo cooked up fresh every day just for you.)
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/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