with
749
Description
Statement; tests an expression and runs a statement or series of statements repeatedly in a loop as
long as the expression is
true
.
Before the statement block is run, the
condition
is tested; if the test returns
true
, the statement
block is run. If the condition is
false
, the statement block is skipped and the first statement after
the
while
action’s statement block is executed.
Looping is commonly used to perform an action while a counter variable is less than a specified
value. At the end of each loop, the counter is incremented until the specified value is reached. At
that point, the
condition
is no longer
true
, and the loop ends.
The
while
statement performs the following series of steps. Each repetition of steps 1–4 is called
an
iteration
of the loop. The
condition
is retested at the beginning of each iteration, as in the
following steps:
1
The expression
condition
is evaluated.
2
If
condition
evaluates to
true
or a value that converts to the Boolean value
true
, such as a
nonzero number, go to step 3.
Otherwise, the
while
statement is completed and execution resumes at the next statement
after the
while
loop.
3
Run the statement block
statement(s)
.
4
Go to step 1.
See also
do while
,
continue
,
for
,
for..in
with
Availability
Flash Player 5.
Usage
with (
object
) {
statement(s)
;
}
Parameters
object
An instance of an ActionScript object or movie clip.
statement(s)
An action or group of actions enclosed in curly braces.
Returns
Nothing.
Description
Statement; lets you specify an object (such as a movie clip) with the
object
parameter and
evaluate expressions and actions inside that object with the
statement(s)
parameter. This
prevents you from having to repeatedly write the object’s name or the path to the object.
Содержание 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...