Hi everyone! I have run into a problem with some code. The code is made so when the user presses A, S or D it will load one of three files assigned for each letter. However, when I press play it comes up with the error: "expecting RPAREN, found ';' syntax error, maybe a missing perenthesis?" for line 32.
does anyone know what the problem is here? Thanks :)
import processing.video.*;
String[] one = {
"ag1.mov", "ag2.mov", "ag3.mov", "am1.mov", "am2.mov", "am3.mov",
"tran1.mov", "tran2.mov", "tran3.mov"
};
Movie myMovie;
int a = 0;
float md = 0;
float mt = 0;
void setup()
{
size(400, 400, P2D);
}
void draw()
{
image(myMovie, 0, 0, width, height);
}
void keyPressed()
{
if (key == 'a' || key == 'A')
{
myMovie = new Movie(this, int(random(1, 3));
myMovie.play();
}
else if (key == 's' || key == 'S')
{
myMovie = new Movie(this, int(random(4, 6));
myMovie.play();
}
else if (key == 'd' || key == 'D')
{
myMovie = new Movie(this, int(random(7, 9));
myMovie.play();
}
else
{
myMovie.stop();
}
}