We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi guysss, I am trying to make a program that can record the movement of the mouse on the canvas and reanimates when the user press a key. I know I will need array for this but I had no clue how to apply it. :(
just a little more description: When the user triggers the function, a new object is created, visually identical with the mouse, will keep moving along the route, looping back and forth. So that I can try to paint with it and explores the possibilities inside it.
Will be great if someone could shed me some light, I am so lost :(
This is what I have got so far :(
int i=0; int mx[] = new int[i]; int my[] = new int[i];
void setup(){ noCursor();
size(displayWidth,displayHeight); ellipse(mouseX,mouseY,30,30); background(255,190,229); frameRate(100); }
void draw(){ noStroke();
fill(112,249,190); ellipse(mouseX,mouseY,30,30); println(mouseX,mouseY); println(frameRate); //i=i+1; //mx[i]=mouseX; //my[i]=mouseY; }
Answers