Hey guys,
So I've been working on this processing sketch which works fine in Standard mode- I've been trying to adapt it for Android, but right after the sketch loads on the emulator I get a sorry message saying my application "has stopped unexpectedly. Please try again"
Here's my code below, basically it accesses a series of SVG shaped I've created and draws them across the screen. It seems like it isn't able to locate them for some reason, but I'm not sure.
- int numFrames=31;
- int frame = 0;
- PShape[] images = new PShape[numFrames];
- float x ;
- float y ;
- float easing= 0.5;
- void setup()
- {
- background(254, 250, 240);
- smooth();
- x = 240;
- y= 400;
- shapeMode(CENTER);
- for (int i=0; i<numFrames; i++){
- String imageName = nf(i,2) +".svg";
- images[i] = loadShape(imageName);
- }
- }
- void draw()
- {
- float speed= random(0, 30);
- float diameter= random(0, 45);
- x += random(-speed, speed)*easing;
- y += random(-speed, speed)*easing;
- x = constrain(x, 0, width);
- y = constrain(y, 0, height);
- frame = (frame+1) % numFrames;
- shape(images[frame], x, y, diameter, diameter);
- float speed2= random(0, 50);
- }
at processing.core.XML.<init>(XML.java:82)
at processing.core.XML.<init>(XML.java:62)
at processing.core.PShapeSVG.<init>(PShapeSVG.java:158)
at processing.core.PApplet.loadShape(Unknown Source)
at processing.core.PApplet.loadShape(Unknown Source)
at
etc. etc.
I'd really appreciate any insight on what I might be dong wrong!
1