Kollision 2er Kreise

Danke! Folgendes ist jetzt entstanden: :D
PHP:
if(hitCircles(mcs["mc"+i], mcs["mc"+j])){
    //s = speed; w = Winkel
    var s1:Number = Math.sqrt(mcs["speedx"+i]*mcs["speedy"+i]);
    var s2:Number = Math.sqrt(mcs["speedx"+j]*mcs["speedy"+j]);
    var w1:Number = Math.acos(mcs["speedx"+i]/s1);
    var w2:Number = Math.acos(mcs["speedx"+j]/s2);
    var wg:Number = Math.acos(Math.sqrt((mcs["mc"+i].x-mcs["mc"+j].x)*(mcs["mc"+i].y-mcs["mc"+j].y)));
    var w1_n:Number = w1+Math.PI-(2*(wg-w1));
    var w2_n:Number = w2+Math.PI-(2*(wg-w2));
    mcs["speedx"+i] = Math.cos(w1_n)*s1;
    mcs["speedy"+i] = Math.sin(w1_n)*s1;
    mcs["speedx"+j] = Math.cos(w2_n)*s2;
    mcs["speedy"+j] = Math.sin(w2_n)*s2;
    trace(s1+"\n"+s2+"\n"+w1+"\n"+w2+"\n"+wg+"\n"+w1_n+"\n"+w2_n+"\n"+"\n");
}
Aber die Ausgabe ist das hier:
NaN
3.0314983613633286
NaN
NaN
NaN
NaN
NaN


NaN
NaN
NaN
NaN
1.5707963267948966
NaN
NaN


2.133266996772214
NaN
NaN
NaN
NaN
NaN
NaN


NaN
NaN
NaN
NaN
1.5707963267948966
NaN
NaN


NaN
NaN
NaN
NaN
1.5707963267948966
NaN
NaN


NaN
NaN
NaN
NaN
1.5707963267948966
NaN
NaN
Und sobald sich zwei Kreise berühren, sind sie weg... :D ... :(
 
Ok, danke! :)
Ich habe jetzt folgenden Code, NaN kommt nicht mehr raus. :D
PHP:
 var s1:Number = Math.sqrt((mcs["speedx"+i]*mcs["speedx"+i])+(mcs["speedy"+i]*mcs["speedy"+i]));
var s2:Number = Math.sqrt((mcs["speedx"+j]*mcs["speedx"+j])+(mcs["speedy"+j]*mcs["speedy"+j]));
var w1:Number = Math.acos(Math.abs(mcs["speedx"+i])/s1);
var w2:Number = Math.acos(Math.abs(mcs["speedx"+j])/s2);
var dx:Number = mcs["mc"+i].x-mcs["mc"+j].x;
var dy:Number = mcs["mc"+i].y-mcs["mc"+j].y;
var wg:Number = Math.acos(dx/Math.sqrt((dx*dx)+(dy*dy)))+Math.PI/2;
var w1_n:Number = w1-Math.PI-(2*(w1-wg));
var w2_n:Number = w2-Math.PI-(2*(w2-wg));
mcs["speedx"+i] = Math.cos(w1_n)*s1;
mcs["speedy"+i] = Math.sin(w1_n)*s1;
mcs["speedx"+j] = Math.cos(w2_n)*s2;
mcs["speedy"+j] = Math.sin(w2_n)*s2;
 trace("Speed1: "+s1+"\n"+"Speed2: "+s2+"\n"+"Winkel: "+w1+"\n"+"Winkel2: "+w2+"\n"+"Winkelg: "+wg+"\n"+"Winkel1n: "+w1_n+"\n"+"Winkel2n: "+w2_n+"\n"+"\n");
trace(((mcs["speedx"+i]*mcs["speedx"+i]) + (mcs["speedy"+i]*mcs["speedy"+i]))-s1);
 
Erst werden die beiden Hypotenusenlängen (Geschwindigkeit) festgestellt mit Pythagoras, dann die Winkel mit der x-Geschwindigkeit in Relation zur Hypotenusenlänge, dann noch Delta-X und Delta-Y.
Jetzt kommt die Berechnung des Lotes, dazu nehme ich Delta-X in Relation zur Hypotenusenlänge von Delta-X / -Y und addiere 90°.
Die neuen Winkel berechne ich dann wie hier.

Stimmt das so?
Jedenfalls funktioniert es nicht...
 
