Hi Juan,
Instead of setting the sprites visible state, place them offstage when you
want them to disappear and place on the stage when you want them to appear.
-- movie script
on keyDown
case the keyCode of
123:sendSprite(1, #appear)
sendSprite(2,#disappear)
126:sendSprite(2, #appear)
sendSprite(1,#disappear)
end case
end
-- sprites script i.e 1 and 2
property pSprite
property pOrigLoc
on beginSprite me
pSprite = sprite(me.spriteNum)
pOrigLoc = pSprite.loc -- record the original location
-- appear(me)
-- disappear(me)
end
on appear me
pSprite.loc = pOrigLoc -- place it original location
end
on disappear me
pSprite.loc = point(-999,-999) -- place offstage
end
Ramesh CT
http://www.geocities.com/ramesh_ct/
-----Original Message-----
From: JUAN COLON <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, November 09, 2000 8:56 AM
Subject: <lingo-l> sprites appearing and disappearing
|Hi all,
|Is there a way to make a sprite appear and dissappear using a keyUp and
|keyDown on the visible of sprite (takes to long)
|say you press the up arrow key and sprite1 appears, then when you press
the
|left arrow key sprite2 should appear and sprite1 should disappear.
|Any help would be appreciated.
|thanks
|
|
|JUAN-NYC
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.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!]