All scripts get compiled. But the execution is up to you as a programmer. (All scripts are "incrementally" compiled as you edit them in Director, or you can force them all to be recompiled by choosing the appropriately named "Recompile All Scripts" from the Control menu.) You control the flow of the program via if statements, go to frame / go to movie statements, subroutine (handler) calls, etc. Code executes in the order that you have designed. If it doesn't then you have a bug :)
There are three types of scripts in Director, Movie, Score (also known as Behaviors) and Parent (used for creating objects). I think you are talking about Movie scripts. Again, they are compiled, but their execution is generally up to you. Certain movie level handlers are called by Director if they appear in your movie. For example, if you have a "on startMovie" and/or "on prepareMovie" handler in a Movie script, then these will execute when you start your movie. Similarly, if you have a "on stopMovie" handler in a Movie script, this will execute when your movie stops. However if you have other "programmer defined" handlers in a Movie script, e.g, "on DoThisWheneverImCalled", then that code will only execute when some piece of code calls DoThisWheneverImCalled. Finally, if you have two copes of Movie level handlers, e.g., two copies (same or different) of "on startMovie" or "on DoThisWheneverImCalled" (or any name), the the first one found in the first cast will execute. For example, if you have a movie script in cast member 1 of the internal cast that has an "on startMovie" and you also have a movie script in cast member 10 of any cast or in castmember 37 of some linked external cast, the one in cast member 1 of the internal cast will run and the other(s) will be ingored. Irv At 9:00 PM +0800 4/18/02, noelle cheng wrote: >Hi, > >Could you enlighten me please? > >For scripts ( behaviors or otherwise) which remain in the cast (and >are cast member scripts) but not found in the score or on stage >are they executed and compiled at run time? > >In other words do *all * scripts in the movie get compiled and executed? > >How about identical scripts? Will they be executed twice? > > >TIA > >Noelle > >[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!] Lingo / Director / Shockwave development for all occasions. (Home-made Lingo cooked up fresh every day just for you.) [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!]
