Quick question


So I’m making a simple astronomy animation where mars is orbiting and leaving a trail behind it. When mars comes full circle, I want the trail to be erased and start over.

I have two questions:
What condition can I use to test to see if its the right time to restart the trail (the if _y<200 is just there for testing)
How can I restart the trail? Currently when I call makeTrail() a second time nothing happens.

var marsStart:Number = 0;
var marsSpeed:Number = 6;
var marsDistance:Number = 70 ;    // Distance from mars to point it rotates around (orbit); radius of rotation.

// Set up the mars trail.
function makeTrail() {

//create mars trail for the first time

//create marstrail during animation
mars.onEnterFrame = function()  {
    this._x = orbit._x + Math.cos(marsStart/180*Math.PI)*marsDistance;
    this._y = orbit._y + Math.sin(marsStart/180*Math.PI)*marsDistance;
    marsStart += marsSpeed;
    //Erase the mars trail 
    if (this._y < 200) {
        marsTrail = null;
// else{
//         marsTrail._alpha = 50;
// }

var orbitStart:Number = 0;
var orbitSpeed:Number = 1;
var orbitDistance:Number = 150;    // Distance form earth to center of mars orbit.

// Set up the orbit trail (the ring).

orbit.onEnterFrame = function()  {
    this._x = earth._x + Math.cos(orbitStart/180*Math.PI)*orbitDistance;
    this._y = earth._y + Math.sin(orbitStart/180*Math.PI)*orbitDistance;
    orbitStart += orbitSpeed;

//Move the mars orbit path
morbitpath.onEnterFrame = function ()  {
    this._x = orbit._x;
    this._y = orbit._y;

Thanks. This is the first actionscript I’ve ever done and I need all the help I can get.

ps there are already movieclips on the stage called mars, morbitpath, earth, orbit