Archive for August, 2007
JSON - by the code for the code
Just finished building the json flash feed:
http://blog.robshearing.com/wp-flash-json.php
I used a handy php JSON parser to encode the string. I’m not entirely convinced about JSON. Evangelists go on about it’s inherent readability, however characters have to be escaped and this results in some messy looking text. I see this notation best suited for code and not for humans to read. It’s best if it’s encoded by code and then decoded by code and never sees the light of day. In this respect it is a very readable notation, lightweight and easy to ingest.
For example:
encoding (using PHP JSON parser):
$output = $json->encode($json_feed);
decoding (using adobe’s AS3 JSON parser):
var myObject:Object = JSON.decode( jsonString );
I don’t think it’ll ever replace xml. If I have to manage the data myself I will opt for xml - I can add comments, I can add CDATA, I can waste time deciding whether to use attributes or text nodes and I can take pleasure in making it look nice. But if I just want to shift a big chunky object from one platform to another I’l be encoding with JSON.
No commentsMesh wave
This surface of tiles uses a sample of perlin noise to generate the organic wave motion. Inspired by the MSNBC’s news visualiser.
No commentsphotos test
Some photos
No commentsCustom rss feeds
I’m working on setting up this wp blog to manage the blog and to act as a CMS for a flash site. I have a Category Visibility plugin that hides website posts and only shows blog entries in the blog. For the non-blog posts I’m adding some custom fields that will be used to link to assets. I can then expose these categories to the flash site via rss.
Blog posts:
http://blog.robshearing.com/wp-rss2.php
or
http://blog.robshearing.com/feed
or
http://blog.robshearing.com/?feed=rss2
Actionscript experiments feed:
http://blog.robshearing.com/wp-rss2.php?cat=8
Work feed:
http://blog.robshearing.com/wp-rss2.php?cat=7
I am however finding flaws in this model. The problem is twofold - dealing with those custom fields and making my life easier when I parse the data in flash. I’m thinking of either adding the meta data to the rss feeds, making a custom feed, or make a bespoke JSON feed. I don’t want to add meta to the rss as it may start to break the feeds compliance, also I don’t want no trouble if I upgade WordPress. Making a custon rss fleed is boring, so I’m going to attempt to build a bespoke JSON feed…
No commentsAS3 - learning the ropes
I’m getting stuck into AS3 to build my new site and it’s not as straight forward as I first thought. Almost everything I have learnt and taken for granted I now have to revisit and rebuild. Generally however, I’m pleased with all the new coding procedures and class re-writes that adobe have given in the updated language.
Here are three interesting ‘features’ I discovered yesturday:
Stage
Stage can only be accessed though a visible displayObject.
I discoved this when tying to build an AS3 stageManager class. I didn’t want to make the class extend a sprite and have to add it to the displayList. So I decided to pass it a displayList object as a reference that it uses to measure the stage size.
AS3 Singleton
You can’t make the constructor private! So the old singleton is broken. I googled this problem and found that many people pass the constructor a private variable or method so it can only be successfully implemented internally. Problem is that the class looks a bit messy. Then I discovered another implementation by Daniel Hai on http://www.onflex.org/code/
package
{
public class Singleton
{
private static var instance:Singleton = new Singleton();
public function Singleton()
{
if( instance ) throw new Error( "Singleton and can only be accessed through Singleton.getInstance()" );
}
public static function getInstance():Singleton
{
return instance;
}
}
}
E4X and namespace
I was attempting to read a feed from here: http://kuler.adobe.com/kuler/API/rss/get.cfm?listtype=rating
If you look closly the swatches are on nodes under a kuler namespace:
…
<kuler:themeItem>
…
<kuler:themeSwatches>
<kuler:swatch>
<kuler:swatchHexColor>468966</kuler:swatchHexColor>
</kuler:swatch>
</kuler:themeSwatches>
…
</kuler:themeItem>
…
I haven’t come accross this notation before. In AS2 I could just barge in and parse the nodes as “kuler:themeID”. So this led me to discover the namespace class. Whereby, if I understand it correctly, you target the nodes within a specific namespace. Combined with the beauty of E4X, my query became:
var kuler_ns:Namespace = xml.namespace("kuler");
var hexList:XMLList = xml..kuler_ns::swatchHexColor.text();
Isn’t that pretty.
astronaut - music and flickr
A series of tag searches from flickr is done against lyrics to a song. Results are unexpected and amusing.
http://www.avoision.com/experiments/astronaut/
This has got me thinking. I might have a go at ths some time, afterall I’ve already built the engine:
flickr rss reader
Eames’ information machine
A short animated film written, produced & directed by Charles & Ray Eames for the IBM Pavilion for the 1958 Brussels World’s Fair. The movie topic is the computer in the context of human development, more specifically it traces the history of storing & analyzing information from the days of the cavemen to today’s age of electronic brains.
No commentsLee Brimlow on AIR
A video has just been added to the onAIR tour:
http://onair.adobe.com/blogs/videos/2007/08/01/lee-brimelow-transitioning-to-the-desktop-with-adobe-air/
Lee is great and he works at such a great company too. As for all this AIR, I really have to get started. The results are so much similar to ZINC, but with a much cleaner interface (and I presume more stable and less quirky)
No commentsErik Natzke - new hero
I heard a lot about Erik Natzke way back in flash 5 days. He had a really intersting experimental showcase site. I remember his work was massively respected. Then he disappeared - his site went down and I didn’t hear much about him. So the other day I stumbled over a video of his at FITC in 06.
http://video.google.ca/videoplay?docid=-1458352919661594741&q=fitc
This guy is a true master of the flash meduim and is always pushing it to it’s limits. His work was on his site for a while but now it redirects to his blog:
http://jot.eriknatzke.com/
I loved his swarms and ribbons. So I tried to replicate:
swarm_1
swarm_2
ribbon
The Campaign Palace
Website for an advertising agency, The Campaign Palace, as part of a larger brand redesign in 2007. The site features a 3D background effect, blur transitions, video and a chandelier-inspired image tile transition effect. The site also has a flash CMS site that allows updating of all the copy, images and video on the site.
No comments
