Saturday 29 August 2009

Sometimes I surprise myself....



I am working on my portfolio/website at the moment, in between other things, and since I'm only putting my email address on my contact page for now, I thought it needed something to fill the space. I had an idea to use my business cards since they hold my contact details and I had thought of using Papervision3D and making an interactive card that flips over etc. but came up with the idea you see above. I'm really pleased with the way it came out so I'm sticking with it for now (I surprise myself because I'm generally really bad at graphics).

Wednesday 19 August 2009

Flash Developer available for work...

Well I'm still looking for a job but in the mean time if you need any Flash work done, whether its a website, image gallery, template - anything Flash related, let me know. I can also offer web related services including HTML, CSS, PHP and MySQL.

Monday 10 August 2009

SoundMixer.computeSpectrum + Timeline Audio

I am posting this little Flash ActionScript hint here in case somebody googles the same problem...

When a sound is embedded directly in the timeline of a Flash movie as opposed to being loaded dynamically, using the SoundMixer.computeSpectrum() method doesn't work. Well, sometimes it does and sometimes it doesn't. I had a working sound visualiser when I went to bed last night, and this morning I didn't. No changes to the code at all.
After a lot of googling I found this post by Jason Van Cleave on the [Flashcoders] mailing list. Thanks Jason!

Basically you have to load in an mp3 of silence, assign it to a channel and play it. Then your spectrum analyzer will work with your intended sound/music.

I know - its weird!

I also found loads of posts about how it is not a true spectrum analyser yadder, yadder which were quite interesting. If you like that kind of thing...

[CODE]
// Strange silent mp3 hack
var s:Sound = new Sound(new URLRequest("2sec.mp3"));
var channel:SoundChannel = new SoundChannel();
channel = s.play();

var ba:ByteArray = new ByteArray();
var g:Graphics = this.graphics;
addEventListener(Event.ENTER_FRAME, loop);

function loop(e:Event):void
{
SoundMixer.computeSpectrum(ba, true, 4);
g.clear();
g.lineStyle(3, 0xFFFFFF, 1);
g.beginFill(0xC11226);
g.moveTo(0, 250);

for(var i:uint=0; i<256; i++)
{
var num:Number = -ba.readFloat() * 500;
g.drawRect(i*2, 250, 2, num/15);
}

}


[CODE]

FLAR Adaptive Threshold

FLAR-What? I hear you ask.

It simply means that FLAR Augmented Reality now works in varied and (more importantly) variable lighting conditions. Which means great news for us when we go to Jetlag BIO in september!

Eric Socolofsky is the guy behind this fantastic addition to the world of FLAR (though not the inventor as it were). Read more at his blog