The function display() dose not exist?
in
Programming Questions
•
10 months ago
I have been starring at this for hours and i can't find whats wrong. I am getting the error, The unction display() dose not exist, the line assosiated with the error is in larger font. anything helps, thank you.
Click[] clicks;
import ddf.minim.*;
import ddf.minim.signals.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
//GPS babble
//audacity
//bounds -122.4704,37.7061,-122.1244,37.8917
PImage Map;
String[] data;
MercatorMap mercatorMap;
boolean buttonOn;
Minim minim;
AudioPlayer home;
void setup()
{
size (999, 569);
Map = loadImage("map.gif");
background(Map);
data= loadStrings("locations.csv");
mercatorMap = new MercatorMap (999, 569, 37.8917, 37.7061, -122.4704, -122.1244);
for(int i = 1; i < data.length; i++){
String[] pieces = split(data[i],",");
float lat = (parseFloat(pieces[1]));
float lon = (parseFloat(pieces[2]));
float x = mercatorMap.getScreenLocation(new PVector(lat, lon)).x;
float y = mercatorMap.getScreenLocation(new PVector(lat, lon)).y;
clicks= new Click[data.length];
clicks[i] = new Click(random(40),random(height),"");
// println("x-coord: " + x + " y-coord: " + y);
smooth();
noStroke();
minim = new Minim(this);
home = minim.loadFile("Home.wav", 2048);
}
}
void draw(){
//println (mouseX +"," + mouseY);
for(int i = 0; i < clicks.length; i++){
clicks[i] = display();
}
}
class Click {
float x,y;
String data;
Click(float _x,float _y,String _Data){
float x;
float y;
x=_x ;
y=_y ;
data=_Data ;
}
void display(){
ellipse (x,y,59,70);
for(int i = 0; i<clicks.length; i++){
clicks[i].stateClick();
if (buttonOn){
home.play();
}else{
}
}
}
void stateClick(){
for(int i = 0; i<clicks.length; i++){
clicks[i].stateClick();
if((mouseX>266&&mouseX<306&mouseY>408&&mouseY<458)){
{
if(buttonOn){
buttonOn=false;
} else{
buttonOn=true;
}
}
}
}
}
void mouseReleased(){
for(int i = 0; i< clicks.length; i++){
clicks [i].stateClick();
}
}
}
void stop()
{
home.close();
minim.stop();
super.stop();
}
Click[] clicks;
import ddf.minim.*;
import ddf.minim.signals.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
//GPS babble
//audacity
//bounds -122.4704,37.7061,-122.1244,37.8917
PImage Map;
String[] data;
MercatorMap mercatorMap;
boolean buttonOn;
Minim minim;
AudioPlayer home;
void setup()
{
size (999, 569);
Map = loadImage("map.gif");
background(Map);
data= loadStrings("locations.csv");
mercatorMap = new MercatorMap (999, 569, 37.8917, 37.7061, -122.4704, -122.1244);
for(int i = 1; i < data.length; i++){
String[] pieces = split(data[i],",");
float lat = (parseFloat(pieces[1]));
float lon = (parseFloat(pieces[2]));
float x = mercatorMap.getScreenLocation(new PVector(lat, lon)).x;
float y = mercatorMap.getScreenLocation(new PVector(lat, lon)).y;
clicks= new Click[data.length];
clicks[i] = new Click(random(40),random(height),"");
// println("x-coord: " + x + " y-coord: " + y);
smooth();
noStroke();
minim = new Minim(this);
home = minim.loadFile("Home.wav", 2048);
}
}
void draw(){
//println (mouseX +"," + mouseY);
for(int i = 0; i < clicks.length; i++){
clicks[i] = display();
}
}
class Click {
float x,y;
String data;
Click(float _x,float _y,String _Data){
float x;
float y;
x=_x ;
y=_y ;
data=_Data ;
}
void display(){
ellipse (x,y,59,70);
for(int i = 0; i<clicks.length; i++){
clicks[i].stateClick();
if (buttonOn){
home.play();
}else{
}
}
}
void stateClick(){
for(int i = 0; i<clicks.length; i++){
clicks[i].stateClick();
if((mouseX>266&&mouseX<306&mouseY>408&&mouseY<458)){
{
if(buttonOn){
buttonOn=false;
} else{
buttonOn=true;
}
}
}
}
}
void mouseReleased(){
for(int i = 0; i< clicks.length; i++){
clicks [i].stateClick();
}
}
}
void stop()
{
home.close();
minim.stop();
super.stop();
}
1