Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Lingo (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Scripting=== There are 4 types of Lingo scripts in Director, each with a specific purpose. Each type of script may be added to certain types of compatible objects. *''Cast'' scripts work only with their member, not all events can be used with them. *''Behavior'' scripts are attached to a sprite or inserted into a frame. Sprite behaviors are often used to give control of the sprite's properties and movement. Frame behaviors can be used to create a pause or delay within a certain frame in the score. Behaviors make it easy to program in an object-oriented way, as you can directly see the relationship between the programming and the item they are attached to. They can also control or interact with other sprites, making them a true object. *''Movie'' scripts are not attached to sprites nor can they be instantiated as Objects. They are available throughout the program (movie) and are especially useful for holding global handlers and initializing global variables at the start or end of the movie. *''Parent'' scripts are used to ''birth'' (create instances of) an object into a variable using the ''new'' command. These objects can control sprites and other media remotely, without being attached to any one sprite, may be used to control data or other non-displayed items, and are useful for recursion routines such as pathfinding. A Parent script can be used to create or destroy an object at any time, freeing them from the confines of the score that a Behavior is limited to. Behavior and parent scripts encourage good object-oriented programming. Movie scripts are not as OOP-oriented. However, they can still be used to make ''black-box'' handlers, where other objects can input raw data and receive answers back, without knowing the inner workings of the box. Using the strengths and ease-of-use of Director's programming methodology, with the advantages of OOP makes for a powerful and fast programming environment.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)