Macromedia Director MX for Windows and Macintosh [Electronic resources] : Visual QuickStart Guide نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Macromedia Director MX for Windows and Macintosh [Electronic resources] : Visual QuickStart Guide - نسخه متنی

Andre Persidsky, Mark Schaeffer

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید





Using the Message Window


Director's Message window is a way for you to "talk" to Director, using the only language it understands: Lingo. When you type a Lingo command in the Message window, Director executes the command instantly. The Message window is therefore a very useful tool for testing and debugging scripts.

You can also use the Message window to keep an eye on what's happening behind the scenes while a movie is playing. When you turn on the Message window's Trace feature, it gives you a continuous, real-time report on the Lingo commands Director is executing. If your scripts aren't working as expected, this technique can help you uncover the problem.


To execute commands from the Message window:




Choose Window > Message to open the Message window (Figure 15.46).


Figure 15.46. The Message window allows you to communicate with Director in real time.


Type a Lingo command in the upper pane of the Message window and press Enter (Windows) or Return (Mac).

Director executes the command. For example, if you typed go to frame 15, Director would move the playhead to frame 15 (Figure 15.47).


Figure 15.47. Director instantly executes any command that you type in the Message window.



Tip


If you want to enter commands automatically, the Message window offers the same Lingo pop-up menus that the Script window has. See "To insert Lingo elements into a script without having to type them," earlier in this chapter.




To get the value of expressions in the Message window:




Choose Window > Message to open the Message window.

In the upper pane of the Message window, type put, followed by an expression whose value you want to find out, and press Enter or Return.

For example:


If you wanted to know the product of 23 multiplied by 17, you'd type put 23 * 17.


If you wanted to know the value of Director's time function (that is, if you wanted to know the current time), you'd type put the time.


If you wanted to know the current value of the global variable named gMyVariable, you'd type put gMyVariable. (See the next section to learn about variables.)




Director reports the result in the lower pane of the Message window (Figure 15.48).


Figure 15.48. When you enter a command (such as the put command) that requires a response from Director, Director responds in the lower pane.



To trace scripts while a movie is playing:




Choose Window > Message to open the Message window.

Click the Trace button to select it.

Play your movie.

Director reports each Lingo command it executes in the lower pane of the Message window. In addition, it reports other information such as the name of the handler that contains the commands, and the frame that the playhead is in when the commands are executed (Figure 15.49).


Figure 15.49. When the Trace button is selected, the Message window displays information about each handler that Director executes.



Tips


The lower pane of the Message window can fill up quickly when Trace is turned on. In most cases, you won't be able to read the reports in real time. Instead, you can use the scroll bar to scroll through the contents of the window after the movie has finished playing.


To clear the Message window, click the Clear button.



/ 138