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 go through each of the five steps here in detail for setting up, creating, assigning, opening and closing your MIAWs. Let's start off by setting up the parent or the main window, its Stage size, frame rate and all the other display properties that you want to use, then open up the movie that you'll be playing inside of the window. In my case here it's the My movie director file, go ahead and set the Stage size, frame rate and all the other properties, notice that this size here is much smaller then my main window so you can see that behind, I did this deliberately so you can see that this is in fact a window playing inside of the other Director file. Once you've established all of these settings, I'm going to go back to my main window, the MIAW file and let's go ahead now and start setting up the scripts. First thing you'll need to do is copying this out of the Director help area is create or declare your MIAW, you must first explicitly create or declare the window, use the following script, window, open, close parenth dot new and then the window name, the JavaScript syntax is here, new window, open parenth, quotation mark, window name, close, quotation mark, close parenth and then a semicolon at the end. In the Director help you'll also find details for assigning a file name and a title to the movie in your window, as well as opening the window. So notice that there are three steps here, I've combined these steps into what I think is a simpler script that I have open here in a movie scripts, go ahead and open up my Cast Window and the very first position of the Cast Window you should have a movie script, it should open with a start, on start movie handler. So that when the movie starts go ahead and create your window, your new window, I'm going to place that Director file in the new window and then I'm going to direct through Lingo, Director to open the window, so I like this line here combines those three, sets up the new window, declares a file to go in that window and then opens it. Let's go ahead and test this that its working. The very first time you do this it'll ask you where is the my movie file, I'm going to point to it, you only need to do this one time and then after that it'll go ahead and find it and locate it and play it for you when you create a projector, as long as you place the movie in a window file in the same location as the main Director file it'll find it ok. So notice that its playing fine right there, so you'll want to copy my handle there, on start movie, end and then inside of that place that Script window, open close parenth dot new, open parenth, quotation mark, my movie or the name of your movie.dir, don't forget the dir ending at the end there. Close the parenth, close the quotation mark.open and then open and close parenthesis at the end of that open. Now let's talk about closing the window for the MIAW, there's two ways to do this, you can close the window but leave the movie in memory or you can close the MIAW and remove the movie from memory when it's no longer in use. If you leave the Movie in a Window in memory you get better performance if the window is reopened. Normally I do it this way, for example if I'm scripting a portfolio and I have the portfolio pieces opening up in new windows you may want to have the user load up or reload up those portfolio content pieces right away. So I normally leave the movies in a window in memory. However doing it this way consumes a lot more memory, so only use this option if you expect the Movie in a Window to be reopened after it initially opens and then it gets closed again. If you do remove a Movie in a Window from memory, performance slows down if the window is reopened, however it doesn't consume memory until the movie is reloaded. So I recommend using this option if you don't expect a movie in the window to be reopened after it initially runs or you want to optimize memory on the computer running the Movie in a Window. So I have an example of that method here, on mouse down, window, and the name of the file dot close, that will keep the MIAW in memory. If you want to remove it from memory you would use the forget method right there. Now what I've done is I've attached this script to my close window button, let's go ahead and stop my movie, click on the behavior icon and you'll see that there is my close script that's been attached, either close or forget, again forget will remove the MIAW from memory, close will just close it but keep it in memory. Let's go ahead and test my movie and make sure that its in fact working, close window, in this case forgets the window, closes it down and removes it from memory. Now there are additional methods for setting the window size and location of a MIAW as well as for controlling the appearance of your movies in a window. So let me move onto the next movie and review some of these scripts in more detail.
| 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 |