Help: ordered data set

I’m creating a timeline to stop a movieclip at specific times.

Using setInterval I’d like to use an if statement to pause my movieclip at each of the times indicated by variableTimes:

variableTimes = [15, 20, 25];
if(myTimer=variableTimes){
myMovie.stop();

However, I can’t seem to figure out how to give variableTimes three independent variables. Help?

variableTimes = [15, 20, 25];
for(i=0,i<=variableTimes._length-1,i++){
if(myTimer==variableTimes*){
myMovie.stop();
}
}

please note the “==” this compares variables
"=" is used to set variables

thanks. the function makes sense and it should work but i’m getting an error regarding my brackets and I don’t know why. this is what i have placed in the frame. Do you have any idea why it’s not working?

myTimer = setInterval(countDown, 1000);
displayTime = 46;
mouthTimes1=[6,15,29,35];
mouthTimes2=[8,17,31,37];
countDown = function(message){
displayTime–;
}
for(i=0,i<=mouthTimes1._length-1,i++){
if(myTimer==mouthTimes1*){
_parent.stop();
}}
for(i=0,i<=mouthTimes2._length-1,i++){
if(myTimer==mouthTimes2*){
_parent.gotoAndPlay(_currentframe+1);
}}

if thats a direct copy and paste of the code I dont see any reason it gives an error, what I would do here is try putting the “}}” on seperate lines…or maybe use the autoformat thing in the actionscript window, it usually makes errors pretty apparent.

If you can locate the error upload the fla, or pm it to me if youre worried about it being stolen.

Hey, no problem, I wasn’t paying attention to semi-colons.

for(init; condition; next){}

instead of

for(init, condition, next){}