public void act(){
        if (map.getObjects (ChatBox.class) != null){
            if (show){
                if (bg.getTransparency() > 0){
                    trans -= 5;
                }
                else{
                    show = false;
                    trans = 0;
                    map.removeObject (this);
                }
                if (trans <= 255){
                    bg.setTransparency (trans);
                    refresh();}
            }
            //bg.fill();
            //this.setImage (bg);
        }    
    }