
180
Chapter 8: Text
Modifying strings with Lingo or JavaScript syntax
As time passes or other conditions change, you might want to update and change text. For
example, you might want to frequently update a text sprite that displays the user’s name or a
description of a musical selection that the user is currently streaming from a website. For more
information, see the Scripting Reference topics in the Director Help Panel.
•
To set the entire content of a text or field cast member, set the
text
cast member property to a
new chunk of text. The chunk can be a string or another text cast member.
•
To combine character strings, use the
&
and
&&
operators. The
&
operator attaches the second
string to the end of the first string. The
&&
operator includes a space between two strings when
they are combined.
•
To insert a string of characters into another string, use the
text
property. For example,
sprite(1).text = sprite(1).text + "someWord"
.
•
To delete a chunk expression from a string of text, use the
delete
method.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...