Loops and Functions

I’ve attempted to add functions to some movieclips created with a loop (and sadly failed). Here’s how I did it, and i’m just wondering if someone can point out where i went wrong.

Here is the basic structure of the code:

 
function onEnterFrame() {
for (i = 0; i < count; i++) {
       myMovieClips = this["myMovieClip" + i];
 
       if (condition = true) {
          //i'm pretty sure that the problem is right here:
          myMovieClips.doSomething();
          myMovieClips.doSomethingElse();
         }
}
}
 
//then i have my functions
function doSomething() {
 
}
 
function doSomethingElse() {
 
}

The functions that i created aren’t getting triggered for some reason.
Any help with this would be appreciated.