Generally i would suggest not using repeat loops in these cases as they
consume processor resources to a great extent.
just make sure the variable you are incrementting also is declared as a
property.

Vijay

try this behavior.

property pflag,pproperty

on beginsprite me
pflag=0
end

on mousedown me
pflag=1
starttimer
end

on mouseup me
pflag=0
end

on enterframe me
if pflag=1 and the timer >60 then
starttimer
 next --this is my handler that changes the castnum of sprite and
increments a variable + 1
end if

end

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 4:46 PM
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> mousedown repeat


try this


on mouseDown
  repeat while the stilldown
    startTimer
  repeat while the timer < 60
  end repeat
    next --this is my handler that changes the castnum of sprite and
-- add an updatestage() command
updatestage()



increments a variable + 1
  end repeat

end




On 16 Jan 2002 at 15:01, Rodrigo Peres wrote:

List,

I have a project, something like an slide show. When the user clicks the
mouse and hold down I want that it steps throw the images one by another
and
wait a second between them. How can I do this.

I've tried repeat while the stilldown , but it jumps directly to the last
image!

this is my the non working code :-(

on mouseDown
  repeat while the stilldown
    startTimer
  repeat while the timer < 60
  end repeat
    next --this is my handler that changes the castnum of sprite and
increments a variable + 1
  end repeat

end

Thank's in advance

Rodrigo
--


[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!]
[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!]

[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