Recently Parsons has launched a much needed improved site. I worked on a Flash application of the site which serves as an exploratory navigation for potential students to discover programs they may be interested in based on floating keywords. The design was done by Dexter Miranda and supervised by Isa Gouverneur, both part of the Parsons creative team. The navigation also visually makes connections between programs or schools that share keywords. This is slightly confusing to explain, so take a look at the navigation itself.
MORE INFO
Tweetcatcha uses the New York Times Timeswire API to load the latest news for the last 24 hours. We use the title and the url of the articles on nytimes.com to search through Twitter. There is a lot of data, so please be patient with the load time. Searching through Twitter for url was made much easier by using BackTweets, a service of BackType. I wrote a AS3 class to wrap the BackTweets API, more information in this blog post. The tweets are arranged around in the center based on the time difference from the article posting to the time the tweet was created. So, if a tweet was posted less than an hour after the article, then it would be very close to the inner most ring, and if it was posted 20 or more hours later, then it would be closer to the last ring, (there are 24 rings, one for each hour in the day). Bruce Drummond and I collaborated on this project.
MORE INFO
I recently installed amfphp 1.9 and have gotten it to work thanks to some tutorials by Lee Brimelow on some introductions to amfphp.
Introduction to AMFPHP 1
Introduction to AMFPHP 2
He also did a blog post about some security issues regarding amfphp. These were great to get me started, but I ran into a few problems when I began to play around with it on my own.
First, I always place some returns at the top of my documents just for some space. However, this caused Flash to return a Server.badCall error, so make sure that there are no extra returns at the top of your document.
I had trouble finding the data that the responder returns by using the method that Lee described, but I found that if the amfphp function returns a single value, like “false” or “0”, then you can access it through :
function onTotal(responds:Object):void {
total = int( responds.serverInfo.initialData );
}
If you are dealing with a function that returns multiple values, such as a query to a database, I found that you can cycle through the results with this :
function onGetUserInfo(responds:Object):void {
for (var i:int = 0; i < responds.serverInfo.initialData.length; i++) {
trace(responds.serverInfo.initialData[i]);
trace(responds.serverInfo.initialData[i][0]);
}
}
Another problem that I ran into was the calls returning null values. This was due to the fact that I was directly referencing the file name.
i.e. http://www.site.com/amfphp/gateway.php. This worked when the user was at www.site.com, however, when the user accessed the swf from site.com it would return null values. I found that a quick fix was to simply reference the gateway through “/amfphp/gateway.php”.
Lee chose to display examples from php 5 and the constructor function for the class that he mentions for php 5 is
public function __construct() {}
}
?>
If you are using php 4, the constructor function of the class is the same name as the class that contains it
function DB() {}
}?>
I am not very good at php so I hope that this helps someone, as some of these errors were tough to spot, mainly the class constructor and the url with www or not.