
656
Chapter 12: ActionScript Dictionary
String.substr()
Availability
Flash Player 5.
Usage
my_str
.substr(
start
, [
length
])
Parameters
start
An integer that indicates the position of the first character in
my_str
to be used to create
the substring. If
start
is a negative number, the starting position is determined from the end of
the string, where the -1 is the last character.
length
The number of characters in the substring being created. If
length
is not specified, the
substring includes all of the characters from the start to the end of the string.
Returns
A substring of the specified string.
Description
Method; returns the characters in a string from the index specified in the
start
parameter
through the number of characters specified in the
length
parameter. The
substr
method does
not change the string specified by
my_str
; it returns a new string.
String.substring()
Availability
Flash Player 5.
Usage
my_str
.substring(
start
, [
end
])
Parameters
start
An integer that indicates the position of the first character of
my_str
used to create the
substring. Valid values for
start
are
0 through
String.length
- 1. If
start
is a negative value,
0 is used.
end
An integer that is 1+ the index of the last character in
my_str
to be extracted. Valid values
for
end
are 1 through
String.length
. The character indexed by the
end
parameter is not
included in the extracted string. If this parameter is omitted,
String.length
is used. If this
parameter is a negative value, 0 is used.
Returns
A string.
Description
Method; returns a string consisting of the characters between the points specified by the
start
and
end
parameters. If the
end
parameter is not specified, the end of the substring is the end of
the string. If the value of
start
equals the value of
end
, the method returns an empty string. If
the value of
start
is greater than the value of
end
, the parameters are automatically swapped
before the function executes and the original value is unchanged.
Содержание FLASH MX 2004 - ACTIONSCRIPT
Страница 1: ...ActionScript Reference Guide...
Страница 8: ...8 Contents...
Страница 12: ......
Страница 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Страница 54: ...54 Chapter 2 ActionScript Basics...
Страница 80: ...80 Chapter 3 Writing and Debugging Scripts...
Страница 82: ......
Страница 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Страница 112: ......
Страница 120: ...120 Chapter 6 Using the Built In Classes...
Страница 176: ......
Страница 192: ...192 Chapter 10 Working with External Data...
Страница 202: ...202 Chapter 11 Working with External Media...
Страница 204: ......
Страница 782: ...782 Chapter 12 ActionScript Dictionary...
Страница 793: ...Other keys 793 221 222 Key Key code...
Страница 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Страница 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Страница 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Страница 816: ...816 Index...