A: 

When you go to remove the event, you are using a new instance of myFunction, not the same one you added it with. You either need to declare the function like you would any other function, and use the event args to examine the button's position like. I Think you want the stageX and stageY properties: http://www.adobe.com/livedocs/flex/3/langref/flash/events/MouseEvent.html

// This function adds or deletes an event listener
function listentoButton (isTrue:int, position_x:int, position_y:int):void {
    if (isTrue == 1) {
        this["button_position_"+(position_x)+"_"+(position_y)].addEventListener(MouseEvent.CLICK, myFunction);
    } else {
        this["button_position_"+(position_x)+"_"+(position_y)].removeEventListener(MouseEvent.CLICK, myFunction);
    }
}

function myFunction(eventArg:MouseEvent):void {
//use MouseEvent
};

Or you can create a little MyFunctionParameters class to hold the coordinate information and create a new instance of that class, add it to a collection indexed by the x and y coordinates, and later when you go to remove the event, you would lookup the MySpaceParameters instance in the collection, based on x and y coordinates, then use that to remove function.

class MyFunctionParameters
{
public x:int;
public y:int;
    function myFunction(eventArg:MouseEvent):void {
        userClickedPosition(x,y);
    };
}
AaronLS
thanks! using stageX and stageY properties seem to work perfectly.
Emiel_83