Auf dieser Seite gibt es eine Menge Java-Code und ich bin dabei, das auf Flash zu übertragen, ich schaffe es aber nicht.
Ich poste ihn und meinen Flash-Code hier mal (AS3).

Vektor.java:
Java:
class Vektor
{

    double x;
    double y;

    public void move(double x, double y)
    {
        this.x = x;
        this.y = y;
    }

    public void move(String s)
    {
        x = Double.valueOf(s.substring(s.indexOf('(') + 1, s.indexOf(','))).doubleValue();
        y = Double.valueOf(s.substring(s.indexOf(',') + 1, s.indexOf(')'))).doubleValue();
    }

    public Vektor(double x, double y)
    {
        this.x = x;
        this.y = y;
    }

    public double Betrag()
    {
        return Math.sqrt(x * x + y * y);
    }
}
Kugel.java:
Java:
class Kugel
{

    static final int d = 30;
    Vektor pos;
    double m;
    Vektor v;

    public Kugel()
    {
        m = 10D;
        v = new Vektor(0.0D, 0.0D);
        pos = new Vektor(0.0D, 0.0D);
    }
}
Stoss.java:
Java:
import java.applet.Applet;
import java.awt.*;

public class Stoss extends Applet
    implements Runnable
{

    Thread timer;
    Kugel k[];
    Kugel temp;
    Panel p1;
    Panel p2;
    Panel p3;
    Panel p4;
    Panel p5;
    Panel panels[];
    Button Btn1;
    Button Btn2;
    Button Btn3;
    TextField v[];
    TextField m[];
    Checkbox Spur;
    Checkbox Vektoren;
    Vektor possave[];
    Vektor vsave[];
    double msave[];
    Point P[][];
    Image Bild;
    Graphics G;

    public static boolean inside(double x, double y, Vektor a, Vektor b)
    {
        return x >= a.x && y >= a.y && x <= b.x && y <= b.y;
    }

    public void start()
    {
        if(timer == null)
        {
            timer = new Thread(this);
            timer.start();
        }
    }

    public void stop()
    {
        if(timer != null)
        {
            timer.stop();
            timer = null;
        }
    }

    public boolean keyUp(Event evt, int key)
    {
        if(evt.modifiers != 2)
        {
            temp = null;
        }
        return true;
    }

    void Drehen(Vektor a, Vektor b)
    {
        double btg = b.Betrag();
        a.move((-a.x * b.x) / btg + (a.y * b.y) / btg, (-a.x * b.y) / btg - (a.y * b.x) / btg);
    }

    void zerlege(Vektor v, Vektor d, Vektor vn, Vektor vt)
    {
        vn.move(Norm(d).x, Norm(d).y);
        mult(vn, (v.x * d.x + v.y * d.y) / d.Betrag());
        vt.move(v.x - vn.x, v.y - vn.y);
    }

    public String abschneiden(String s, int biswo)
    {
        try
        {
            return s.substring(0, biswo);
        }
        catch(StringIndexOutOfBoundsException ex)
        {
            return s;
        }
    }

    public Stoss()
    {
        k = new Kugel[2];
        p1 = new Panel();
        p2 = new Panel();
        p3 = new Panel();
        p4 = new Panel();
        p5 = new Panel();
        panels = new Panel[2];
        Btn1 = new Button("Stop");
        Btn2 = new Button("Neu");
        Btn3 = new Button("Reset");
        v = new TextField[2];
        m = new TextField[2];
        Spur = new Checkbox("Spur");
        Vektoren = new Checkbox("Vektoren");
        possave = new Vektor[2];
        vsave = new Vektor[2];
        msave = new double[2];
        P = new Point[2][2];
    }

    void subtra(Vektor vn, Vektor vt, Vektor v)
    {
        v.move(vn.x - vt.x, vn.y - vt.y);
    }

    public boolean mouseDown(Event evt, int x, int y)
    {
        int i = 0;
        do
        {
            Vektor a = new Vektor(k[i].pos.x, k[i].pos.y);
            Vektor b = new Vektor(k[i].pos.x + 50D, k[i].pos.y + 50D);
            if(evt.modifiers != 2 && inside(x, y, a, b))
            {
                temp = k[i];
            }
            a.move((k[i].pos.x + 25D + k[i].v.x * 20D) - 10D, (k[i].pos.y + 25D + k[i].v.x * 20D) - 10D);
            b.move(k[i].pos.x + 25D + k[i].v.x * 20D + 10D, k[i].pos.y + 25D + k[i].v.x * 20D + 10D);
            if(evt.modifiers == 2 && inside(x, y, a, b))
            {
                temp = k[i];
            }
        } while(++i < 2);
        return true;
    }

    void aktualisieren()
    {
        int i = 0;
        do
        {
            String vx = new String(String.valueOf(k[i].v.x));
            String vy = new String(String.valueOf(k[i].v.y));
            String M = new String(String.valueOf(k[i].m));
            vx = abschneiden(vx, 5);
            vy = abschneiden(vy, 5);
            M = abschneiden(M, 5);
            v[i].setText("v = (" + vx + ", " + vy + ")");
            m[i].setText("m = " + M);
        } while(++i < 2);
    }

    void addieren(Vektor vn, Vektor vt, Vektor v)
    {
        v.move(vn.x + vt.x, vn.y + vt.y);
    }

    public boolean mouseDrag(Event evt, int x, int y)
    {
        if(evt.modifiers != 2 && temp != null)
        {
            temp.pos.move(x - 25, y - 25);
            saveEingaben();
            setSpur();
            repaint();
        }
        if(evt.modifiers == 2)
        {
            temp.v.move(-((temp.pos.x + 25D) - (double)x) / 20D, -((temp.pos.y + 25D) - (double)y) / 20D);
            saveEingaben();
            aktualisieren();
            setSpur();
            repaint();
        }
        return true;
    }

    public void setSpur()
    {
        int i = 0;
        do
        {
            int j = 0;
            do
            {
                P[i][j] = null;
            } while(++j < 2);
        } while(++i < 2);
        P[0][0] = new Point((int)k[0].pos.x + 25, (int)k[0].pos.y + 25);
        P[1][0] = new Point((int)k[1].pos.x + 25, (int)k[1].pos.y + 25);
    }

    Vektor Norm(Vektor d)
    {
        return new Vektor(d.x / d.Betrag(), d.y / d.Betrag());
    }

    public boolean mouseUp(Event evt, int x, int y)
    {
        temp = null;
        return true;
    }

    void saveEingaben()
    {
        int i = 0;
        do
        {
            msave[i] = k[i].m;
            if(vsave[i] == null)
            {
                vsave[i] = new Vektor(k[i].v.x, k[i].v.y);
            } else
            {
                vsave[i].move(k[i].v.x, k[i].v.y);
            }
            if(possave[i] == null)
            {
                possave[i] = new Vektor(k[i].pos.x, k[i].pos.y);
            } else
            {
                possave[i].move(k[i].pos.x, k[i].pos.y);
            }
        } while(++i < 2);
    }

    public synchronized void run()
    {
        do
        {
            try
            {
                int i = 0;
                do
                {
                    k[i].pos.move(k[i].pos.x + k[i].v.x, k[i].pos.y + k[i].v.y);
                } while(++i < 2);
                Vektor d = new Vektor(k[0].pos.x - k[1].pos.x, k[0].pos.y - k[1].pos.y);
                if(d.Betrag() <= 50D)
                {
                    Vektor vn[] = new Vektor[2];
                    Vektor vt[] = new Vektor[2];
                    i = 0;
                    do
                    {
                        P[i][1] = new Point((int)k[i].pos.x + 25, (int)k[i].pos.y + 25);
                        vn[i] = new Vektor(0.0D, 0.0D);
                        vt[i] = new Vektor(0.0D, 0.0D);
                        zerlege(k[i].v, d, vn[i], vt[i]);
                    } while(++i < 2);
                    Vektor vs = new Vektor(k[0].m * vn[0].x + k[1].m * vn[1].x, k[0].m * vn[0].y + k[1].m * vn[1].y);
                    mult(vs, 2D / (k[0].m + k[1].m));
                    i = 0;
                    do
                    {
                        subtra(vs, vn[i], vn[i]);
                    } while(++i < 2);
                    i = 0;
                    do
                    {
                        addieren(vn[i], vt[i], k[i].v);
                    } while(++i < 2);
                    aktualisieren();
                }
                repaint();
                Thread.sleep(2L);
            }
            catch(InterruptedException e)
            {
                stop();
            }
        } while(true);
    }

    public boolean action(Event evt, Object was)
    {
        if(evt.target == Btn1)
        {
            if(timer == null)
            {
                Btn1.setLabel("Stop");
                start();
            } else
            {
                Btn1.setLabel("Start");
                stop();
            }
            aktualisieren();
        }
        if(evt.target == Btn2)
        {
            k[0].pos.move(size().width - 50 - 50, size().height / 2 - 50);
            k[1].pos.move(50D, size().height / 2 - 50);
            setSpur();
            repaint();
        }
        if(evt.target == Btn3)
        {
            int i = 0;
            do
            {
                k[i].v.move(vsave[i].x, vsave[i].y);
                k[i].m = msave[i];
                k[i].pos.move(possave[i].x, possave[i].y);
            } while(++i < 2);
            setSpur();
            repaint();
            aktualisieren();
        }
        if(evt.target instanceof TextField)
        {
            int i = 0;
            do
            {
                k[i].v.move(v[i].getText());
                String Zahl = m[i].getText().substring(m[i].getText().indexOf('=') + 1);
                k[i].m = Double.valueOf(Zahl).doubleValue();
                saveEingaben();
            } while(++i < 2);
            setSpur();
            aktualisieren();
            repaint();
        }
        if(evt.target instanceof Checkbox)
        {
            repaint();
        }
        return true;
    }

    public void init()
    {
        resize(500, 350);
        int i = 0;
        do
        {
            k[i] = new Kugel();
            v[i] = new TextField("", 15);
            m[i] = new TextField("", 7);
            panels[i] = new Panel();
            panels[i].setForeground(i != 0 ? Color.red : Color.blue);
            panels[i].add(v[i]);
            panels[i].add(m[i]);
        } while(++i < 2);
        aktualisieren();
        k[0].pos.move(size().width - 50 - 50, size().height / 2 - 50);
        k[1].pos.move(50D, size().height / 2 - 50);
        setSpur();
        p2.setLayout(new GridLayout(2, 1));
        p2.add(panels[0]);
        p2.add(panels[1]);
        p3.setLayout(new GridLayout(2, 1));
        p1.add(p2);
        p4.add(Btn1);
        p4.add(Btn2);
        p4.add(Btn3);
        p5.add(Spur);
        p5.add(Vektoren);
        p3.add(p4);
        p3.add(p5);
        p1.add(p3);
        setLayout(new BorderLayout());
        add("South", p1);
        saveEingaben();
        Bild = createImage(size().width, size().height);
        G = Bild.getGraphics();
    }

    public void paint(Graphics g)
    {
        G.setColor(Color.yellow);
        G.fillRect(0, 0, size().width, size().height);
        G.setColor(Color.blue);
        G.fillOval((int)k[0].pos.x, (int)k[0].pos.y, 50, 50);
        G.setColor(Color.red);
        G.fillOval((int)k[1].pos.x, (int)k[1].pos.y, 50, 50);
        G.setColor(Color.black);
        G.drawString("by R. Greim", size().width - 70, size().height - p2.size().height - 15);
        double Ekin = (k[0].m * k[0].v.Betrag() * k[0].v.Betrag() + k[1].m * k[1].v.Betrag() * k[1].v.Betrag()) / 2D;
        String E = String.valueOf(Ekin);
        E = abschneiden(E, 5);
        String px = new String(String.valueOf(k[0].v.x * k[0].m + k[1].v.x * k[1].m));
        String py = new String(String.valueOf(k[0].v.y * k[0].m + k[1].v.y * k[1].m));
        px = abschneiden(px, 5);
        py = abschneiden(py, 5);
        String s = new String("E = " + E + "     p = (" + px + ", " + py + ")");
        G.drawString(s, 10, size().height - p2.size().height - 15);
        int i = 0;
        do
        {
            G.setColor(i != 0 ? Color.red : Color.blue);
            if(Spur.getState())
            {
                if(P[i][1] != null)
                {
                    G.drawLine(P[i][0].x, P[i][0].y, P[i][1].x, P[i][1].y);
                    G.drawLine(P[i][1].x, P[i][1].y, (int)k[i].pos.x + 25, (int)k[i].pos.y + 25);
                } else
                {
                    G.drawLine(P[i][0].x, P[i][0].y, (int)k[i].pos.x + 25, (int)k[i].pos.y + 25);
                }
            }
            if(Vektoren.getState())
            {
                G.setColor(Color.black);
                Vektor a = new Vektor(k[i].pos.x + 25D, k[i].pos.y + 25D);
                Vektor b = new Vektor(a.x + 20D * k[i].v.x, a.y + 20D * k[i].v.y);
                G.drawLine((int)a.x, (int)a.y, (int)b.x, (int)b.y);
                Vektor d = new Vektor(b.x - a.x, b.y - a.y);
                if(d.Betrag() != 0.0D)
                {
                    Vektor Spitze1 = new Vektor(4D + 0.050000000000000003D * d.Betrag(), 2D + 0.025000000000000001D * d.Betrag());
                    Vektor Spitze2 = new Vektor(4D + 0.050000000000000003D * d.Betrag(), -(2D + 0.025000000000000001D * d.Betrag()));
                    Drehen(Spitze1, d);
                    Drehen(Spitze2, d);
                    G.drawLine((int)b.x, (int)b.y, (int)(b.x + Spitze1.x), (int)(b.y + Spitze1.y));
                    G.drawLine((int)b.x, (int)b.y, (int)(b.x + Spitze2.x), (int)(b.y + Spitze2.y));
                }
            }
        } while(++i < 2);
        g.drawImage(Bild, 0, 0, this);
    }

    public void update(Graphics g)
    {
        paint(g);
    }

    void mult(Vektor a, double Skal)
    {
        a.move(a.x * Skal, a.y * Skal);
    }
}
 
