How to create a Rectangle which is a MovieClip

Hi all,

 I am new to Flash & ActionScript 3.0. I'm really stuck with what i am trying to do! 
 I feel there is someone who helps me in the below context and please flash experts spare your 2 minutes in filling up reply to this post and I feel happy with this.

 My need is: 
1.) I need ActionScript 3.0 code to create a Rectangle shape which must be a MovieClip. So, I need to pass/access MouseEvent_CLICK events on this MovieClip.

 2.) Now, this newly created MovieClip(or rectangle) should not be created with same/static size always. Instead, it's size is dependable on some value(say,var **index**:int). 

    In this case, I think it is better and good programming practice to write the code for dynamic-sized MovieClip in a user-defined method(say, createDynaMovieClip()).

   I need the full requirement in ActionScript 3.0 code format only.
  So, how to do it?

  I got struck up with this problem and the sample code which I developed till now is as shown below(which creates the required rectangle):
import flash.display.MovieClip;

var rectangle:Shape = new Shape();;,90,180,300);;

var myMovie:MovieClip = new MovieClip();
var noteCount:int=5;


So, I am unable to convert it to MovieClip using ActionScript 3.0 code and of dynamic size.
Dyamic means:

Note: MovieClip width is constant, but varies in height depending on value present in index variable.

It’s urgent…
Waiting for your replies…

Thanks in advance…