<quote>

if i set the property mySprite on beginSprite it�s VOID, ok.
So i slaped it at the begining of the mouse up script.
Ugly but it works.

<unquote>

one way to generalise this code and make it more beautiful is :

 x = script("carg_mouse").new(s)  -- pass    the spritenum as the parameter
to the new()

and in the new() handler:

on new me, lnNum

        mySprite = lnNum

end


HTH,
Sandy.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Mikael Wir�n
Sent: Saturday, November 17, 2001 3:51 AM
To: [EMAIL PROTECTED]
Subject: <lingo-l> Am i missing the obvious (changing members of
generated sprites)


Hi List.
I�ve run into this strange problem.
I�m generating some sprites based on a list of symbols defining what member
to put into the sprite. Like this:
 Just to mass puppet them and attach a mouseUp script to all.

  repeat with s = 50 to 105
    puppetSprite s, TRUE
    x = script("carg_mouse").new()
    sprite(s).scriptInstanceList.add(x)
  end repeat



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



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

Reply via email to