Object ID

hey there. A small problem here.

i write:

object.id = 1;
**
trace(object.id);** //everything works fine
but
trace(getChildAt(1).id); //error (btw the object is for sure in position 1)
if i try
trace(DisplayObjectContainer(getChildAt(1)).id); //still error “Access of possibly undefined property through a reference with static type flash.display:DisplayObjectContainer”

Any ideas? thanks in advance