Scripting / Some Basic but Useful Lingo Scripts pt. 2
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.
Learn More
Subtitles of the Movie
So here I've shown you examples of Frame scripts and Sprite scripts, you can also write scripts that are more global that will impact the entire project, you can do these by setting up cast members. Let's open up my Cast Window here on the bottom and usually in the first spot of your cast file you want to create something called a movie script and here this Lingo syntax will create a global variable called G current score and then the event handler is on stop movie, set the G current score equal to 0. So in other words when the movie is stopped and ends go ahead and set the Score back to 0, this will work through out the movie, there's a compatriot to this event handler on start movie. So when the movie starts oftentimes you want to initialize everything, maybe move Sprite back in place, set the Score 0 get your movie ready for its initial running, so you would just then type on start movie. G current score equals 0 end and again this is located here in the Cast Window in position number one, because you'll often need to reference this script and you'll have a bunch of methods, functions and events here for setting up an initial movie or perhaps resetting a movie when you do the on stop movie event handler. Notice that if I open up my Script tab here in the Property Inspector I have type here, movie, as well as behavior and parent. I covered those in a previous movie at the beginning of this section on Lingo scripting or scripting in Director 11. So what you do is you just set this type to Lingo, notice the other option is JavaScript and then set the type to movie and then that will allow you to create a script that will be available at all times while your movie is playing. In this case when the movie starts playing and when the movie stops playing depending on the handlers that you put in that script. So that'll conclude this very short brief introduction to scripting in Director 11. In this section I've just introduced you to some very basic scripting concepts that are essential to understanding how to script in Director including definitions of important terms, syntax available data types, arrays, operators and so on. Now as you write scripts in Director you'll no doubt feel the need for increasingly advanced information about how to write these scripts so I definitely recommend that you check out the Director scripting essentials in the help area first. That's going to be found in the contents tab, notice that there's two sections using Director and Director scripting reference. Inside of that Director scripting reference is also introduction and then Director scripting essentials. I recommend that you start with Director scripting essentials, read through this section and then go in order down the various categories here which will server as a review of what I've covered here in this section of the tutorial, types of scripts, terminology, syntax, data types, variables, operators, conditional constructs and more including quite a number of topics that I did not have time to cover in this short section. You can also review my complete dedicated VTC tutorial on learning Director Lingo, but let me now move onto the next section of this tutorial to introduce you to working with 3D objects in Director 11.
Tutorial Information
| 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: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 