//Dan Packman //Final Project //Intro To Interactive Media //News Scanner String query = ""; String URL = "http://topics.cnn.com/topics/feeds/rss/politics"; PFont font; float x=0; int y=0; boolean wordgo = false; boolean stop = false; int num=0; String[] data; String[] words; void setup(){ size (300,1000); frameRate(1); smooth(); font = loadFont("CourierNewPS-BoldMT-18.vlw"); textFont(font, 20); } void draw(){ data = loadStrings(URL); background(180,95,80); fill(0); text("Scan news for:",20,35); fill(255); rect(10,50,250,40); fill(0); text(query,20,75); wordgo(); } void keyPressed() { if (key == BACKSPACE) { if(query.length() > 0) { query = query.substring(0, query.length() - 1); } } else if(key==ENTER){ scanner(query); } else if(key!=CODED){ query += key; println(query); } } void scanner(String query1) { //this custom function goes thru the whole text and finds the word sent to it x=random(250); fill(0); for (int i=0; i*_;:?()\"-"; //these are the items we want to seperate words by and disclude from our final words words = splitTokens(data[i], separators); ///breaks each line into words for(int j=0; jheight){ stop=true; } } } y+=100; } if (stop==true){ wordgo=false; String query = ""; x=0; y=0; wordgo = false; stop = false; num=0; println("anything"); }