// Mushon Zer-Aviv // ICM, 2005 // Trading Cards PImage t, bg, over; PFont f; String file = ""; String name = ""; int counter; String target_url = "http://www.fbi.gov/mostwant/terrorists/fugitives.htm"; String t_imageurl; int ternum = 18; //number of terrorists on the page void setup() { size(320,482); // Call our new getTerrorist function! counter = int(random (ternum)+5); getTerrorist(counter); f = loadFont("Georgia-BoldItalic-12.vlw"); bg = loadImage("cardbg.jpg"); over = loadImage("overlay.png"); } void draw() { image(bg, 0, 0); textFont(f); textMode(SCREEN); // Display all the stuff we want to display t = loadImage(t_imageurl); blend(t, 20, 20, t.width, t.height, 20, 40, 260, 340, DARKEST); blend(over, 0, 0, over.width, over.height, 0, 0, over.width, over.height, DARKEST); noTint(); fill(50); textAlign(CENTER); text(name,150,418); // Draw a little thermometer based on the nameerature noStroke(); fill(200); } void mousePressed() { // When the mouse is clicked, increment the counter and get the the next terrorist counter = int(random (ternum)+5); getTerrorist(counter); } void getTerrorist(int counter) { //Get all the HTML/XML source code into an array of strings (each line is one element in the array) // String url = target_url; String url = "http://itp.nyu.edu/icm/proxy/proxy.php?url=" + target_url; String[] lines = loadStrings(url); String source = join(lines, " "); // Get rid of the array and make it one very long String String list2[] = split(source, "#"); for (int i = 5; i < list2.length; i++) { println(i + "= " + list2[i] + "\n"); println(name +", "+ i +", "+ counter); } // Searching for file name within a specific area on the page for (int i = 0; i < ternum-1; i++) { String lookfor = "m\">