[CS4] Movie clips racing on motion paths[AS2]

Hi all,

So I’m reaching the final stages of a very basic race manager game and I’ve got to what I assumed would be the most hastle free, easy peasy part to implement and I’ve hit a wall.

In the game you buy cars, upgrade them in your garage then you can go to races and stuff earning more chedder so you can fill your car with more useless things that make it go faster and win more races etc etc. It’s a very simple database game similar to titles like football manager.

http://img156.imageshack.us/i/exampledc.jpg/

Now ignoring the state of the art graphics above (which will be changed once i figure out how to get it working!) you can see what I’m trying to achieve.

Now this is where I’m falling down befor I started the project i assumed I could tie an mc in with a motion path then in action script just say move along the path at x speed. It would seem not. So I came up with a really cheap work around involving fps and getTimers.

stop();

var dynamicClock:Number;
var staticClock:Number;
var staticClockTwo:Number;
var updateInterval:Number = 1000/34;
var updateIntervalTwo:Number = 1000/17;
var randomInterval:Number;

var carOneUpdate:Number = 1;
var carTwoUpdate:Number = 1;

//randomInterVal = Math.floor(Math.random() * (30 -  24)) + 24;
//updateInterval = 1000/randomInterVal;
//randomInterValTwo = Math.floor(Math.random() * (30 -  24)) + 24;
//updateIntervalTwo = 1000/randomInterValTwo;

staticClock = getTimer();
staticClockTwo = getTimer();
dynamicClock = getTimer();

function onEnterFrame(){
    
    dynamicClock = getTimer();

    if(dynamicClock-staticClock>updateInterval){
            
            carOneUpdate++;
            trackOne.gotoAndStop(carOneUpdate);
        
        staticClock = getTimer();
    }
    if(dynamicClock-staticClockTwo>updateIntervalTwo){
            
            carTwoUpdate++;
            trackTwo.gotoAndStop(carTwoUpdate);
        
        staticClockTwo = getTimer();
    }
}

This sorta works but looks awful and doesn’t really work at all. I’m banging my head against a brick wall here and I’m really hoping you guys can help me come up with some solutions to getting a good look race working.

Thanks in advance.

Sigs.