I think you’re going to need to define the main timeline in the function, but then again, I don’t see any reason to use that instead of a this, it’s more that trible the length
First you should use _global whenever accesing that global variable.
And the ball will move but will move only once since the function is called only one time.
I’d recommend using dynamic event handlers so you can erase it whenver it is not needed anymore.
Something like:
_global.mainTimeline = this;
function moveBall() {
_global.mainTimeline.ball._x += 10;
_global.mainTimeline.ball._y += 10;
}
onEnterFrame = moveBall;//will execute the function at the frame rate of the movie