> I want to pass a value from one sprite to another sprite located
 in another channel. Is there any way to pass this without
 using global variable, because i don't want to keep that variable
 other than those two frames.
Yes, pass the variable in a list:

on sendMessage me
  theValue = 10
  theList = [ theValue ]
  sendAllSprites( #updateValues, theList )
  theValue = theList[1] -- *
end

I think that although Shailendra said 'another channel', she also meant in another frame (hence 'those two frames' and 'I think sendsprite and sendallsprite works on all sprites located on that particular frame'). The question then becomes how to change a variable in a sprite that doesn't exist yet.

If you're not going to go to that frame right away, then there's no way to talk to the sprite without using a global or something else that persists. If you are going to go to that frame, then perhaps your first sprite can go to the frame in question, and then sendsprite the message to the other sprite. Even though the first sprite no longer exists, its script is still running, just long enough for it to be able to pass on the information.

[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!]

Reply via email to