At 16:19 -0500 02/16/2002, Matthew DeSimone wrote:

>I guess my main question is, is it possible to have abstract children
>off a parent script, where the children exist simply as invocations of a
>script, and not invocations of a script which are attached to a specific
>director sprite?

Couple different ways. One you've seen already, using lists.

Another way would be to actually create the sprites on the flay and 
attach behaviors to them that do whatever it is you need done. That 
way you can make as many as you have to without pre-coding anything.

Here's a modified version of some code that creates a new sprite on the fly:

on CreateSprite me, nOpenSprite, mMember, sScript

   puppetSprite nOpenSprite, TRUE
   sprite(nOpenSprite).member = mMember
   sprite(nOpenSprite).ink = 36 -- bkgnd transparent
   oScript = new ( script sScript )
   sprite(nOpenSprite).scriptList = [ oScript ]

END CreateSprite

You'd call it by passing along the sprite location, member reference 
and script you wanted to attach. After the sprite gets its 
beginSprite, it should behave like any other instantiated object.

-- 

              Warren Ockrassa | http://www.nightwares.com/
  Director help | Free files | Sample chapters | Freelance | Consulting
        Author | Director 8.5 Shockwave Studio: A Beginner's Guide
                    Published by Osborne/McGraw-Hill
          http://www.osborne.com/indexes/beginners_guides.shtml
[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