Square particles Timing

Hey I am trying to create a web site using flash. I have these square particles i want to come on when I open the browser, loop 2 times and then stop. I can figure out how to do this. Please help me.
I put on what i have so far so that you can get an idea of what i want.

Peace

Well I didn’t look at your .fla, but try this…

Create a new layer in the timeline you want to loop twice.

In frame 1 add these actions…
[AS]loopVar++;[/AS]

Now right click on the last frame in that timeline on that layer and choose “Insert Blank Keyframe” then add these actions to that frame…
[AS]if (loopVar == 2) {
stop();
}[/AS]

loopVar++ is like saying loopVar = loopVar+1 so it will create a variable called loopVar, then add 1 to it every time that frame is hit (or looped around to in other words).

Then the if statement checks to see if the loopVars value is equal to 2, and if it is, it stops.

Also… please don’t PM me to look at your threads, it gets annoying because I get a ton of members that try and do that too (and yes, I tell them not to do it as well).

this has been asked 2 additional times…

I am deleting those threads…

Rev

If I were you, I would think about using ActionScript to duplicateMovieClip however many times you want and then
stop(). It’s a complicated process(in my mind), but it would get what you want done without much file size. If you want to know how, reply.

Exactly what you want I have done by accident when trying to duplicateMovieClip indefinately. I’m kinda new at this, but I’ll help where I can!

Yea i want to know how to do the movie script, Please respond

Peace

There are a few ways to do this. They are all in forums here at Kirupa!! Put in the search for duplicate movie clip, this is one:
http://www.kirupa.com/developer/mx/circular.htm
You will find others.
First, make your MC (done). Give it an instance name (i.e.“square”).
Then in your MC you define where it goes and what it does:
Use onClipEvent to define _x and _y and _alpha.

I just realized how much this would take and I can’t really explain everything in any forum. Too much AS. So, I will be back with a Fla to show you what I mean.

Okay, here’s a start:
I’ve put together a little something that will help you on your way. I actually forgot how I messed up before, but this is close (hehehe). This will make your squares apear, fade away, and remove indefinately. I’m getting tired, so I hope this helps get you on your way. You can probably add a loop around the whole thing to limit how long it goes for before it stops repeating. The Math.random forms are explained like this:
=30+Math.random()*100;
means the random number will be between the 30 and the sum of both numbers (130).
You will need to understand this to define your borders of where you want the boxes to appear.
If this is confusing - good - then you’re learning!!
Good luck!!(-:

WAIT!!
I forgot (see…I am an idiot!!);
I put a stop(); when the MC had been repeated 50 times.
if(i>=50){
stop();
}
So there you go!. You can shorten the time by shortening the frames. I totally forgot I did that! My bad. I hope this helps!!