PROGRAMMING > Other languages

[Flash] FlodEx Example

(1/2) > >>

benny!:


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: ---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...

}
}

--- End code ---

Download FlodEx library at :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

Shockwave:
Damn, that's rather cool!

I love Future Composer songs, it's a great choice of module to show this off.

Hotshot:
Old skool scroller :)

Nice :)  :clap:

benny!:
Thanks ... and yeah, FutureComposer really rocks.

rdc:
Cool stuff.

Navigation

[0] Message Index

[#] Next page

Go to full version