At 11:48 -0700 06/02/2002, Craig Taylor wrote:

>I have a scenario where a few independent behaviors must be executed before
>the program begins (list initialization, etc.)  These behaviors must run
>without user intervention.  I am curious as to what the consesus is on the
>most efficient way of doing this is:

You won't find a consensus, probably, because there are many ways to 
do something like this. A better question may be "Based on my 
particular program's needs and my preferred manner of working with 
Director, what is the most productive method to continue?" And only 
you can really answer that question. ;)

>i. Run them as independent frame scripts

You can, but note that frame scripts initialize *after* the sprite 
scripts in a given frame, so if sprite 900 has a beginSprite that 
relies on the frame script in channel 0 to be up and running in that 
same frame, you will get into trouble.

>ii. Do frameScripts reside at a consistent spriteNum.  In other words, can I
>use a sendSprite call from a frame script?

Yes, sendSprite 0 works for them. However you can have only one 
behaviort script in any given framescript channel (unlike sprites, 
which can have multiple behaviors attached).

>iii. Use a dummy sprite or splash screen and call all behaviors from this
>sprite

You can do that if you want. That's how I generally handle my MIAW 
dialog boxes.

>iv. Some way I haven't thought of

Using a movie script to create a global parent script reference? 
That's nice if you have, for instance, a large memory resident 
database you need to get into from anywhere in your code.

-- 

              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://shop.osborne.com/cgi-bin/osborne/0072195622.html
[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