hi, rob
yes, you´re right, that´s exactly my problem. i´ve made a simple dir just to show what´s happening. here are the scripts:


movie script
--##################
on startMovie
  repeat with i = 1 to 3
    puppetSprite i,TRUE
    sprite(i).member = member 1 of castLib 1
    sprite(i).loc = point(400 + random(70),300 + random(70))
    sprite(i).scriptInstanceList.add(script("zoom"))
    sendAllSprites(#change,1)
    updateStage
  end repeat
end
--##################

the script attached to the sprites, named "zoom"
--##################
property pTest

on beginSprite me
  pTest = 1
end

on change me,a
  pTest = a
end

on findout
  put pTest
end
--##################

just create a bitmap on cast member 1 of castlib 1, and if you like put it on channel 4, upper left corner (doesn´t matter where) and assign the script above. it´ll show you how a sprite that was not created on the fly behaves. use sendSprite(anynumberfrom1to4,#change,anyparameteryouwant) on the message window to test. if you type sendSprite(2,#change,10) and hit enter, and then type sendSprite(3,#findout), you´ll see that sprite 3 pTest has changed and are equal to 10, and it shouldn´t, because i´ve sent a message to sprite 2 only. all sprites have changed, except sprite 4, that was not created on the fly.

thanks and regards,
q

At 16:42 24/6/2003 -0400, you wrote:
Hi,

Kerry suggested one possibility but I think I'm reading your problem a little
differently. You have a bunch of sprites lets say 1 to 10 which are all created on
the fly sending a message to one of them affects them all right?


Kerry I think the problem you are describing is if you create a sprite on the fly in
channel 2 frame 5, lets say, and then jump to fram 500 where a score created
sprite exists, the script instancelist applied in frame 5 mucks up the score one in
frame 500. Let me know if I'm wrong.


Anyway I think the problem Quixada is having stems from how the behaviours are
attached to the sprite on the fly. Sounds to me like each sprite is not getting a
unique instance of the behaviour but rather pointers to the same instance.


Quixada if you can post some of your code you use to attach the behaviours that
may help us solve the problem.


-Rob

24/06/2003 3:42:56 PM, Quixadá <[EMAIL PROTECTED]> wrote:

>hi, folks

>that´s ok, it works. the problem comes when i try to change a parameter
>inside that script in only a specific sprite, because all the sprites have
>their parameters changed.
>
>but same results.
>i think i don´t need to put the entire behaviors here, because it´s all
>about how on-the-fly scripts deal with sendsprite messages.
>
>win xp, d 8.5.1
>
>thanks,
>q




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


[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