 # Problem with intervals

What i wish to do is tht: flash takes coordinates from .php file and adds them to a mc_object, and updates coordinates after period of time.
I got it work but very buggy. I want flash to take new coordinate after every 1 second(or so), instead of doing tht, flash gives me 100 new coordinates in a second. Changing the interval doesn’t make big change.

Have a look at your self:
http://www.zone.ee/avp2estclan/texttest5.swf

Here’s the source code:

//function for global (not to look)
ball.onEnterFrame = function () {
function coordinate(a, b, c) {
return ((a-b)/c);
}

//sets variable arv equal to 0
arv = 0

// function update starts for script looping (problem starts)
function update() {
// sets coordinates right for _global stuff…(not to look)
ax1 = coordinate(bx1, 370000, 496);
ay1 = coordinate(by1, 6376000, 488);
//adds +1 on every loop to variable arv
arv = arv + 1;
// joins the string “x” and “y” with number arv
bx1 = eval(“x”+arv);
by1 = eval(“y”+arv);
// check up
trace (ax1);
trace (ay1);
//sets ball coordinates equal to the coordinate got from .php file
setProperty(ball, _x, ax1 );
setProperty(ball, _y, ay1 );
}
// sets the update interval(problem ends(not realy, bec it doesn’t work as needed))
interval = setInterval(update, 250);
}[/AS]

The .php file source:

``````&&x1=590081&&y1=6526734&&x2=543431&&y2=6583217&&x3=563168&&y3=6501676&&x4=634040&&y4=654914
``````

And the source file:
http://www.zone.ee/avp2estclan/test.rar

I appriciate any help i can get.