Webby Award 2009 on NetArt for dreamgrove.org
Today I woke up to a very short but nice email. I paste the contents below:
http://www.webbyawards.com/webbys/current.php?season=13#webby_entry_netart
... which, in short, means that we got a Webby Award for dreamgrove.org in the category of NetArt!
We didn't get the People's Voice Award but thanks to all who voted for us!
Dreamgrove was also given another award earlier this month, an EBGE (or EVGE - Greek: ΕΒΓΕ: Ελληνικά Βραβεία Γραφιστικής και Εικονογράφησης - English: Greek Awards for Graphics and Illustration) Award in the General category of Interactive Applications.
Flash AS3 and PHP File Encoding
A quick tip: (after spending an hour banging my head on the wall):
If you are to have PHP talk to Flash and pass binary data through a URLLoader, keep one thing in mind; The PHP file has to be saved in ANSI encoding. Saving the file in UTF-8 encoding will only give you headaches!
Automatic Custom Context Menu in Flash
It's typical, that every time i wanted to add a custom right click menu to my flash apps, i just googled for it and pasted in the usual code. It just occurred to me that these 5-10 lines of independent code don't have to (and shouldn't) be part of the main code of my projects. After all, i always want the same thing in my menus: the name of the project and a link to my homepage. So, to keep my code at a minimum, i converted that context menu into a nice little class. Now, every time i want to add it, all i have to write is:
import com.locus_delicti.utils.LocusMenu;
contextMenu = LocusMenu.buildMenu("kuler Patterns Gadget");where the String "kuler Patterns Gadget" is the name of my project.
Flash CS3 Components in CS4
After i installed Flash CS4, the first project i wanted to import and "upgrade" from CS3 was of course our homepage, www.locus-delicti.com. But when i did it and hit Ctrl+Enter all kinds of weird stuff happened and items started flashing here and there.
That was a while ago, so now that i had some free time, i decided to give it another go. Among a lot of errors, one stood out:
Error 1034: Type conversion failed. Cannot convert fl.controls.TextField to MovieClip
It seems that CS4 had some problems with my old TextArea component from CS3. The solution was simple but confusing. I just dragged a new TextArea from the Components Panel and chose to "replace existing component". After that everything worked.
The problem is, i never saw in the new features of Flash CS4 that the components have been retouched (backwards-incompatibly)...
Dynamic Noise (Sound & Image) in AS3
I've had a script in my "script tests" library for a long time now that used the noise() method of the BitmapData Class on EnterFrame to create a noisy image that somehow resembled the static when we have bad signal on TV. However it just didn't seem complete.
Flash Player 10 came with some major improvements, one of which, is the enhancement to the Sound Class that now allows us to generate sound using actionscript alone.
Check the example below (make sure you hit the "sound" button cause i didn't want the "hisssssS" playing by default on the blog):
All the source code is available below in the .fla file. But i'd like to point out online just how easy it is to generate sound in Flash 10 (5 lines!):
var hiss:Sound = new Sound();
hiss.addEventListener(SampleDataEvent.SAMPLE_DATA, hissCallbackHandler);
hiss.play();
function hissCallbackHandler(e:SampleDataEvent):void{
for(var i:uint=0; i<2048; i++){
//write random data in the stream
//random float values from 0.0 to 1.0 are a perfect noise
e.data.writeFloat(Math.random());
e.data.writeFloat(Math.random());
}
}At the moment, there is an error in the LiveDocs at Adobe that confuses "SampleDataEvent" with "Event". Adobe's example won't work so just stick to the code above.
Download the source file here!
DateChooser / DateField from Flex to Flash
After searching in vain a whole day for a dateChooser/dateField/calendar component for Flash CS3/CS4 that would work with Actionscript 3 (something like the one there was for AS2) i decided to follow a different route.
Since Flex Builder has exactly what i was looking for i decided to import it. The operation proved to be simpler than i initially thought. So only after half an hour here's what happened.
AS3: Make a wordlist from a String of words
Working on dreamgrove.org i had to turn a string of space-separated words into a word list, an array containing these words, so that when someone searches for "red dress" i could get results using the String.search() method even when these words are not adjacent to each other (eg. "... her dress was red"). So i wrote a simple function that takes that string and returns an array of the words. Here is the code:
var string:String = "Google's mission is to organize the world's information and make it universally accessible and useful";
function wordlist(str:String):Array{
var wordlist:Array = new Array();
while(str.search(" ") != -1){
wordlist.push(str.substring(0, str.search(" ")));
str = str.substr(str.search(" ")+1);
trace(str);
}
wordlist.push(str);
return wordlist;
}
trace("\nlist: "+wordlist(string));And the output is:
mission is to organize the world's information and make it universally accessible and useful is to organize the world's information and make it universally accessible and useful to organize the world's information and make it universally accessible and useful organize the world's information and make it universally accessible and useful the world's information and make it universally accessible and useful world's information and make it universally accessible and useful information and make it universally accessible and useful and make it universally accessible and useful make it universally accessible and useful it universally accessible and useful universally accessible and useful accessible and useful and useful useful list: Google's,mission,is,to,organize,the,world's,information,and,make,it,universally,accessible,and,useful
Kuler Patterns Flash + AIR App
- update 09/01/2009: kuler Patterns is featured as Mashup of the Day at programmableweb.com. At the same day Adobe decides to change the APIs domain without notifying it's users... Thanks ![]()
- update 07/01/2009: Added a fullscreen mode in the flash version of the app. To change color theme in fullscreen mode just press the button on the top-left. To return to the browser press "Esc". Full screen is disabled for the animations, as it will bring a lot of computers to their knees. AIR application updated to version 1.6.
- update 01/01/2009: New cool patterns and the option to create images any size and download them (great for some dizzy wallpapers)
- update 26/12/2008: Thanks to the updated FileReference Class in Flash Player 10 i added a new "save" button, that lets you save the generated pattern. Flash Player version 10 is now required.
- update 25/12/2008: new patterns have been added and the AIR installer has been updated. Also there is a new option to load recent, popular, highest rated and random themes. If you don't see the changes just clear your cache (ctrl+F5).
A long while ago (roughly when kuler.adobe.com launched and supported RSS feeds) i created a small AS2 application that took the swatches from those feeds and drew some patterns using them.
After so much time i took the time once again to build somewhat the same thing on AS3. The new application is built from scratch and you can take a look at it below.
A reason i did it in Actionscript 3 was that it's more robust. And that shows. This one refreshes much quicker than the Actionscript 2 version. Another reason is that now i can easily make an AIR application out of it. Not that it's much use, but still it's a nice little application. Good when you need some instant color inspiration.
Get the Kulair Patterns AIR application below:
or download the AIR file here. Of course it's not signed by Adobe, but don't be alarmed by the big red X's. Take my word for it
Green Sock Tween
Well, for some time now i have been using TweenLite and especially TweenMax as my AS3 tweening engine. Jack has made an amazing job writing these classes and a real service to the Actionscript community by sharing them like this.
Now, i searched google for the terms "green" "sock" (which is the name of his blog) and the site was the 5th-6th result. And since this is unacceptable, there you have it; a whole blog post to boost by a tiny bit greensock's pagerank!
dreamgrove.org
The first phase of the dreamgrove is now complete. Feel free to plant your dream or read others' dreams on www.dreamgrove.org.
Dreamgrove is a place accessible from two portals: a webpage and a garden. It contains an archive of dreams.
At dreamgrove.org you are invited to write your dreams and plant them in a public, virtual field: there you can also read others' dreams.
The garden features a soundscape of these dreams: you can hear them through the trees.

dreamgrove.org
