sorry, brauche wieder hilfe…
funktioniert alles soweit, nur wenn ich mit der enter taste es abbrechen möchte, sagt er mir, die drawstage funktion “does not exist”. in Deinem code läufts aber. ich hänge mal den code an.
danke nochmal!
lukasz
import ddf.minim.signals.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
Minim minim;
AudioPlayer sound;
float xpos;
float ypos;
float xZiel;
float yZiel;
float durchmesser = 100;
void setup () {
size(900, 600, P3D);
background(0);
lights();
smooth();
minim = new Minim(this);
sound = minim.loadFile(“sound.mp3″);
xpos = 10;
ypos = 10;
xZiel = width / -1;
yZiel = height / -1;
drawStage();
}
}
void drawStage(){
void keyReleased()
{
if (key == ‘1′) {
sound.rewind();
sound.play();
}
}
void stop()
{
sound.close();
minim.stop();
}
void draw () {
// einfärben des Balles
fill (random (255), random (255), random (255));
noStroke();
// Bewegung des Balles
xpos = xpos + (xZiel – xpos) / 70;
ypos = ypos + (yZiel – ypos) / 70;
ellipse (xpos, ypos, durchmesser, durchmesser);
}
void keyPressed(){
/*
Legt neue Endkoordination für die Animation fest
*/
if(key == ‘2′){
xZiel = 350;
yZiel = 400;
}
if (key == ‘3′) {
xZiel = 650;
yZiel = 100;
}
if (key == ‘4′) {
xZiel = width;
yZiel = height;
}
/*
ENDE
*/
// Reset bei ENTER der StageFlockingFlocking
if(keyCode == ENTER){
}
}
//mausinteraktion
//Quader
fill(0);
stroke(255);
pushMatrix();
translate(80, height/8, 0);
rotateY(0);
rotateX(0);
box(100);
popMatrix();
fill(0);
stroke(255);
pushMatrix();
translate(350, height/1.5, 0);
rotateY(0.5);
rotateX(0);
box(100);
popMatrix();
fill(0);
stroke(255);
pushMatrix();
translate(650, height/5, 0);
rotateY(0.9);
rotateX(1.0);
box(100);
popMatrix();
fill(0);
stroke(255);
pushMatrix();
translate(850, height/1.1, 0);
rotateY(0.2);
rotateX(3.0);
box(100);
popMatrix();
}

