MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual page 56

Hide thumbs Also See for DIRECTOR MX 2004-USING DIRECTOR:
Table of Contents

Advertisement

To view a sprite in the Score by its name:
In the Score, select the Sprite labels pop-up menu.
1
Select Name. All the sprites in the score appear with their sprite name listed.
2
To view a sprite on the Stage by its name:
Select a sprite on the Stage. The sprite name appears on the second line of the sprite overlay.
To edit the name of a sprite:
Select the sprite and open the Property inspector.
1
Enter a name in the Name text box.
2
Setting the Sprite name property in Lingo or JavaScript syntax
The new sprite name property is accessible as a standard sprite property. The
be read at all times, but names can only be assigned via script when in score recording mode.
The syntax is as follows:
put sprite(1).name -- this displays the name in the message window.
You can also refer to the sprite by using its given name when evoking script commands on the
sprite. For example:
sendSprite ("pete", #handlername) -- call the "handlername" method in
sprite("pete")
put sprite("somename").rect -- display the sprite's rect
To find out what sprite is targeted for a particular name, you can use the following expression:
sprite("myName").spriteNum
To create a name for a sprite, the assignment must be made in score recording mode. Note that
you don't have to use the updateFrame command, but the record frame must be a frame where
the sprite exists in the score.
beginrecording
sprite(2).name = "tubular"
endrecording
For more information about this property, see the Scripting Reference topics in the Director
Help Panel.
56
Chapter 3: Sprites
property can
name

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?

This manual is also suitable for:

Director mx 2004

Table of Contents