P. 1
(eBook PDF) Macro Media - Using Flash

(eBook PDF) Macro Media - Using Flash

|Views: 647|Likes:
Published by rajijosh7
ADOBE FLASH
ADOBE FLASH

More info:

Categories:Types, Graphic Art
Published by: rajijosh7 on Mar 18, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/01/2011

pdf

text

original

In test mode, the Output window displays information to help you troubleshoot your movie.
Some information, such as syntax errors, is displayed automatically. You can display other
information by using the List Objects and List Variables commands. (See “Listing a movie’s
objects” on page 362 and “Listing a movie’s variables” on page 363.)

If you use the trace action in your scripts, you can send specific information to the Output
window as the movie runs. This could include notes about the movie’s status or the value of an
expression. (See “Using the trace action” on page 364.)

To display the Output window:

1If your movie is not running in test mode, choose Control > Test Movie.

2Choose Window > Output.

The Output window appears.

Note: If there are syntax errors in a script, the Output window appears automatically.

3To work with the contents of the Output window, use the Options pop-up menu in the
upperright corner:

•Choose Options > Copy to copy the contents of the Output window to the Clipboard.
•Choose Options > Clear to clear the contents of the Output window.
•Choose Options > Save to File to save the window contents to a text file.

•Choose Options > Print to print the window contents.
•Choose Options > Find to search for a string of text.
•Choose Options > Find Again to search again for the same string of text.

Listing a movie’s objects

In test mode, the List Objects command displays the level, frame, object type (shape, movie clip,
or button), target paths, and instance names of movie clips, buttons, and text fields in a
hierarchical list. This is especially useful for finding the correct target path and instance name.
Unlike the Debugger, the list does not update automatically as the movie plays; you must choose
the List Objects command each time you want to send the information to the Output window.

The List Objects command does not list all ActionScript data objects. In this context, an object is
considered to be a shape or symbol on the Stage.

To display a list of objects in a movie:

1If your movie is not running in test mode, choose Control > Test Movie.

2Choose Debug > List Objects.

A list of all the objects currently on the Stage is displayed in the Output window, as in this
example:

Level #0: Frame=1 Label="Scene_1"
Button: Target="_level0.myButton"
Shape:
Movie Clip: Frame=1 Target="_level0.myMovieClip"
Shape:

Edit Text: Target="_level0.myTextField" Text="This is sample text."

Testing a movie363

Listing a movie’s variables

In test mode, the List Variables command displays a list of all the variables currently in the movie.
This is especially useful for finding the correct variable target path and variable name. Unlike the
Debugger, the list does not update automatically as the movie plays; you must choose the List
Variables command each time you want to send the information to the Output window.

The List Variables command also displays global variables declared with the _global identifier.
The global variables are displayed at the top of the List Variables output in a section titled “Global
Variables,” and each variable is prefixed with _global.

In addition, the List Variables command displays getter/setter properties—properties that are
created with the Object.addProperty method and invoke “get” or “set” methods. A getter/setter
property is displayed alongside any other properties in the object it belongs to. To make these
properties easily distinguishable from ordinary variables, the value of a getter/setter property is
prefixed with the string [getter/setter]. The value displayed for a getter/setter property is
determined by evaluating the “get” function of the property.

To display a list of variables in a movie:

1If your movie is not running in test mode, choose Control > Test Movie.

2Choose Debug > List Variables.

A list of all the variables currently in the movie is displayed in the Output window, as in this
example:

Global Variables:
Variable _global.MyGlobalArray = [object #1] [

0:1,
1:2,
2:3

]
Level #0:

Variable _level0.$version = "WIN 6,0,0,101"
Variable _level0.RegularVariable = "Gary"
Variable _level0.AnObject = [object #1] {
MyProperty: [getter/setter] 3.14159

}

Chapter 19

364

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->