straal = 100;
draai = Math.PI;
cirkel = _root.createEmptyMovieClip("ronde", 1);
cirkel.lineStyle(30);
onEnterFrame = function () {
draai += 0.5/10;
x = preloadCentrum._x+Math.cos(draai)*straal;
y = preloadCentrum._y+Math.sin(draai)*straal;
ronde.lineTo(x, y);
};
ive tried
cirkel = _root.createEmptyMovieClip("ronde", 1,{_x:preloadCentrum._x, _y:preloadCentrum._y});
And
cirkel = _root.createEmptyMovieClip("ronde", 1);
circle._x=preloadCentrum._x;
circle._x=preloadCentrum._y;
but everything starts on left top…why ? :s
thx for reading (and maybe reply) 8-]
What do you expect to see?
What are the values of preloadCentrum._x and preloadCentrum._y?
:toad:
You need a moveTo command before the lineTo. moveTo sets the start point.
rad = 100;
draai = Math.PI;
cirkel = _root.createEmptyMovieClip("ronde", 1);
cirkel.lineStyle(30);
ronde.moveTo = preloadCentrum._x;
ronde.moveTo = preloadCentrum._y;
onEnterFrame = function () {
draai += 0.5/10;
x = preloadCentrum._x+Math.cos(draai)*rad;
y = preloadCentrum._y+Math.sin(draai)*rad;
ronde.lineTo(x, y);
};
tried this, but no luck.
what I expect ? a circle drawn though as.
thx for reading
btw, you can just copy paste the code, you dont need anything else but the code, if you do, you see what i mean…
W0ops, you need an empty mc with the instancename “preloadCentrum”
should be:
ronde.moveTo(preloadCentrum._x, preloadCentrum._y);
ah darn, thx, its not good yet, but it brings me a little further, now it the line starts to draw from the center from the circle while I like it to start at the edge from the “circle”
fast reply btw 
If the drawing position is at the centre of the circle, then all you need to do is add the radius to the current position (or in this case subtract since you start drawing at an angle of pi).
rad = 100;
draai = Math.PI;
cirkel = _root.createEmptyMovieClip("ronde", 1);
cirkel.lineStyle(30);
ronde.moveTo(preloadCentrum._x - rad, preloadCentrum._y);
onEnterFrame = function () {
draai += 0.5 / 10;
x = preloadCentrum._x + Math.cos(draai) * rad;
y = preloadCentrum._y + Math.sin(draai) * rad;
ronde.lineTo(x, y);
};
works fine now, thank you all !