Showing posts with label Actionscript. Show all posts
Showing posts with label Actionscript. Show all posts

Wednesday, 9 September 2009

Interactive Flame Thrower

Just for fun, a little bit of experimentation and a bit of insomnia. I've never used Flash's ability to read microphone input so I thought I would check it out. Its actually quite limited in terms of accessing the raw data (although there is an online petition to get Adobe to allow access to raw mic data, and some cool stuff here). All you need to do is blow at your microphone and make flames!
Try it for yourself

Saturday, 5 September 2009

Javascript/Flash mp3 Player

I was recently asked if I could make a Flash mp3 player that was controlled with Javascript. Obviously my first question was why on earth would you want (or need) to do that? The answer I got was perfectly understandable. To have the ability to integrate the Flash element seamlessly into HTML content. In other words the links would be normal HTML links that when clicked played the song in the Flash player. Of course this also has the benefit of streamed content speeds, the user doesn't have to download anything. Flash's ExternalInterface class is the key to this solution, it makes linking from ActionScript to Javascript a piece of cake.
Here's an example. The white pixel in the top left corner of the grey panel is the the Flash content (it's white to show you can see it).

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]

Wednesday, 15 April 2009

Vote For Mr Squidling!


Mr Squidling - Augmented Reality Demo from Gordon Everett on Vimeo.
So I entered the Augmented reality contest over at the Papervision3D forum. You can see my entry here. You need to have a webcam on your monitor that you can point down at your desk just in front of your keyboard. Then you need to print out the special marker (link provided on the page) and follow the instructions.

Voting starts tomorrow!

Sunday, 15 March 2009

X-Dof effect in Papervision


Speedok of the Flash community came up with this cool effect. I don't really know how to describe it but I like it! Click to change the shape/pattern and move your mouse around to distort it.

X-Dof = extreme depth of field

Saturday, 14 March 2009

Augmented Reality Webcam Trickery


If you don't know what Augmented Reality is then I'll tell you.

It's magic!

Well nearly, it's webcam magic. There's open source software available called ARToolkit in c++ or there's FLARToolkit for the Flash platform which is really taking off at the moment. In a month or two you'll probably be sick of it. This demo was put together by John Lindquist with some help from Seb Lee-Delisle and it rocks! Check out more AR examples on John's blog, Seb's blog or at squidder.

Tuesday, 24 February 2009

Tin Foil?


I revisited some old tutorials on Papervisio3D shaders and combined it with some AS3Dmod and came up with Tin Foil. I was going to call it "liquid metal" but, well its not really liquid is it?

Wednesday, 11 February 2009

3D Carousel

3D Carousel

3D Carousel gallerys are nothing new on the web I know but I made one anyway.... most use papervision3D but this is entirely done in Flash CS4. Thanks to Lee Brimelow for the tutorial.

Click the image to see it in action. I think it looks nice...

The images are by Wright George photography (and are copyright).

Tuesday, 27 January 2009

The Strongest Truck in The World!

This game is so cool and simple - and of course difficult to master. It's made using a combination of Papervision and (I suspect) Box 2DAS3. I have managed to flip it three times so far! See how you get on!

Sunday, 30 November 2008

The Spiralizer

The Spiralizer is a different version of The Blade - almost the same but more reactive to the music.

Saturday, 29 November 2008

The Blade


Yes its another visualizer but I think its got real retro power!

I call this one The Blade

Saturday, 22 November 2008

Cool Visualiser

I thought I should share this link to a cool visualiser with you since I've been doing a lot of these kind of things lately (but not in 3D). Its by Grant Skinner who is one of the Daddies when it comes to Flash and Actionscript.

Check it out- its pretty cool, and expect to see something similar here soon!

Which reminds me, I haven't shown you any papervision stuff....

Too much Candy?

Well I restarted Firefox and they all work again. I guess it must be a cache thing... too much candy and the fox gets sick!

Anyway here's another visualiser. This one looks like an eye so I've imaginatively called it Eye Candy!

Friday, 21 November 2008

More Candy!


I wrote a thousand words of my paper today so I though I'd reward myself by playing with Flash a bit more.
I came up with what I've called Candy Visualiser Its not interactive, you just admire its beauty!
Be warned! It is processor heavy so if you PC is old or slow it may crash! (sorry)

[Edit] I don't know whats going on with these Flash movies, sometimes they work and sometimes they dont....

I know all these generative art things have been done before but they are so much fun to do!

Friday, 14 November 2008

Smoking Wave Eye Candy















Continuing from my last post "Ultimate Kaoss?" this uses the computeSpectrum method of the SoundMixer class. For some reason it wont work in a browser. When I work out why I'll post a link here so you can have a play.