At 7:53 PM -0700 9/9/00, David Parker wrote:
>I am not finding much help with the "setscriptlist()" method.
>
>I have a bunch of text members I can bring to the stage, and I want to
>attach the same behavior to all of them. This behavior will take the name of
>the castmember and assume there is a marker in the movie with that name. It
>will be sort of a dynamic table of contents. I need a few simple examples of
>setscriptlist to see if I can pull this off.
>
>So far the most dramatic thing I have been able to acomplish with the script
>was to crash Director. B^)
>
>   pmymovie = gcurrentarea[1]
>   repeat with i = 0 to 30
>     pmy = i
>     pmytarget = sprite(i).member.name
>--    sprite(i).setscriptlist([[(member("GoMyMarker"),[#my: pmy, #mytarget:
>pmytarget, #mymovie: pmymovie]]])
>   end repeat
>

David,

I haven't used "setScriptList" in D8 yet, but there are a couple of 
things that look wrong with the above:

1)  In your loop, you are starting with channel 0 - probably not what 
you want.  I think channel 0 is the frame script sprite number.  You 
probably want to change this to:  repeat with i = 1 to 30.

2)   In your call to setScriptList, according to the documentation, 
you need a set of quotes around the property list that defines the 
properties (boy that's a mouthful).  Specifically, it should look 
more like:

sprite(i).setscriptlist([[(member("GoMyMarker"), "[#my: pmy, 
#mytarget:pmytarget, #mymovie: pmymovie]"]])

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:

   pmytarget = sprite(i).member.name
to
   pmytarget = sprite(i).member.text

Irv

-- 
Lingo / Director / Shockwave development for all occasions
            (We even do weddings and Bar Mitzvahs!)
   See our kid's CD-Rom's at:  http://www.furrypants.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!]

Reply via email to