Determine the x and y value of an object on the stage

i have a class called “Ball” that extends “AllSprites” which is a class that extends “Sprite”. there is an addChild within the “Ball” class that adds a Sprite to the stage. when i run it like this, it successfully adds the object to the stage.

in my Main class i have

var ballOne:Ball = new Ball();

i am trying to get the x and y value of ballOne from within my Main class but if i try to do

trace(ballOne.x);

i get an error:

1119: Access of possibly undefined property x through a reference with static type Ball.

how do i tell my code that the ballOne is a Sprite so i can get the x and y values?

also not working:

trace(Sprite(ballOne.x));