substituteFont
557
Example
This statement returns the sub-picture type in stream 2:
-- Lingo syntax
member(12).member.subPictureType(2)
// JavaScript syntax
member(12).member.subPictureType(2);
See also
DVD
substituteFont
Usage
TextMemberRef.substituteFont(
originalFont
,
newFont
)
substituteFont(
textMemberRef, originalFont, newFont
)
Description
Text cast member command; replaces all instances of one font with another font in a text
cast member.
Parameters
originalFont
Required. The font to replace.
newFont
Required. The new font that replaces the font specified by
originalFont
.
Example
This script checks to see if the font Bonneville is available in a text cast member, and replaces it
with Arial if it is not:
-- Lingo syntax
property spriteNum
on beginSprite me
currMember = sprite(spriteNum).member
if currMember.missingFonts contains "Bonneville" then
currMember.substituteFont("Bonneville", "Arial")
end if
end
// JavaScript syntax
function beginSprite() {
currMember = sprite(spriteNum).member;
if (currMember.missingFonts contains "Bonneville") { //check syntax
currMember.substituteFont("Bonneville", "Arial");
}
}
See also
missingFonts
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...