I have a SWF that loops on the main.
now I want that after 4 or 5 times of looping it does an action.
I know that with Var I can count and then with a little action I can instruct Flash that when a var value is reached it executes an action.
But how again do I do that?
(it was something with varofsumthing = “+1”
if varofsumnthing == “5”
gotoandplay(whatever)
hope you lot can help me out 
system
2
if(counterVariable++ == 5){
// Do something.
}
Just make sure you initialize counterVariable first. 
-Al
system
3
so my varofsumthing = “+1” was actually correct???
wow! 
system
4
in one frame I have this to either continue to play if the varcount did not reach 3 or to stop if it did…
if (this.countvar++ == 3) {
this.gotoAndStop(347);
}
else {
this.gotoAndPlay(347);
}
and this action to set the var with each loop with an increase of 1
this.countvar +=1;
but, as you guessed… It don’t work 
system
5
variable++ is the same as variable += 1
So in my code, the variable is incremented in the IF statement.
Now that I have a better idea of what you want, try this in frame 347:
if (this.countvar == 3) {
this.stop();
} else {
this.gotoAndPlay(346);
}
You have to go to the previous frame. Going to the same frame won’t work (I think). And of course, make sure you have this in a frame before 346:
this.countvar = 0;
And you need to increment your counter somewhere with your
this.countvar += 1;
or
this.countvar++;
-Al