Try this:

I explain everything in the comments, havn't tested it though, so not sure about it.

PHP Code:
private function bitmapLoader(ImageTxt:StringImage_xImage_y ) {
    var 
loader:Loader = new Loader();
    var 
urlReq:URLRequest = new URLRequest("images/category/"+ImageTxt);
    
loader.load(urlReq);
    
loader.x=  Image_x;
    
loader.y=  Image_y+20;
    
addChild(loader);
    var 
container:Sprite = new Sprite();
    
addChild(container);
    var 
rect:MovieClip = new MovieClip();//changed rect to a movieclip so I can dynamically add a user defined String that will hold ImgTxt
    
rect.imgTxt=ImageTxt;//attach the string to the movieclip
    
rect.graphics.lineStyle(0);
    
rect.graphics.beginFill(0xFF0000);
    
rect.graphics.drawRect(Image_xImage_y+2010075);
    
rect.graphics.endFill();
    
container.addChild(rect);
    
rect.addEventListener("click"onClick); // THIS CALLS THE FUNCTION CALLED onClick
    
rect.buttonMode true;
    
rect.addChild(loader);
    
rect.filters = [ new DropShadowFilter() ];
}

private function 
onClick(event:MouseEvent):void {
    
//event.currentTarget==the MovieClip(rect) that is clicked on
    
    //then access that dynamically created variable call imgTxt I created in the BitmapLoader function
    
trace(event.currentTarget.imgTxt);