>From: "N. Taylor" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: <lingo-l> counting with a sprite script
>Date: Thu, 08 Feb 2001 03:32:51 -0000
>
>I have a field and a button.  When I click the button I want Lingo to count
>from one to ten (the field adds "1" every time the button is clicked.)
>
>I have to attach the script to one of the two sprites (or both).
>
>Please help.
>
>-nt

im not quite sure what u want but the following is a script that counts from 
1 to 10

this script can be placed on the button or attached as a behaviour

global butCount -- global variable
set butCount = 0 -- initialises value at 0
on mouseDown
set butCount = butCount + 1 -- adds 1 every time button is used
put butCount into field "track"-- put value into field "track"
end mouseDown

this script is a repeat loop and will add 1 to the value in myVar until it 
reaches 10 this value could then be put into a field sprite

on mouseUp
set myVar = 0
repeat with count = 1 to 10
set myVar = myVar + count
end repeat
end mouseUp

im not sure this is waht ure looking for but i hope it is of some use
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>[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!]
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


[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