Loop « Actionscript Programming « Flash Tutorials

Home
Flash Tutorials
1.Actionscript Programming
2.Animals
3.Animation
4.Colors
5.Design
6.Effects
7.Game Cartoon
8.Humans
9.Models
10.Nature
11.Operations
12.Shapes
Photoshop Tutorials
Maya Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
Flash Tutorials » Actionscript Programming » Loop 
Hello and welcome. Today we shall be leaning about one concept of Flash, for loops. For loops are very useful for looping through lots of information quickly, or trying out lots of possibilities quickly.

So what's the code about

This Flash action script tutorial is about loops, loops is a common well known tool. Loops are used to get something done a specific amount of times, or until a condition is changed.

Then adjust it so it's horizontally seamless:

The first loop we'll go over is the for loop. The for loop executes an finite number of times.

Get the Flash Player to see this player.

The following is how your animation should loop after following this tutorial:

A loop is a series of commands that are executed until a given condition is met. In Flash, there are two kinds of loops: 1. for loops 2. do...while loops We are going to talk about the latter—the do...while loops. Let's just say in plain English what we need those loops for. In short, we need them to instantly execute a given command (or commands) a number of times. Now this is the basic code:

This concludes our tutorial, I hope that you learnt the basics on how to use Flash loops, please feel free to post any questions you have at the Oman3D Forum.

In this tutorial, you will add actionscript to a Movie Clip animation to make it loop. You will learn to add variables to that actionscript to affect the speed easily. You can add this code to a variety of backgrounds and foregrounds.

To make you have a better understand on this tutorial, check the flash animated ocean below. This is what we are going to make by the end of this tutorial.

Once you have created your animation count the number of frames in the movie clip. Take the number of frames in the movie clip, then double or triple it depending on how many times you want it to loop on the main time line and add that number of frames to the frame with the movie clip.

Finally, you have completed this fantastic tutorial on flash sound. However, there may be a time when you wish to create the flash sound to loop several times. In this case, Macromedia flash mx has incorporated Loop function. To create flash sound loops several times, simply input the number of loops desired into Loop file under flash property inspector.

w__ww__.j__a__v___a__2___s__.___c___om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.