Hi,
I used arrow keys to change the cast of a sprite. here is a script,
------movie script
on keydown
if the keyCode = 123 then
-- change the spriteNumber to the channel number
-- of sprite that you want to change the cast
sendSprite(spriteNumber, #changeCast, -1)
else if the keyCode = 124 then
sendSprite(spriteNumber, #changeCast, 1)
end if
end
------------- sprite script for sprite you want to change the cast
property pMemberList, pIndex
on beginsprite me
pMemberList = [1,2,3] -- this list contains cast member numbers
pIndex = 0
end
on changeCast me, nextPrev
pIndex = pIndex + (1 * nextPrev)
if pIndex < 1 or pIndex > pMemberList.count() then exit
sprite(me.spriteNum).member = member pMemberList[pIndex]
end
-------------
regards
Ramesh C T
-----Original Message-----
From: JUAN COLON <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, October 10, 2000 10:11 PM
Subject: <lingo-l> casts
>on keydown or keyPressed how do you change the sprite on the stage by going
>to the next cast member in the cast
>might be simple but im kind of stuck on it
>
>JUAN-NYC
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at
>http://profiles.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!]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.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!]