Make your variable "ballspeedx" a public variable in "ball" class. When you create its object in main class, you can access its public variables. You can also change this. You can add getter and setter functions in "ball" class to change/access the variable value if its private.
Ball.as:
public var ballspeedx:int = 10;
Main.as:
var ball:Ball = new Ball();
trace(ball.ballspeedx);
ball.ballspeedx = 20;
trace(ball.ballspeedx);