>Global functions exist in movie scripts.
>
>Sorry, you couldn't declare them in Lingo.ini (if only, unfortunately
>there'd be a security problem). However you could reference external
>casts and link them in dynamically or import the script text.
>[snip]
>- Tab
>
>
>At 11:35 AM 7/25/01 +1000, Brendon wrote:
>>hi,
>>
>>How do i make a global (or would it be public? i'm not sure of terminology)
>>function in director? As i'd prefer to encapulate often typed code. Could
>>i store these functions in lingo.ini for quick mods?
>>
>>Cheers
>>
>>Brendon
You can declare globals in the Lingo.ini, which makes it very convenient
when you know a client is waffling on several different things at the end
of a project (then when the client says they changed their mind, they don't
want the warning screen up that comes up at the beginning, you just change
one value in your lingo.ini and reburn without having to change the
protected director files.
And I usually have something in the prepareMovie handler to define those
variables IFF they are void.
in Lingo.ini:
on startup
global gCanIHaveVariablesInLingoIni
gCanIHaveVariablesInLingoIni = "roymeo says that I can!"
end startup
in the director file:
on prepareMovie
global gCanIHaveVariablesInLingoIni
if voidP(gCanIHaveVariablesInLingoIni) then
gCanIHaveVariablesInLingoIni = "Tab says that I cannot."
end if
alert gCanIHaveVariablesInLingoIni
end
and the alert appears with "roymeo says that I can!"
and in the message window in the projector (cut n pasted directly from a
projector message window):
put gCanIHaveVariablesInLingoIni
-- "roymeo says that I can!"
-----
Roy Crisman
[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!]