My program works fine when I run it locally, but when I export it into an applet it errors and says "'A Java Exception Has Occurred" and this only happens when I have minim running in my program. I've searched around a bit, but it seems that none of the topics have any solutions :\ Does anyone know how to resolve this problem or anything I could possibly do? I'm running Processing 1.5.1 and just redownloaded it, and I've tried downloading the minim library
here and following the instructions under Installation but it doesn't work either.
I have to turn this in in an hour and I'd really really appreciate any help I can get. Thank you!
edit; this is what my applet folder looks like. is there anything missing?
Hi all, I'm running into a problem where the images and text keep moving a couple of pixels to the right and then back, and it's driving me crazy. I use translate continuously to scroll sideways, and I'm wondering if the problem is due to it rounding off decimals or something?
Here's the code where I translate:
scrollAmount += scrollRate;
if (frameCount % 500 == 0)
{
scrollRate +=.05;
}
translate(scrollAmount, 0);
and one of the images that keeps shaking is drawn here:
image(question, -scrollAmount + 28, 90);
Thanks a lot! c:
edit; I've determined that it is indeed probably a rounding error since if I add 0.5 or 1 to scrollRate, it works fine. Any ideas on how to make it round properly?
Hi all, in my program I am trying to read in strings from a file. It seems to work fine, but it ends up giving me an error and I can't seem to figure out why.
Here is the code:
String q[] = loadStrings("Level1.txt");
String[][] questions = new String[q.length][2];
for (int i = 0; i < q.length; i++)
{
String[] sep = split(q[i], '\t');
questions[i][0] = sep[0];
questions[i][1] = sep[1];
}
The file that I am reading in is tab-delimited and each line has two items, separated by a tab.
and the error is
Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException: 1
at spacebar.Level1(spacebar.java:49)
at spacebar.draw(spacebar.java:37)
at processing.core.PApplet.handleDraw(Unknown Source)