Dark Bit Factory & Gravity

PROGRAMMING => Other languages => Topic started by: benny! on April 24, 2011

Title: [Flash] FlodEx Example
Post by: benny! on April 24, 2011
Hey all,

here is a little wrapper class for the FlodEx library to play FutureComposer tracks (Could also be used for other sound formats supported by FlodEx).

Code: [Select]
package 
{
import flash.utils.ByteArray;

import neoart.flod.amiga.*;
import neoart.flod.futurecomposer.*;

/**
* FlodEd wrapper
* @author benny!
*/
public class FCMusic
{
// Embed future composer track
[Embed(source="../assets/skidrow1.fc4", mimeType="application/octet-stream")]
private var Song1:Class;

private var _player:FCPlayer;

public function FCMusic()
{
var stream:ByteArray = new Song1() as ByteArray;
_player = new FCPlayer();
_player.stereo = 0;
_player.load( stream );
}

public function play():void
{
_player.play();
}

public function stop():void
{
_player.stop();
}

// Feel free to add pause, restart etc...

}
}

Download FlodEx library at :http://sandbox.photonstorm.com/flod/FlodEx%201.01.rar (http://sandbox.photonstorm.com/flod/FlodEx%201.01.rar)

Here is a little live example I hacked together to show this in action:

RUN EXAMPLE (http://www.dbfinteractive.com/adminteam/benny/FlodExExample.swf)
Title: Re: [Flash] FlodEx Example
Post by: Shockwave on April 24, 2011
Damn, that's rather cool!

I love Future Composer songs, it's a great choice of module to show this off.
Title: Re: [Flash] FlodEx Example
Post by: Hotshot on April 24, 2011
Old skool scroller :)

Nice :)  :clap:
Title: Re: [Flash] FlodEx Example
Post by: benny! on April 24, 2011
Thanks ... and yeah, FutureComposer really rocks.
Title: Re: [Flash] FlodEx Example
Post by: rdc on April 24, 2011
Cool stuff.
Title: Re: [Flash] FlodEx Example
Post by: Kirl on April 25, 2011
Oldschool awesomness!  :updance:
Title: Re: [Flash] FlodEx Example
Post by: Dr.Death on April 25, 2011
WOW Benny that really is good mate  :updance:

We really do need this on DBF it would make it AMAZING    :goodpost:


I know this is a stupid thing to ask but what else do i need to download to have a look at this benny????

Thanx
Title: Re: [Flash] FlodEx Example
Post by: benny! on April 25, 2011
@rdc,Kirl, Dr.Death:
Thanks ;-) Glad you like it.

@Dr.Death:
Quote
We really do need this on DBF it would make it AMAZING
Well, of course it would be nice, but to do it right it would take quite a lot of work...at least I do not have the time
unfortunately...
Title: Re: [Flash] FlodEx Example
Post by: padman on April 25, 2011
Nice stuff and thanks for the example!  :)
Title: Re: [Flash] FlodEx Example
Post by: combatking0 on April 25, 2011
This looks great. I'll try to find a way to use this.