Lingo 4.0 Tutorial: Globals
READING: Manual pages of the commands described here File "PresidentialRace1.dir"
the use of global variables: That's how different scripts
variable's environment is the current execution of the
handler it is used in (the area between the keywords on and end). So,
by default, Director's variables are local variables. That's
not very useful.
the sample file, you need to keep two global variables,
one for each presidential candidate. Count the votes and
the results. Note that also you can change the
contents of any
field through scripting ( member(9).text
= "This and that").
What happens in the case of a tie between the presidential
Note that the background music stops after a while. How would you make it keep playing? How would you make it loop smoothly?File "PresidentialRace2.dir"
To become even more interesting, in this file there is some visual feedback when you roll the mouse over a candidate. Makes use of mouseEnter and mouseLeave. When the mouse enters a sprite (that is, a channel), the cast member changes to a new one ( sprite(2).member = "Arthur2" ). Note that the cast members have been named in a meaningful way. We argue that it is better to use the names of cast members instead of their numbers in the cast library that bounds them to a particular location.
Compare the sizes of the two movies - why such a difference?
is another way to use sound: Smooth music is
Maintained By: Takis Metaxas