Each movie links to one common external castlib, lets call it GCode.cst (for global code castlib). In this castlib, I have a movie script with a handler called SharedPrepareMovie and another called SharedStartMovie. Each of these two handlers take a parameter of a symbol. Back to this in a second.
Then each movie has its own movie script cast member which has the real on PrepareMovie and on StartMovie handlers. In these handlers, I do any custom code that may need to be done for this particular movie, then I call the Shared version of the handler and pass in a symbol for the type of the movie that it is. For example, in some large projects I may have a mainmenu module and some chapter movies, and a help movie, etc. So a typical chapter movie might look like this:
on prepareMovie -- any special code for this movie, if there is any SharedPrepareMovie(#chapter) end
on startMovie -- any special code for this movie, if there is any SharedStartMovie(#chapter) end
Back to the shared handlers, the movie script in the GCode castlib is really just a case statement:
on SharedPrepareMovie symMovieType
case symMovieType of
#chapter: -- whatever you need to do all chapters#menu: -- whatever you might need to do for a menu
#help: -- whatever you might need to do for a help movie
-- etc.
end
endAnd I have a similar approach for the SharedStartMovie handler.
Hope this approach helps,
Irv
At 10:07 AM +0200 6/9/04, Roland Schroth wrote:
I have the following problem:
In a movie script I have a prepareMovie and a startMovie procedure to initialize some settings.
As I want my other movie scripts to still execute their own code for these messages, I thought that putting a pass at the end of
each of these procedures should enable that behaviour.
But now I have the problem that only the first prepareMovie is executed and the pass does not seem to have any effect at all.
Neither the scripts in the internal cast nor those in the external ones execute their prepareMovie or the startMovie messages.
--
Multimedia Wrangler.
[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!]
