-
What is Do . . . While? I've done BASIC programming, but in ActionScript, it nearly locks up my Flash presentation.
Any help?
-
Do.. While is the same as 'Loop' and 'For'.
It DOES something WHILE something else is true. It differs from For and Loop as it will DO something once before checking whether something is true.
The below examples illustrates the differences.
DO... WHILE
Example:
i = 0;
do {
i = ++i;
trace (i);
} while (i < 5);
Output :
1 2 3 4 5
FOR
Example
for (i = 0; i < 5; ++i) {
trace (i);
}
Output:
0 1 2 3 4
[Edited by Little Ben on 08-06-2001 at 09:47 AM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|