zeman
02-08-2005, 12:59 AM
Has anyone had problems with curveTo rendering errors?
Take a look at the map I'm developing.
photoblog world map (http://www.allthegoodness.com/scarytan/)
If you keep zooming further and further into Europe you'll start to see random lines appear and disappear.
The line is redrawn with every zoom and I've double checked to make sure the location points aren't moving. In fact the lines between locations are drawn correctly, there just seem to be extra random lines appearing the further you zoom in.
I've tried switching to lineTo and get the same problem.
Any thoughts or code to try out would be very appreciated.
Here's the line drawing code I'm using.
with (_root.path) {
lineStyle (0, 0x666666, 60);
imageX = point.x + imageX;
imageY = point.y + imageY;
if (_root.pathstartX < imageX) {
thispathcurveX = _root.pathstartX + ((imageX - _root.pathstartX) / 2);
} else {
thispathcurveX = imageX + ((_root.pathstartX - imageX) / 2);
}
if (_root.pathstartY < imageY) {
thispathcurveY = _root.pathstartY;
} else {
thispathcurveY = imageY;
}
// draw curve
curveTo(thispathcurveX, thispathcurveY, imageX, imageY);
}
// set next pathstart var
_root.pathstartX = imageX;
_root.pathstartY = imageY;
Take a look at the map I'm developing.
photoblog world map (http://www.allthegoodness.com/scarytan/)
If you keep zooming further and further into Europe you'll start to see random lines appear and disappear.
The line is redrawn with every zoom and I've double checked to make sure the location points aren't moving. In fact the lines between locations are drawn correctly, there just seem to be extra random lines appearing the further you zoom in.
I've tried switching to lineTo and get the same problem.
Any thoughts or code to try out would be very appreciated.
Here's the line drawing code I'm using.
with (_root.path) {
lineStyle (0, 0x666666, 60);
imageX = point.x + imageX;
imageY = point.y + imageY;
if (_root.pathstartX < imageX) {
thispathcurveX = _root.pathstartX + ((imageX - _root.pathstartX) / 2);
} else {
thispathcurveX = imageX + ((_root.pathstartX - imageX) / 2);
}
if (_root.pathstartY < imageY) {
thispathcurveY = _root.pathstartY;
} else {
thispathcurveY = imageY;
}
// draw curve
curveTo(thispathcurveX, thispathcurveY, imageX, imageY);
}
// set next pathstart var
_root.pathstartX = imageX;
_root.pathstartY = imageY;