// JavaScript syntax
var whichCastMember = member("Power Switch").number;
This statement assigns the cast member Red Balloon to sprite 1:
-- Lingo syntax
sprite(1).member = member("Red Balloon").number
// JavaScript syntax
sprite(1).member = member("Red Balloon").number;
This verifies that a cast member actually exists before trying to switch the cast member in
the sprite:
-- Lingo syntax
property spriteNum
on mouseUp me
if (member("Mike's face").number > 0) then
sprite(spriteNum).member = "Mike's face"
end if
end
// JavaScript syntax
function mouseUp() {
if (member("Mike's face").number > 0) {
sprite(this.spriteNum).member = "Mike's face"
}
}
See also
castLib(),
Member
number (menus)
Usage
the number of menus
Description
Menu property; indicates the number of menus installed in the current movie.
This menu property can be tested but not set. Use the
menu bar.
Note: Menus are not available in Shockwave Player.
Example
This statement determines whether any custom menus are installed in the movie and, if no menus
are already installed, installs the menu Menubar:
if the number of menus = 0 then installMenu "Menubar"
This statement displays in the Message window the number of menus that are in the
current movie:
put the number of menus
See also
installMenu,
896
Chapter 14: Properties
number (menu items)
command to set up a custom
installMenu
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers