Hi David

It ain't pretty, but it works. Here is a working demo of using the
setScriptList using a dynamically created property list that will be passed
in to the thing. Its a real rough piece but it might help you get the syntax
down. You can get it at:
http://members.home.net/m.jonkman/SetScriptList/demo.htm

don't know if it will help you.

Please note, in order to make it work multiple times (ie everytime you
rewind it, I purposefully blew out the attached behaviours on the endSprite
handler within the behaviour. Don't know if its legal but it worked.

ie.

on endSprite me
        sprite(pMy).setScriptList = []
end endSprite

Remember, setScriptList is a permanent command, which is unlike the
setScriptInstanceList which is there only for the duration of the sprite,
setScriptList is a permanent change to the sprite as per Score Recording
type permanence.  Anyhow, I was brain dead when I wrote it 10 minutes ago,
so I hope it works and gives you something to go on.

Sincerely

Mark

--------------------------------------------
Mark R. Jonkman
Mark R. Jonkman Consulting
ADDRESS: 20 Windermere Crt., Guelph, ON, CANADA N1E 3L4
PHONE: 519-837-8509
EMAIL: [EMAIL PROTECTED]
--------------------------------------------

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of David Parker
> Sent: September 10, 2000 9:41 AM
> To: [EMAIL PROTECTED]
> Subject: Re: <lingo-l> How to assign behaviors with Setscriptlist()
>
>
> Thanks for the suggestions, everyone. Of course I felt like an
> idiot when I
> realized I was starting my loop with 0, but I still can't get the thing to
> work.
>
> Here is the latest incarnation:
>
>   pmymovie = gcurrentarea[1]
>   repeat with i = 1 to 30
>     pmy = i
>     pmytarget = sprite(i).member.name
>     plist = "[#my: " & pmy &", #mytarget: " & pmytarget & ", #mymovie: " &
> pmymovie & "]"
>     put plist
> --    sprite(i).setscriptlist([[member("GoMarkerOfMovie"),"[#my:
> " & pmy &",
> #mytarget: " & pmytarget & ", #mymovie: " & pmymovie & "]"]])
> --    sprite(i).setscriptlist([[member("GoMarkerOfMovie"),plist]])
> --    sprite(i).setscriptlist([[member("GoMarkerOfMovie"),value(plist)]])
>   end repeat
>
> plist looks the way I think it ought to.
> the third line caused a fatal error and the other two evoked protests of
> periods in symbols not being allowed.
>
> >3)  And finally, I'm guessing from what you said in your intro that
> >you really don't want the _name_ of these text members, but instead,
> >you want the _text_ contained in the text members.  Unless you are
> >doing something strange, the name of the members usually doesn't
> >change, but you can easily change the content of the text member.
> >This would allow you to make your table of contents really dynamic.
> >If this is the case, then you want to change:
>
>
> Actually,  I meant to use name, and it is working that way, however that
> could change later.
>
>
> [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