Portrait of the Sleep Deprived aka. locus blog

27Dec/080

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):

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

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!

10Dec/080

Δεκέμβριος 2008 – Αρχείο

Ηχητικά κλιπ, βίντεο και εικόνες από τον Δεκέμβριο του 2008.

Ραδιοφονική Ελληνοφρένεια στον ΣΚΑΪ Ραδιόφωνο

Δευτέρα 08/12/2008: Ελληνοφρένεια

Τρίτη 09/12/2008: Ελληνοφρένεια

Τηλεοπτική Ελληνοφρένεια στον ΣΚΑΪ Τηλεόραση

Τρίτη 09/12/2008: Ελληνοφρένεια

Ένα μπράβο στα παιδιά της Ελληνοφρένειας ειδικά για αυτές τις εκπομπές στις οποίες δεν μάσησαν τα λόγια τους!

Δούρειος Ήχος (Τζίμης Πανούσης) στον City 99.5

Κατεβάστε από εδώ

2Dec/082

Kuler Patterns Flash + AIR App

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

- 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 :P
- 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:

Please upgrade your Flash Player to use the AIR install badge

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 :)

29Nov/080

Free widescreem Wallpapers

Having just recovered my pc from a serious fault, i had to format and reinstall windows Vista. First things first, so i immediately changed the default, boring windows wallpaper to something more interesting.

Interfacelift.com is the best (to my knowledge) resource for free Desktop Wallpapers. Just pick your display resolution and download! Many interesting pictures (also some HDR photographs), easy to use, no annoying ads or spyware. A must website for everyone.

Highly recommended!

Interfacelift Desktop Wallpapers

30Aug/080

Winpwn 2.5: Ξεκλειδώστε το Apple iPhone στην έκδοση 2.0.2

Πριν απο λίγες ώρες κυκλοφόρησε η τελευταία έκδοση του διάσημου προγράμματος που ξεκλειδώνει και κάνει jailbreak το Apple iPhone (2G και 3G). Αντιγράφω απο το http://www.winpwn.com

WinPwn 2.5

- QuickPwn Support for 2.0/2.0.1/2.0.2

- Root partition resize support

- Installer support

- Basic / Expert modes

- Wizard style interface

- Automatic updater

- Support for WinXP and Vista 32/64bit.

Για άμεσο download:

Winpwn 2.5 download

10Sep/070

AS3 Basic Fractal

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)
(note: reduce iterations if it runs slowly)

A very simple fractal, consisting of straight lines, each positioned at the center of the other.
Found lying at the actionscript tests folder. The code looks pretty clean.

Get the source code here.