Objekte mit ActionScript bewegen [Flash 8 / AS 2]

Wizard1200

Grünschnabel
Ich würde gerne den erzeugten Kreis von links nach rechts wandern lassen und die Linie eine 360 Grad Drehung durchführen lassen, aber irgendwie springen die beiden Objekte immer nur hin und her:

Code:
this.createEmptyMovieClip("kreis_mc", 10);
kreis_mc._x = 100;
kreis_mc._y = 100;

function Kreis_zeichnen(Ziel:MovieClip, Radius:Number, Staerke:Number, Farbe:Number, Alpha:Number):Void {
    var x:Number = Radius;
    var y:Number = Radius;
    with (Ziel) {
        kreis_mc.lineStyle(Staerke, Farbe, Alpha); 
        moveTo(x + Radius, y);
        curveTo(Radius + x, Math.tan(Math.PI / 8) * Radius + y, Math.sin(Math.PI / 4) * Radius + x, Math.sin(Math.PI / 4) * Radius + y);
        curveTo(Math.tan(Math.PI / 8) * Radius + x, Radius + y, x, Radius + y);
        curveTo(-Math.tan(Math.PI / 8) * Radius + x, Radius+ y, -Math.sin(Math.PI / 4) * Radius + x, Math.sin(Math.PI / 4) * Radius + y);
        curveTo(-Radius + x, Math.tan(Math.PI / 8) * Radius + y, -Radius + x, y);
        curveTo(-Radius + x, -Math.tan(Math.PI / 8) * Radius + y, -Math.sin(Math.PI / 4) * Radius + x, -Math.sin(Math.PI / 4) * Radius + y);
        curveTo(-Math.tan(Math.PI / 8) * Radius + x, -Radius + y, x, -Radius + y);
        curveTo(Math.tan(Math.PI / 8) * Radius + x, -Radius + y, Math.sin(Math.PI / 4) * Radius + x, -Math.sin(Math.PI / 4) * Radius + y);
        curveTo(Radius + x, -Math.tan(Math.PI / 8) * Radius + y, Radius + x, y);
    }
}

this.createEmptyMovieClip("linie_mc", 9);
linie_mc._x = 100;
linie_mc._y = 100;

function Linie_zeichnen(Ziel:MovieClip, Staerke:Number, Farbe:Number, Alpha:Number):Void {
        with (Ziel) {
        linie_mc.lineStyle(Staerke, Farbe, Alpha); 
        linie_mc.moveTo(100, 100);
		linie_mc.lineTo(200, 200);
    }
}

import mx.transitions.Tween;
import mx.transitions.easing.*;

var Tween1:Tween = new Tween (kreis_mc,"_x",None.easeInOut,100,5000,3,true);

var Tween2:Tween = new Tween (linie_mc, "_rotation", None.easeInOut, 0, 360, 3, true); 

if (Start.selected == true) {
		Kreis_zeichnen(kreis_mc, 100, 5, 0x99FF00, 100);
		Linie_zeichnen(linie_mc, 3, 0x000000, 100);
		Tween1.onMotionFinished = function (){
			this.continueTo(5000, 3);
			}
		Tween2.onMotionFinished = function (){
			this.fforward()
			}
}
 
Zurück