Archive for the ‘Flash’ Category

Visualisations

May 10th, 2008

A while ago, I wanted to write a custom MP3 player for my band's website. When I finished it, it looked a little bleak. A few buttons and the songtitle was all I had. But while building the MP3 player, I stumbled upon something named "SoundMixer" ...

A few days later, I have written a small library for myself with visualisations. I'll be adding to these and when I feel confident enough, I'll unveil some or all of the code involved. For now, enjoy the show. You can "advance" the visualisation by either pressing "stop" and then "play" or by picking another song using the << and >> buttons.

I still have a problem where a song that's been streaming well suddenly throws a security error. You'll notice that happening when the visual suddenly "staggers" and repeats itself. If that happens, you can simply advance the visualisation. It's been happening very very randomly and I haven't been able to put my finger on it so far.

Enjoy.

** I removed the Flash application. Please check the more recent version **

Posted in Flash | Comments (0)

Loading non-existent domains with Firefox on OS-X

May 8th, 2008

Consider the following code.

 
var myLoader:Loader = new Loader();
var myRequest:URLRequest = new URLRequest("http://www.sentientbeings.com/deadDomain.jpg");
//var myRequest:URLRequest = new URLRequest("http://www.xxxyyyzzzabcdefg.com/deadDomain.jpg");
 
myLoader.load(myRequest);
myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, function():void{trace("load complete")});
myLoader.contentLoaderInfo.addEventListener (IOErrorEvent.NETWORK_ERROR, function():void{trace("network failed")});
myLoader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, function():void{trace("IO failed")});
 

When you run this code, you'll get an IO_ERROR. But if you comment the first myRequest and then uncomment the second myRequest, you'll get nothing when testing on a Mac with Firefox. With "nothing", I mean the code does nothing. Somehow, the way Firefox on a Mac instantiates requests keeps Flash from firing the IO_ERROR event that you should be getting when trying to load a resource from a domain that does not exist.

Tags: , ,
Posted in Flash | Comments (0)

SEO Powered by Platinum SEO from Techblissonline