Apply method to multiple Movieclips

say i have a method “btnClick”, and i have 5 buttons: btn01,btn02,etc… how do i apply this method/function to the 5 buttons through code?
here is what i am trying to do(this is just pseudocode):

MovieClip.prototype.btnClick = function(img){
  this.onRelease = function(){
    open(img);
  }
}
for(i = 1;i<=5;i++){
    _root["btn0"+i].btnClick(["img"+i]);
}