We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
PlayingFlickr (Read 2126 times)
PlayingFlickr
Oct 9th, 2005, 4:25pm
 
After reading about Mediamatic's extremely cool "Playing FLICKR v2.0" project in Amsterdam, I decided to write my own version for practice and fun.  I have posted it for everyone to play with and, hopefully, enjoy.  It is located here.

The interface is simple: when the page loads, you will be confronted with three white rectangles (FlickrSpots).  That's where the pictures will be displayed.  Each FlickrSpot has an associated Flickr tag, which is empty when the program starts.  To enter a tag, simply type it and press the UP key when done.  If you make a typo, simply stop typing and wait two seconds (the input listener will discard what you had typed) then type the desired tag again.  No output will be displayed on screen as you type, but when you press the UP key, the tag will appear in the FlickrSpot to which it was assigned.  Tags are assigned in order from left to right, rotating back around if more than three tags are entered.  If no images appear, then no results were found for the specified tag.  If you're curious, you can look in the Java console to see how many images were found for the tags you've entered.

IMPORTANT! Because this applet retrieves images from Flickr, it does require an entry in your Java policy file.  To figure out the location of your Java policy file, read this.  The specific entry is

Code:
grant codeBase "http://mywebpages.comcast.net/chrisfinegan/flickr/-" {
permission java.net.SocketPermission "www.flickr.com:80", "connect,resolve";
permission java.net.SocketPermission "static.flickr.com:80", "connect,resolve";
};


As you can see, it is only granting permission to connect to Flickr so that the images can be downloaded.  I will post a link to the source code shortly so that anyone interested can look at it.
Re: PlayingFlickr
Reply #1 - Oct 9th, 2005, 4:44pm
 
All sorts of tags can be used, for example all of the following yield interesting triptychs:

red/green/blue
tunnel/hallway/shaft
communism/democracy/dictatorship
stop/drop/roll
morning/evening/night
sun/wind/rain
washingtondc/newyork/london
up/sideways/down

You can also just use the same tag three times, for example:

abstract/abstract/abstract
architecture/architecture/architecture
centralpark/centralpark/centralpark

Play around, and let each set of tags run for a while.  I've got the display projected up on my wall, and it's quite cool what turns up sometimes.  That said, since the images aren't under anyone's control, be careful about the tags you choose - I've had some pretty unsavory images pop up under seemingly innocuous tags.

Re: PlayingFlickr
Reply #2 - Oct 9th, 2005, 4:55pm
 
The source code is located in the following files:

PlayingFlickr.java - the main class in the applet (extends PApplet)
FlickrSpot.java - encapsulates all of the logic for the FlickrSpots
InputListener.java - stores a buffer of input characters, dispatching them to the FlickrSpots
ImageFetcher.java - fetches images from Flickr on behalf of the FlickrSpots

I create all of my applets in NetBeans.  If anyone is interested in the process, let me know and I'll make a tutorial post in the Integration forum.
Re: PlayingFlickr
Reply #3 - Oct 13th, 2005, 3:48pm
 
Hi there,

Im from Amsterdam and know what you are talking about Smiley
(u 2 a'dam?)
I like your app quite a lot just as you say to let it run in the background, but maybe I would improve a bit on "user-experience"...
- Its better to see where I type what, which frame is active
- communicate the loading, it feels very "dead" after you typed and the images are loaded
- why does it react so slow to the typing

By the way, I didnt set that permission entry and it worked anyway!
Re: PlayingFlickr
Reply #4 - Oct 13th, 2005, 7:43pm
 
Thanks for the reply beachmeat - I'm glad that you enjoy the applet!  It's always nice to hear that other people are having some fun with your work.  I'm not from Amsterdam; I just read about the project online.  Have you been to the installation in person?  I imagine it's quite a sight on those massive screens.

As far as the improvements you recommended, they match exactly with what I've been kicking around in my head. Smiley

1. To indicate the active frame, I had considered having a light pink or blue border fade in and out around the active frame every 10 seconds or so.  Or maybe something  more subtle like a thin black bar at the bottom of the FlickrSpot.
2. I was thinking about adding a translucent progress bar at the bottom of each FlickrSpot indicating the percentage of images retrieved.  It would simply disappear once all of the images had been downloaded.
3  If the slow reaction you're talking about is between the time you press 'UP' and the time that the FlickrSpot tag updates, it's because I first check with Flickr to see if any images exist with the specified tag.  If none are found, the tag is simply ignored.  If images are found, then you'll see the FlickrSpot go blank and downloading will begin.  For me, that occurs in ~1/5 of a second.  It will depend on your Internet connection speed.

There are a few reasons I haven't made those changes yet.  First, I wrote the project just as a chance to learn Processing (it's my first Processing applet).  Since that's been accomplished, I haven't changed the code except to turn it into an application.  Second, because the majority of the time is spent watching the display and not entering tags, I held off on interaction improvements since they wouldn't actually be used much.  Lastly, I'm working on a couple of other side projects, and they're a bit more interesting now that PlayingFlickr is functionally complete. Smiley

If you want to change the applet, you're absolutely free to do so and distribute it however you want.  I made it simply for fun, so I'm just happy to see someone else enjoying it.  Let me know if you decide to jazz it up!
Page Index Toggle Pages: 1