Error: The constructor xxx is undefined
in
Contributed Library Questions
•
1 year ago
Hi there.
I´m a newbie in processing. I´m trying to make a class for driving many gifs animation. For animiation I use the "Gif" library. I download this library in processing website. It´s intended for animate gif files. But I need to display each frame of animation. Because of that, I´m creaing this class.
When I try to compile and run the project, I give the folowing error:
"The constructor Gif(Stiling.anim, String) in undefined" (this error respects to yelow line at code. see below)
class anim { //Plays gif animation
import gifAnimation.*;
float px,py,len,frame=0;
Gif nonLoopingGif;
// void load_gif(float x, float y) {
void anim(float x, float y) {
px=x;
py=y;
nonLoopingGif = new Gif(this, "ink splash2.gif");
len=nonLoopingGif.length;
nonLoopingGif.play();
nonLoopingGif.ignoreRepeat();
}
void play_gif() { //create anitated image and animate it. Then, it destroys itself from memory
if (frame<len) {
image(nonLoopingGif, px, py);
frame++;
}
}
I don´t know why this error is occuring. WHy cannot the compiller find the Gif constructor? I included the gifAnimation library into class.
thanks for any help. :)
1