Dark Bit Factory & Gravity
PROGRAMMING => Other languages => Topic started 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).
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)
-
Damn, that's rather cool!
I love Future Composer songs, it's a great choice of module to show this off.
-
Old skool scroller :)
Nice :) :clap:
-
Thanks ... and yeah, FutureComposer really rocks.
-
Cool stuff.
-
Oldschool awesomness! :updance:
-
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
-
@rdc,Kirl, Dr.Death:
Thanks ;-) Glad you like it.
@Dr.Death:
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...
-
Nice stuff and thanks for the example! :)
-
This looks great. I'll try to find a way to use this.