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.
Let me now review some scripting terminology that you'll encounter in the Director documentation or any other scripting resource that you'll need to access to learn more fully how to script in Director. My attention in this short section of the tutorial is just to provide an orientation to scripting in Director for a more complete treatment be sure to view the movies in my VTC tutorial covering Director's Lingo scripting language. Now in Director 11 you can use either Lingo or standard JavaScript to increase the capabilities of your Director projects. Both Lingo and the JavaScript syntax use some terms that are specific to each language in addition to some terms that are shared between each language, so let me review some of the more important of these terms in the next several movies. Important scripting terms are listed in alphabetical order in the Help section, Director Help if you go to the Director scripting reference you'll find a lot of these terms, you'll find more complete definitions as well as examples of the terms that I'm going to introduce quickly here in this movie. So you'll want to reference this resource before moving forward with your Director scripting. Let me start my definition of terminology with Constants. Constants are elements who values do not change. For example in Lingo Constants such as tab, empty and return always have the same values and cannot be modified. In JavaScript syntax Constants such as math. Pi and number.max underscore value also have the same values and cannot be modified. You can also create your own custom Constants in JavaScript syntax by using the keyword C-O-N-S-T or const dot. Next we have events; events are actions that occur while a movie is playing, events occur when a movie stops, when a Sprite has been clicked on. For example a button or when the play head enters a frame, events can also include when the user types at the keyboard, all events in Director are predefined and always have the same meaning. You can see an example in fact a number of examples of events here in some of my sample scripts. Here's one on Mouse Up's so when the mouse is clicked and then released on that particular Sprite that triggers an event On Drag Sprite is another event right here. On M Drag Sprite, so you'll see these commonly they'll say on Mouse Down on Mouse Up, On Key Click and so on. Now you shouldn't confuse events with functions, functions refer to either top level functions or specific types of JavaScript syntax code, the top level function instructs a movie to do something while the movie is playing or returns a value but it's not called for any specific object. For example you would call the top level list function by using the syntax list open, close parenthesis. Like a function a method also instructs a movie to do something while the movie is playing or returns a value but its always called from an object. So there's some overlap in terms of conceptually understanding these different terms but you can see that these are functions here, that's a function that says on M Drag active do the following. So what you'll do is you'll then use the mDrag vActive function called that out and then Director will know to perform these lines of script. There's another function here, in fact this script has quite a number of functions on prepareFrame me, actually that's an event and you'll know that it's an event because notice that it's in green and the functions are in black. So that's a reserve term on prepareFrame. Notice the On Mouse down is also an event its in green on Mouse up, those are reserved words in other words. Where as these are self defined or programmer defined functions, there's a list of instructions to do and then to call those instructions you just use the function name for right there. This is a good opportunity for me to introduce the term handlers or event handlers. These are sets of statements within a script that run in response to a specific event and subsequent message when an event occurs Director generates and sends a corresponding message to scripts and a corresponding handler runs in response to the message. The names of handlers are always the same as the events and messages they respond to. For example here in this script the on prepare me is an event handler, here on the mouseDown me is also an event handler. In other words what should I do when the mouse is pressed down. In this case you're setting the property M drag to true right, another term that I should define are keywords. Keywords are reserved words that have special meaning in Director. For example in Lingo the keyword On and Mouse Down as well as on prepareFrame have specific meanings and you cannot use those words in your scripts. For example you can't use them for variables or for function names, you shouldn't even use them as frame labels. Let me now move onto the next movie and review some additional terms including lists, messages, methods, operators and parameters.
| 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 |