Und mein Flash-Code:

Vektor.as:
PHP:
package{
    public class Vektor
    {
    
        public var X:Number = 0;
        public var Y:Number = 0;
    
        public function Vektor(X:Number, Y:Number)
        {
            this.X = X;
            this.Y = Y;
        }
    
        public function move(X:Number, Y:Number)
        {
            this.X = X;
            this.Y = Y;
        }
    
        public function Betrag()
        {
            return Math.sqrt(X * X + Y * Y);
        }
    }
}
Kugel.as:
PHP:
package{
    public class Kugel
    {
    
        public var d:Number;
        public var pos:Vektor;
        public var m:Number;
        public var v:Vektor;
    
        public function Kugel()
        {
            pos = new Vektor(0.0, 0.0);
            v = new Vektor(1.0, 1.0)
            m = 10;
            d = 50;
        }
    }
}
Code der Timeline:
PHP:
stop();
var anz:Number=2;
////////////////////////////////
var mcs:Object = new Object();
mcs["mc0"] = mc1;
mcs["mc1"] = mc2;


function inside(X:Number, Y:Number, a:Vektor, b:Vektor):Boolean
{
    return X >= a.X && Y >= a.Y && X <= b.X && Y <= b.Y;
}
function Drehen(a:Vektor, b:Vektor)
{
    var btg:Number = b.Betrag();
    a.move((-a.X * b.X) / btg + (a.Y * b.Y) / btg, (-a.X * b.Y) / btg - (a.Y * b.X) / btg);
}
function zerlege(v:Vektor, d:Vektor, vn:Vektor, vt:Vektor)
{
    vn.move(Norm(d).X, Norm(d).Y);
    mult(vn, (v.X * d.X + v.Y * d.Y) / d.Betrag());
    vt.move(v.X - vn.X, v.Y - vn.Y);
}
function abschneiden(s:String, biswo:Number):String
{
    try
    {
        var str:String = s.substr(0, biswo);
        trace("abschneiden("+s+", "+biswo+") = "+str);
        return str;
    }
    catch(ex:Error)
    {
        trace(ex.name+": ..."+ex.message);
        return s;
    }
    return s;
}
var i:Number = 0;
var k:Array = new Array(new Kugel(), new Kugel());
for(i = 0; i<anz; i++){
    //k[i] = new Kugel();
    k[i].v = new Vektor(1.0, 1.0);
    //k[i].v.X = k[i].v.Y = 0.0;
}
k[0].pos = new Vektor(100.0, 150.0);
var possave:Array = new Array(anz);
for(i = 0; i<anz; i++){
    possave[i] = new Vektor(i/anz, i/(anz+1));
}
var vsave:Array = new Array(anz);
for(i = 0; i<anz; i++){
    vsave[i] = new Vektor(i/anz, i/(anz+1));
}
var msave:Array = new Array(anz);
for(i = 0; i<anz; i++){
    msave[i] = 0;
}
var P:Array = new Array(anz);
for(i = 0; i<anz; i++){
    P[i] = new Array(new Point(), new Point());
}
function subtra(vn:Vektor, vt:Vektor, v:Vektor)
{
    v.move(vn.X - vt.X, vn.Y - vt.Y);
}
function aktualisieren()
{
    var i:Number = 0;
    do
    {
        trace("aktualisieren!\t"+((""+k[i].v.X) == "NaN")+((""+k[i].v.Y) == "NaN"));
        if(((""+k[i].v.X) == "NaN")||((""+k[i].v.Y) == "NaN")){
            k[i].v.X = 2;
            k[i].v.Y = 3;
        }
        trace("k[i].v.X: "+k[i].v.X);
        trace("k[i].v.Y: "+k[i].v.Y);
        var vx:String = ""+k[i].v.X;
        var vy:String = ""+k[i].v.Y;
        var M:String = ""+k[i].m;
        vx = abschneiden(vx, 5);
        vy = abschneiden(vy, 5);
        M = abschneiden(M, 5);
        trace("v = (" + vx + ", " + vy + ")");
        trace("m = " + M);
    } while(++i < anz);
}
function addieren(vn:Vektor, vt:Vektor, v:Vektor)
{
    v.move(vn.X + vt.Y, vn.Y + vt.X);
}
function saveEingaben(){
    var i:Number = 0;
    do
    {
        msave[i] = k[i].m;
        if(vsave[i] == null)
        {
            vsave[i] = new Vektor(1.0, 1.0);//new Vektor(k[i].v.X, k[i].v.Y);
        } else
        {
            vsave[i].move(1.0, 1.0);//k[i].v.X, k[i].v.Y);
        }
        if(possave[i] == null)
        {
            possave[i] = new Vektor(0.0, 0.0);//k[i].pos.X, k[i].pos.Y);
        } else
        {
            possave[i].move(0.0, 0.0);//k[i].pos.X, k[i].pos.Y);
        }
    } while(++i < anz);
}
function Norm(d:Vektor):Vektor
{
    return new Vektor(d.X / d.Betrag(), d.Y / d.Betrag());
}
function mult(a:Vektor, Skal:Number)
{
    a.move(a.X * Skal, a.Y * Skal);
}
//
function loop(event:Event) {
    i = 0;
    do
    {
        k[i].pos.move(k[i].pos.X + k[i].v.X, k[i].pos.Y + k[i].v.Y);
    } while(++i < anz);
    trace("do-while");
    var d:Vektor = new Vektor(k[0].pos.X - k[1].pos.X, k[0].pos.Y - k[1].pos.Y);
    trace("Vektor");
    if(d.Betrag() <= 50)
    {
        var vn:Array = new Array(anz);
        var vt:Array = new Array(anz);
        i = 0;
        do
        {
            P[i][1] = new Point(k[i].pos.X + 25, k[i].pos.Y + 25);
            vn[i] = new Vektor(0.0, 0.0);
            vt[i] = new Vektor(0.0, 0.0);
            zerlege(k[i].v, d, vn[i], vt[i]);
        } while(++i < anz);
        var vs:Vektor = new Vektor(k[0].m * vn[0].X + k[1].m * vn[1].X, k[0].m * vn[0].Y + k[1].m * vn[1].Y);
        mult(vs, 2 / (k[0].m + k[1].m));
        i = 0;
        do
        {
            subtra(vs, vn[i], vn[i]);
        } while(++i < anz);
        i = 0;
        do
        {
            addieren(vn[i], vt[i], k[i].v);
        } while(++i < anz);
        aktualisieren();
    }
    i = 0;
    trace("big-if");
    do{
        trace(i);
        trace(mcs["mc"+i]);
        trace(mcs["mc"+i].x);
        trace(k[i]);
        trace(k[i].v);
        trace(k[i].v.X);
        mcs["mc"+i].x = P[i][1].x;
        trace("x");
        mcs["mc"+i].y = P[i][1].y;
        trace("y");
        trace(mcs["mc"+i].x+"\t"+mcs["mc"+i].y+"\nFinished N°"+i+"!");
    }while(++i < anz);
}
saveEingaben();
addEventListener(Event.ENTER_FRAME, loop);
 
Ich hab es jetzt geschafft, im Anhang liegt eine Datei, bei der 6 "Seifenblasen" über den Bildschirm fahren, die "Gravitation" fährt im Kreis um den Bildschirm herum, damit die Kreise nicht zum Stehen kommen. (Das Ganze soll mal ein Bildschirmschoner werden...)
 

Anhänge

Zurück