Loop help

[AS]x = 0;
if(x < 5){
x++;
gotoAndPlay(38);
}
else{
gotoAndPlay(49);
}[/AS]

any hints?