A question on movieclips

Just a curious question on trying to understand why this happens.

setting a position of movieclip called red x and y position within a movieclip called background

background.redsquare.x = 300;
            background.redsquare.y = 300;

comes up with TypeError: Error #1010: A term is undefined and has no properties.

setting a position of movieclip called red x and y position withen a movieclip called background

redsquare.x = 300;
            redsquare.y = 300;

This works fine but how can that be when surely you must access the red withen the background rather then just accessing red?

Just wondering if anyone has a answer to this.