At 5:49 PM +0000 2/8/01, N. Taylor wrote:
>This is the only script I could attach to my button that didn't
>bring about errors.
>
>However, the script still only counts to two (on the first mouseUp)
>& doesn't go past that.
>
>Again, I'm trying to get it to count to 10 and return to 1 on the
>mouseUp that would be 11.
>
>-nt
>
>
>property pNum
>
>on beginSprite me
> pNum = the value of field "spriteCountField"
> put "1" into member "spriteCountField"
>end
>
>on mouseUp me
> if pNum > 10 then
> put "1" into field "spriteCountField"
> else
> put pNum + 1 into member "spriteCountField"
> end if
>end
>
Here's what I would do:
property spriteNum
property pNum
property pMyMember
on beginSprite
pMyMember = sprite(spriteNum).member
pNum = 1
member(pMyMember).text = string(pNum)
on mouseUp me
pNum = pNum + 1
if pNum > 10 then
pNum = 1
end if
member(pMyMember).text = string(pNum)
end
And drop it on any field or text member. Keep the value of "pNum" as
a number, and only convert it to a string to display it.
Irv
--
Lingo / Director / Shockwave development for all occasions.
(Over two millions lines of Lingo code served!)
[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!]