Archives Posts

Web/Flash based Photoshop is real … sorta

March 27th, 2008 by Caleb

Without much fanfare, Adobe launched a web-based Photoshop yesterday. However, it’s far from the Photoshop we all know and love… in fact, it’s reminds me more of Vuvox than Photoshop. As we would say in California, it’s lacking hella features…but hey, it’s still forward progress. Anyway, just wanted to make sure everyone got word.

http://www.photoshop.com/express/

Peace in the Middle East.

Digg It | Add to Del.icio.us

Archives Posts

Now teaching ActionScript at the Academy of Art MFA Program

February 4th, 2008 by Caleb

Well, it’s official; I am now faculty at the Academy of Art University. More specifically, I’m teaching a group directed study in the Academy of Art San Francisco’s School of Digital Arts + Communications MFA program.

Last Friday, I taught my first ActionScript class to graduate students working their way towards a Master’s degree at the Academy of Art. I must say, I’m very excited about the class of students that I have and the class of projects they are bringing along with them.

The class is diverse, offering a rich variety of projects and cultural perspectives. Yet since it is a group directed study, it is also small and intimate (8 students), a nice quality for any academic environment. All of my students want to learn ActionScript and programming in Flash, and for the most part they are all daunted, or at least put off in some sense, by the prospect of learning ActionScript 3. I look forward to helping them learn to love the joys and rewards of adhering to best practices (most of all, keeping it simple) on the way to developing fun, interactive applications in Flash.

If any Flash superstars or evangelists are planning to be in the Bay Area anytime within the next 14 weeks, and have an interest in stopping by the class to inspire the next generation of Flash developers, by all means drop me a line so that we can plan accordingly.

Digg It | Add to Del.icio.us

Archives Posts

Flex Elections Analytical Tool

January 4th, 2008 by Caleb

Today CafePress Meter™, a quick project I have been working on that kicked off just weeks ago has gone live. You can check it out for yourself at: http://www.cafepress.com/cp/buy/elections08_meter.

It’s a tool built in Flex that allows you to view a “real-time look at what’s selling at CafePress, the colorful marketplace brimming with millions of user-created products that express your passions and points of view.”

This project, which is conceptually very simple, is testament to the rapid development one can achieve with relative ease using Flex and the Flash Platform. There’s not much eye candy, but nevertheless it’s launch is a feat that shows how quickly a large company can get cutting edge projects out the door using Adobe® technologies. The tool is totally customizable due to it’s content model which is largely XML based and thus can be customized by non-technical people w/ ease. Also, I think it’s cool that this project will continue to take shape over the next year as the elections progress.

A big thanks to all the folks at CafePress who helped make this happen :-)

Digg It | Add to Del.icio.us

Archives Posts

The easiest way to view Flex/Apollo trace output

April 4th, 2007 by Caleb

I have been messing around with Apollo and Flex quite a bit lately (actually, I fell in love with it … but that’s another article). Unfortunately, the solutions for viewing trace output that I have found were less than satisfying. They were either too cumbersome to implement, or caused my system to slow to a crawl.

The solution that I’ve found is simple, elegant, and totally familiar with anyone who has ever had to view a typical server log output.

Basically, I used “tail -f” and pointed to the local flash log. Unfortunately, this has the same problems as viewing any server log output using tail; it’s not very pretty, and it can be hard to read at times. However, it hauls ass and is easy to implement, and that is all that I really want.

It was easy to take it a step further in order to make it an easy to access command. Basically I just edited the “.bashrc” file found in my home directory, and input the following line:

alias flashTrace='tail -f /Users/USERNAME/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt'Obviously, you’ll want to replace “USERNAME” above with your local machine username (If you don’t know how to get this, just open Terminal and type “cd; pwd”. The part right after “/Users/”is your local machine username).

After that, you can open a terminal from anywhere and type “flashTrace” to see the output (hit ctrl-c to return to the command line).

If you are a Windows User and don’t already have a shell solution, do yourself a favor download cygwin to access a unix-like shell and then you can also implement the above.

Simple, easy, and effective… at least it works for me :-)

Cheers

Digg It | Add to Del.icio.us

Archives Posts

Just AS3 & MXML

November 15th, 2006 by Caleb

Ted Patrick has done it again. The creator of ifbin.com has delivered JAM (Just AS3 & XML) a promising new code repository for Adobe Flash/Flex code.

Go ahead and check it out, and if you happen to possess some code worth contributing, by all means do share!

Thanks (again) Ted :-D

Digg It | Add to Del.icio.us

Archives Posts

Updated AS3 Yahoo! Search API library and CoilGallery Search Mashup premiere

November 3rd, 2006 by Caleb

The latest flash Beta bits, and a programmer named firdosh both illustrate the fact that my YahooAPI classes had a few problems.

I have addressed those issues, and everything works fine now.

In order to exemplify this, i actually decided to mashup the CoilGallery code senocular released.

The app is definitely a prototype, and there are at least 3 known issues w/ the search implementation:

  1. i am not properly handling image load failures, so in the event of an image load failure, the app basically stops loading images
  2. there is some debug output, but ignore that for now
  3. the search term (”jamaica”) is hard coded

