import simpleML.*; PFont useFont; String fontFile = "HelveticaNeue-14.vlw"; //String thisURL = "http://www.crackblur.com/rss"; //String thisURL = "http://www.nytimes.com/services/xml/rss/nyt/TheCity.xml"; String thisURL = "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"; XMLRequest xmlDoc; RSSThingy[] rssThingies; int xPos, yPos; float fillFader = 255; int currThingy =1; //ny times puts the channel title twice. BAD. We'll replace it with our own text... int currLength = 1; void setup() { size(400,400); xPos = width/3; yPos = height/2; smooth(); setFont(fontFile, 14); xmlDoc = new XMLRequest(this,thisURL); try{ xmlDoc.makeRequest(); } catch(Exception e) { println("Oh noes! I couldn't open the URL!"); } } //create a font void setFont(String _fontFile, int _fontSize) { useFont = loadFont(_fontFile); textFont(useFont, _fontSize); } void netEvent(XMLRequest _xmlDoc) { println("OK, got the feed. Yayz!"); //WARNING: titles[0] will be the title for the channel! need to do title[i+1] to sync String[] titles = _xmlDoc.getElementArray("title"); rssThingies = new RSSThingy[titles.length]; currLength = rssThingies.length; for(int i=0;i= rssThingies.length-1) currThingy = 1; //ny times puts the channel title twice. BAD. We'll replace it with our own text... xPos = mouseX; yPos = mouseY; fillFader = 255; }