Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
Continuing my review of important Director scripting terminology that you'll run across while learning more about adding scripting interactivity and increased capabilities to your director projects we get to messages. Messages are notices that Director sends to scripts when specific events occur in an movie. For example when the play head enters a specific frame the enter frame event occurs and Director sends an enter frame message. If the script contains an enter frame handler the statements within that handler will run because the handler received the enter frame message. No scripts contain a handler for a message the message is ignored in the script. Next we have lists, lists in Lingo or arrays in JavaScript syntax are order sets of values used to track and update a collection of related data such as series of names or the values assigned to a set of variables. Here's an example of a kind of special case of list in Lingo, that's called a case statement right here, case member of, notice that these are the lists of data sets or information, related sets of information in the lists. Here I have animated GIF, Flash, QuickTime, digital video and vector shape. Next we come to methods, methods are terms that either instruct a movie to do something while the movie or they return a value and are called for from an object. For example you would call the insert frame method from the movie object using the syntax underscore, movie, dot, insert frame, open, close, parenth although similar in functionality to top level functions methods are always called from an object and top level functions are not. Let's see if we can see any examples of methods here in this Lingo script. I don't see a method but here's a list in Director right there, notice that there's another set of or collection of related information. There is the list there with the syntax, that's a properties list so you have a property as well as a list item. For example the members of a team together, a sports team, together with maybe their jersey numbers. I have another script ready here and here we can perhaps see a method. Here's an example of a method, you're setting the My Sprite cursor to this particular Sprite number right here. So you're setting the Sprite cursor, that would be the method. Next we have operators; operators are terms that calculate a new value from one or more values. For example, the subtraction operator subtracts two or more values from each other to produce a new value. Parameters are placeholders that let's you pass values to scripts, parameters only apply to methods and event handlers and not to properties. They are required by some methods and are optional for others. We ran across parameters when we looked at behaviors, most behaviors require additional settings or values that are called parameters in order for that behavior to work. For example a parameter of the mouse cursor would be which mouse cursor icon you want to use. Here's an example script with an author defined parameter on it is ok to attach pass along these parameters. Right there, me, a Sprite type and a Sprite number, so again those are values that I'm passing along to a method in order for Director to do something. Another good example of a parameter would be the movie objects Go Method, if I were to type this script here, go to frame the parameter is here in the parenthesis, Director needs to know which frame to go to in this case 34 is the parameter right there. Next we get to properties, properties are attributes that define an object. For example a Sprite in a movie has specific attributes such as how wide it is, how tall it is, its background color and so on. To access the values of these 3 specific attributes you would use the Sprites objects width, height and back color properties. Here in this script there is a section labeled properties where I've set up various properties of the Sprite object, here is the offset, click from the Sprites, the property P locate offset. Here's the property P active, here's the property P constrained, this constrains to the Stage flag. Let's have a look at the other script and see if there are properties defined up here. Yeah there is a section called properties, My Cursor Type, My Built In Cursor, My Custom Cursors, My Custom Mask for the Cursor. Now that brings us to statements, statements are valid instructions that Director can execute. All scripts are made up of sets of statements, here is some Lingo that constitutes a complete statements on Begin Sprite Me, Set Sprite Cursor Me and Begin Sprite right there. And lastly we get to variables, variables are elements used to store and update values, variables must start with a letter an underscore or the dollar sign. Subsequent characters in a variable name can also be digits zero through nine. To assign values to variables or change the values of many properties you can use the equals operator, here's an example of a very simple variable here I'm declaring the variable, My Score equal to 56. So the value 56 will be stored in that variable until I change it, perhaps with another line of code. Let me now move onto the next movie and review in more detail scripting syntax, you can use your general syntax rules that apply to Lingo and the JavaScript scripting language.
| Course: | Adobe Director 11 |
| Author: | James Gonzalez |
| SKU: | 33901 |
| ISBN: | 1-934743-84-4 |
| Release Date: | 2008-07-31 |
| Duration: | 9.5 hrs / 107 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |