• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Using Basic ActionScripts > Working with While Loops and Using Loop...

Working with While Loops and Using Loop Exceptions

While loops wait for a specific condition to start or stop the loop. That may sound similar to the For loop, with one exception: The For Loop is self-contained, and the While loop works with an external condition, or one outside the scope of the loop. For example, to have a While loop perform the same action as the previous For loop, you would use the following script:

on (release) {
   while (x<10);
   myClip.duplicateMovieClip ("myClip" + x, x);
   myClip._rotation =45 + x * 10;
   x=x+1;
   }
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint