Minor problems need help fixing

ok. well Here is my code for this hittest. here is what i need help on. Where the puck hits the goal line, it only works when the puck hits where i defined the center point to be. Is this because I asked it to find the ._x and ._y of the rgl mc (right goal line). do i need to define the properties of the rgl before rgl._width = 10;
rgl._height = 90;

[AS]

    if (puck._x >= rgl._x &&
    Math.abs(puck._y - rgl._y) < rgl._width/2)
    {
                   }