I will address all of these issues when i have time .. for now, just consider it a proof-of-concept.

http://caleb.org/coilgallerysearch.html

The source for the above code may be found here:

Thanks Senocular, your code whips the llama’s ass :-D

As always, any additional feedback is appreciated :-)

Digg It | Add to Del.icio.us

Archives Posts

Yahoo! Flash Developer Center

September 22nd, 2006 by Caleb

The Yahoo! Flash Developer Center is live and open for business!

Check it out at: http://developer.yahoo.com/flash/

The Y! Flash Developer Center aims to be your source for information about using Adobe Flash with Yahoo! Web Services and APIs. We provide you with things like HOWTO Articles, components for use in your Flash applications, and links to other resources on the web where you can find source code and helpful tools. Of course, it’s our new baby and is thus still in it’s infancy. It will no doubt continue to evolve and grow, but we can’t do it without help from people like you (I know that sounds corny, but it’s true).

Additionally, be sure to sign up for the public Yahoo! Flash group at http://tech.groups.yahoo.com/group/ydn-flash/ And if you haven’t already, be sure to read my post on Yahoo! Hack Day.

I wrote a simple article on how to get started using Yahoo! Search APIs in ActionScript 2 or ActionScript 3

There are other interesting articles up there now, including how to:

We’re working on other articles too. Be sure to check out developer.yahoo.com for more info on our public APIs.

Digg It | Add to Del.icio.us

Archives Posts

FlashForward Austin ‘06

September 18th, 2006 by Caleb

Speaker FlashForward Austin '06 Austin, despite the fact that is centrally located in Texas, one of the most notoriously conservative states, is actually quite a liberal community with a hip, happening night life. East 6th Ave. is populated by upwards of 100 bars and interesting local venues in an area of only a few blocks, and good restaurants are very easy to locate. On top of that, the locals are outgoing, polite, and the Internet industry is thriving there, making Austin a refreshingly fun place to be.

The conference itself was awesome too. I spent time hanging out with some of my favorite people in the industry; people who’s work I have admired for years; people like Branden Hall, Mario Klingemann (a.k.a. Quasimondo), Craig Swann, and Trevor Dodd. It was awesome having a chance to hang out with those guys and discuss whatever interesting subject matter was at hand.

I saw some amazing things there as well. Jared Ficklin from Frog Design did some amazing things with audio visualization. Basically, he took a tube and attached a speaker to one end, and attached a propane canister to the opposite end. He then drilled holes in the tube, turned on and ignited the propane. He then began to play music through the speaker. As a result, you could see the waveform in the actual flame! He then photographed those images and used them in a Flash audio visualization.

Also, Beau Amber of Metaliq showed off some amazing ActionScript 3 projects. Most notable of which was a geo-data visualization in which he plotted a mesh on top of the San Francisco bay area, which represented the wind channels passing through the region. He then simulated wind speed by animating pixels across the wind streams. It was very interesting indeed.

I spent the entire first day at a Flex 2 workshop hosted by Aral Balkan of OSFlash. Flex is definitely a powerful tool. Although without robust skinning capabilities, it is not quite flexible enough to serve a company like Yahoo! as a realistic deployment and development alternative.

Everyone at the conference was really interested in what Yahoo! is doing. I introduced the Yahoo! Developer Network to a lot of developers, many of whom had never heard of it for whatever reason. I was also doing my best to push the public Hack Day, YRB’s Brain Jam, and whatever open Flash positions/internships we have available throughout the company.

My speech itself was well received. The conference room was completely packed, there was standing room only, and no one really left until the end, which I think implies that people were interested. I basically introduced the difference in the approach I had to take in developing the ActionScript 3 version of the Flash Yahoo! Search API as opposed to the ActionScript 2 version. In short, the ActionScript 2 version required me to write several packages of supporting code in order to adhere to sound object oriented programming principles; however, the ActionScript 3 version required exactly none of that. I only had to write the code to accomplish the objective at hand…go figure. I also touched on remoting with AMFPHP and how easy that is to accomplish in ActionScript 3.

All in all, I have to say it was quite fun and interesting, and I think everyone was happy to see Yahoo! taking Flash seriously. It also gave me an opportunity to re-launch caleb.org, so check it out if you have a chance.

Digg It | Add to Del.icio.us

Archives Posts

AMFPHP in AS3

September 11th, 2006 by Caleb

Remoting in ActionScript 3 is easy to implement, but there are some important things to keep in mind. Most notably, the mx.remoting package is no longer required. There are no additional packages to install, everything you need is built right in to flash.net

This RemotingConnection class extends NetConnection and sets the objectEncoding to AMF:

package
{
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
public class RemotingConnection extends NetConnection
{
public function RemotingConnection( sURL:String )
{
objectEncoding = ObjectEncoding.AMF0;
if (sURL) connect( sURL );
}
}
}

This class employs the above class, and makes a remote service call:


