Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sure thats an easy one...

Status
Not open for further replies.

babytarantula

Technical User
Feb 23, 2006
6
MX
hi i want to do a basic code for a game. Each time you click on a moving button you win one point. I think i need to use a lingo text script like this one:

on mouseUp
member("Text").text = "1"
end mouseUp

So it shows a "1" when you click on the button. But then how can it change to "2"?

In other words how can i program numbers instead of letters? Something that will basically say "when you click here, increase value + 1 point"

I'm sure this is a very basic one...but it's hard to find info on such topics

Thanks!
 
Try something like this:

[tt]//
on mouseUp me
if member("Text").text = "" then
member("Text").text = "1"
else
member("Text").text = string(integer(member("Text").text)+ 1)
end if
end mouseUp
//[/tt]

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top