TypeError: Error #2007, when initializing ENTER_FRAME function with dynamic MCs

I have three dynamically created MCs on stage and when I press on first one I want to initialize ENTER_FRAME function , but Im getting this error:

TypeError: Error #2007: Parameter listener must be non-null.
    at flash.events::EventDispatcher/addEventListener()
    at dynamic_buttons_fla::MainTimeline/onUp()

Here is my code:

var button:Array = new Array();

for (var i:int = 0; i < 3; i++)
    var btn:MovieClip = new Btn();
    btn.y = i*(btn.height + 2);
    btn.x = 0;
    button* = btn;
    btn.addEventListener(MouseEvent.MOUSE_UP, onUp);
function onUp(e:MouseEvent):void{
    switch (e.currentTarget){
        case button[0] :
            addEventListener(Event.ENTER_FRAME, onLoop);    // THIS IS CAUSING ERROR
            function onLoop(e:Event):void{
        case button[1] :
        case button[2] :

Why i’m getting this Parameter listener must be non-null. I don’t understand which listener could be null. Buttons? But they can’t be null coz they are listening to other events apart from ENTER_FRAME.
How can I trigger ENTER_FRAME function in this case?
Thank you