Thanks Howdy-Tzi,
however I need some help with how to use the code!! In fact, I think
you'll need to take me through it line by line and point out where to
enter what...
I know this is wrong cause it doesn't work...
sorry I'm still learning,
maria
on beginSprite me
me.InitVars() --do I put the sprite in the brackets here?
END beginSprite
on mouseEnter me
-- See if the user has correctly pointed to matched images
me.CheckForMatch(1,2)----do I put the sprite in the brackets here,
like this?
END mouseEnter
on InitVars me
-- Reset the image test list
glImages = [[#sprite:2, #member:"pinkx"], [#sprite:3,
#member:"pinkx"]]--do I put the sprite in the --brackets here, like
this?
END InitVars
on CheckForMatch me
-- Get the image/sprite pairs from the image list
lFirst = glImages[1]
lSecond = glImages[2]
if lFirst[#s2] = 0 then
-- This is the first image the user has pointed to
lFirst[#2] = me.spriteNum
lFirst[#"pinkx"] = (me.spriteNum).member
else
-- This is the second image the user has pointed to
lSecond[#s3] = me.spriteNum
lSecond[#"pinkx"] = (me.spriteNum).member
if lFirst[#2] = lSecond[#3] then
-- The images are the same, but this might be because the
-- user has actually pointed to the same sprite twice, not
-- because he's pointed to two different sprites
if lFirst[#2] <> lSecond[#3] then
-- It was the same image in different sprites, so the user
-- won this round
ALERT "That was a match!"
me.InitVars()
else
-- No match, so we clear the list
me.InitVars()
end if
end if
end if
END CheckForMatch
[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!]