package
{
import flash.net.Responder;
public class AS3RemotingTest
{
public var dataProvider:Array;
public var gateway : RemotingConnection;
public function AS3RemotingTest()
{
this.init();
}
public function init()
{
var gatewayUrl:String = "http://localhost:88/amfphp/gateway.php";
gateway = new RemotingConnection(gatewayUrl);
var responder:Responder = new Responder(onResult, onFault);
var arg:String = 'foo';
gateway.call( "HelloWorld.say", responder, arg);
}
public function onResult( result ) : void
{
trace('onResult invoked');
trace(result);
}
public function onFault( fault : String ) : void
{
trace('onFault invoked');
trace( fault );
}
}
}

(Note: The above code assumes that you have AMFPHP installed and running out of a folder named amfphp on your localhost)

Digg It | Add to Del.icio.us

Archives Posts

ActionScript Yahoo! Search API - 3 Simple Steps

September 11th, 2006 by Caleb

3 simple steps to performing a Yahoo! search in Flash

Download the YahooAPI class and examples

Yahoo! Developer Network provides developers a diverse offering of free web services. These services enable you to easily integrate feature rich functionality (e.g. web search, spellcheck, and contextual term extraction) with virtually no overhead other than loading an XML document via the native XML object (ActionScript 2) or URLLoader object (ActionScript 3).

Additionally, Yahoo! web services provide the developer an enormous pool of internet accessible resources, such as photos, videos, mp3’s, and data which can add complex dimensions to the already engaging Flash user experience.

These resources, and the developer’s ability to construct with them, can illustrate the multiplicity of advantages offered by applications created with Flash as opposed to more conventional client-side web development paradigms.

This article and the code provided will show you how to easily implement any of the Yahoo! search web services in ActionScript 2 or 3. The scope of this article is simply to demonstrate a sound approach to querying the Yahoo! search REST API from within Flash. It is very easy.

3 simple steps to performing a Yahoo! search in Flash 

1: Get an application id
First, in order to use the Yahoo! Search web services, you will need an application id (get one here). Both the ActionScript 2 and ActionScript? 3 classes use the same syntax for specifying the id.

Once you have an application id, the first thing your application will need to do is register the id with the YahooAPI class, as follows:

YahooAPI.APPLICATION_ID = ‘lkj34988fgjh2398ife923j4kjk234’;

2: Setup an Event Handler
Next, you need to set up an handler Function which will be invoked when the search response is received, as follows:

function onYahooSearchResult(e:com.yahoo.search.YahooSearchResultEvent):Void
{
trace(‘onYahooSearchResult invoked’);
trace(e.length + “ items found: \n”;
var result:YahooSearchResult;
for(var i:Number = 0; i < e.length; i++)
{
result = e.getResult(i);
trace(result.Title);
trace(result.Url + “\n”);
}
}

3: Search!
Once you’ve registered your application id, and created the search result event handler, all you need to do is invoke the static search method on the YahooAPI class, as follows.

Note: It is worth mentioning that the signature for the search method on the YahooAPI class differs between the ActionScript 2 implementation and the ActionScript 3 implementation.

The difference is due in large part to syntactical differences between the two languages and an effort on our part to remain consistent with the existing REST API implementations published by Adobe (com.adobe.webapis.*).

In short, the ActionScript 3 Event model works much better than the ActionScript 2 model. In addition, we take advantage of new functionality, such as the URLLoader class available in ActionScript 3.

ActionScript 2
// This example performs a web search for “monkey” which will return a maximum of 25 results:
YahooAPI.search(this, ‘monkey’, YahooAPI.WEB_SEARCH, 25);

ActionScript 3
// This example performs a web search for “monkey” which will return a maximum of 25 results:
YahooAPI.search(‘monkey’, YahooAPI.WEB_SEARCH, new NameValuePair('results', 25));
// The above call returns a URLLoader. You then subscribe to that objects events as follows:
yahooLoader.addEventListener(YahooAPI.ON_SEARCH_RESULT, onYahooSearchResult);

Specifying additional parameters
Of course you can perform different types of searches, and pass additional search parameters.

The following examples demonstrate doing so:

ActionScript 2
// image search w/ 25 results
YahooAPI.search(this, ‘monkey’, YahooAPI.IMAGE_SEARCH, 25);
// news search, with options (25 results, limited to news.yahoo.com)
YahooAPI.search(this, ‘monkey’, YahooAPI.NEWS_SEARCH, 25, ‘&site=news.yahoo.com’);

ActionScript 3
// news search, with options (25 results, limited to news.yahoo.com)
YahooAPI.search(‘monkey’, YahooAPI.NEWS_SEARCH, new NameValuePair('results', 25), new NameValuePair('site', 'news.yahoo.com'));
// image search w/ 25 results
YahooAPI.search(‘monkey’, YahooAPI.IMAGE_SEARCH, new NameValuePair('results', 25));

Download the YahooAPI class and examples 
Yahoo! API - ActionScript 2
Yahoo! API - ActionScript 3

Summary
That’s it!

Digg It | Add to Del.icio.us