Archive for the 'flex' Category

Monday, December 14th, 2009

Introducing free online radio @ radiotuna.com (…or why we still love Flash)

Some of our readers might have noticed a slightly downbeat tone to our recent posts, especially concerning everyone’s favourite web player! Here’s a more positive post to put the record straight.

Things have been a little quiet here at FlexibleFactory over the last year or so because the team have been busy with the launch of our new website over at TunaMedia Ltd.

Although we’ve kept the Flash content fairly discreet, it really deserves pride of place on the site. Without the Flash Player, this project would not have been possible. Even though we’ve been through a bumpy ride together, now that everything on the site is (quite literally) singing in harmony it gives me great pleasure to introduce you to radiotuna.com. Search thousands of free online radio stations by artist or genre… we’re pretty sure you’ll like it!

RadioTuna.com

…and, despite the bumps and bruises, we still love you, Flash!

Tuesday, October 21st, 2008

Custom headers possible with URLRequest/URLStream using method GET?

I posted this on StackOverflow.com, but maybe one of out readers knows the answer…

Quite simple really:

var req:URLRequest=new URLRequest();
req.url="http://somesite.com";
var header:URLRequestHeader=new URLRequestHeader("my-bespoke-header","1");
req.requestHeaders.push(header);
req.method=URLRequestMethod.GET;
stream.load(req);

Yet, if I inspect the traffic with WireShark, the my-bespoke-header is not being sent. If I change to URLRequestMethod.POST and append some data to req.data, then the header is sent, but the receiving application requires a GET not a POST.

The documentation mentions a blacklist of headers that will not get sent. my-bespoke-header is not one of these. It’s possibly worth mentioning that the originating request is from a different port on the same domain. Nothing is reported in the policyfile log, so it seems unlikely, but is this something that can be remedied by force loading a crossdomain.xml with a allow-http-request-headers-from despite the fact that this is not a crossdomain issue? Or is it simply an undocumented feature of the Flash Player that it can only send custom headers with a POST request?

Wednesday, August 13th, 2008

Targetting Flash Player 10: Building the Flex SDK from SVN in Windows

If (like us at FlexibleFactory) you like living on the bleeding edge then you might want to consider building your own FlexSDK from the source code which is openly available at http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK

(more…)

Tuesday, August 12th, 2008

Flash Player 10 Release Candidate debug player (standalone)

[Note: This article now contains incorrect information. Look here for up to date info.]

For anyone interested in debugging applications built for Flash Player 10 release candidate, the standalone debug version of the player can be found at the following locations:

Windows
Mac
Linux

[see comments for more info]

Interestingly, they are now offered as the primary player in the Flex SVN repo. The former location in the repo for the debug players (http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/in/player/10/) contains out of date (beta 2) versions.

Friday, May 23rd, 2008

How to load MP3 files from a FileReference

FileReference.load is a nice new feature in Flash Player 10, but the only thing you get back from it is the FileReference.data property, which is a ByteArray. This is useless (well, not altogether, as we’ll see) in the case of MP3 audio files, because the built-in Sound API does not support loading from ByteArray.

When “making-some-noise” wasn’t quite so easy, I invested a bit of time messing around with MP3 data to see if my Flash sound hack for playing PCM audio data could be subverted to use MP3 data instead. While I got this partially working, I realised that it was a library without any application. What use was it? I tried to use it for shoutcast streams, but it is not possible to seamlessly stitch together arbitrarily small frames of MP3 data and fire them with a “silent sound”. Unfortunately the ramp-up time of the mp3 decoder means that the signal audibly drops out at the stitch points.

It turns out that my efforts were not in vain, because with the arrival of FileReference.load, I have been able to repurpose this library so that it is now possible to load a Sound object with the data provided from a FileReference instance.
(more…)

Thursday, May 22nd, 2008

Loading MP3 files locally using the FileReference class

The new FileReference class in Flash Player 10 opens up a whole new side to web applications, where the barrier between the local file system and the network has (to some degree) been torn down.

Here’s an example of how to load MP3 files from the local file system. I’m sure you’ll appreciate why this is pretty cool…

(more…)

Wednesday, May 21st, 2008

Flash Player 10 Audio

So the Flash Player team have finally relegated the SOUND_COMPLETE hack to the dustbin of failed tech… but replaced it with a far superior technology. You can see all the details over at Tinic Uro’s blog (here, here and here).

Naturally quite excited by this news, I have been doing some development work. Here’s what I needed to get started:

Flash Player 10
Handy doc explaining where to get Flex SDK nightly build and how to use it to target FP10
Standalone Flash Player 10 (Debug Version)

I’ve been refactoring a class library that I have been writing over the last year and a half or so, to see how well this new stuff works. The main obstacle in the refactoring process has been the transition from using standard Arrays to ship the audio data through the application to the use of ByteArrays instead. This seems to offer a significant improvement in performance (although in the debug player it runs like a dog… about 4x slower).

Ultimately the aim is to publish this as a library for all to use, but while I am investigating licensing options and a new site for the library, I will be posting demos here.

Here is a demo application (requires Flash Player 10, it won’t try to auto-update if you don’t have FP10) that demonstrates the following features:

Extracting PCM audio data from MP3 sounds
A feedback delay module
A gain module
A mixing module
A resampler (changes the playback rate)

Below is a schematic of how these modules are chained together.

AudioProcessorSchematic

Thursday, September 20th, 2007

monosynth in flex

After writing an article for FlashBrighton about audio and Flash, I spent a while messing around with audio synthesis in Flash. The project has become a modular, xml powered synth engine, but has lost quite a lot of momentum recently. So instead of a grand launch, I’m going to release in bits and bobs, going back over early wins on the project. Here’s a Flex prototype that I wrote not long after releasing the initial article over a year ago.

(more…)