Skip to content

Commit f4f5241

Browse files
committed
import Flod 4.1
0 parents  commit f4f5241

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+15859
-0
lines changed

demos/Demo1.as

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
Flod 4.1
3+
2012/04/30
4+
Christian Corti
5+
Neoart Costa Rica
6+
7+
Last Update: Flod 4.0 - 2012/03/10
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
10+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
11+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
12+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13+
14+
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
15+
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to
16+
Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
17+
18+
---
19+
20+
This is a simple demo showing how to use the FileLoader class to play a module, in any of the supported
21+
formats, loaded from the client.
22+
23+
*/
24+
package {
25+
import flash.display.*;
26+
import flash.events.*;
27+
import flash.net.*;
28+
import neoart.flod.*;
29+
import neoart.flod.core.*;
30+
31+
public final class Demo1 extends Sprite {
32+
private var
33+
file : FileReference,
34+
loader : FileLoader,
35+
player : CorePlayer;
36+
37+
public function Demo1() {
38+
loader = new FileLoader();
39+
40+
stage.addEventListener(MouseEvent.CLICK, function(e:MouseEvent):void {
41+
file = new FileReference();
42+
file.addEventListener(Event.CANCEL, cancelHandler);
43+
file.addEventListener(Event.SELECT, selectHandler);
44+
file.browse();
45+
});
46+
}
47+
48+
private function cancelHandler(e:Event):void {
49+
file.removeEventListener(Event.CANCEL, cancelHandler);
50+
file.removeEventListener(Event.SELECT, selectHandler);
51+
}
52+
53+
private function selectHandler(e:Event):void {
54+
cancelHandler(e);
55+
if (player) player.stop();
56+
file.addEventListener(Event.COMPLETE, completeHandler);
57+
file.load();
58+
}
59+
60+
private function completeHandler(e:Event):void {
61+
file.removeEventListener(Event.COMPLETE, completeHandler);
62+
player = loader.load(file.data);
63+
if (player && player.version) player.play();
64+
}
65+
}
66+
}

demos/Demo2.as

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/*
2+
Flod 4.1
3+
2012/04/30
4+
Christian Corti
5+
Neoart Costa Rica
6+
7+
Last Update: Flod 4.0 - 2012/03/10
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
10+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
11+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
12+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13+
14+
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
15+
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to
16+
Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
17+
18+
---
19+
20+
This is a simple demo showing how to use a single player to play a module loaded from the client.
21+
22+
List of available players and include locations:
23+
24+
D1Player Delta Music 1.0 neoart.flod.deltamusic
25+
D2Player Delta Music 2.0 neoart.flod.deltamusic
26+
DMPlayer Digital Mugician neoart.flod.digitalmugician
27+
F2Player FastTracker II XM neoart.flod.fasttracker
28+
FEPlayer FredEd neoart.flod.fred
29+
FCPlayer Future Composer neoart.flod.futurecomposer
30+
JHPlayer Jochen Hippel neoart.flod.hippel
31+
RHPlayer Rob Hubbard neoart.flod.hubbard
32+
S1Player SidMON neoart.flod.sidmon
33+
S2Player SidMON II neoart.flod.sidmon
34+
FXPlayer SoundFX neoart.flod.soundfx
35+
BPPlayer SoundMon neoart.flod.soundmon
36+
HMPlayer His Master's NoiseTracker neoart.flod.trackers
37+
MKPlayer NoiseTracker neoart.flod.trackers
38+
PTPlayer ProTracker neoart.flod.trackers
39+
STPlayer Ultimate Soundtracker neoart.flod.trackers
40+
DWPlayer David Whittaker neoart.flod.whittaker
41+
*/
42+
package {
43+
import flash.display.*;
44+
import flash.events.*;
45+
import flash.net.*;
46+
import neoart.flod.core.*;
47+
import neoart.flod.fasttracker.*;
48+
49+
public final class Demo2 extends Sprite {
50+
private var
51+
file : FileReference,
52+
player : F2Player;
53+
54+
public function Demo2() {
55+
player = new F2Player();
56+
57+
stage.addEventListener(MouseEvent.CLICK, function(e:MouseEvent):void {
58+
file = new FileReference();
59+
file.addEventListener(Event.CANCEL, cancelHandler);
60+
file.addEventListener(Event.SELECT, selectHandler);
61+
file.browse();
62+
});
63+
}
64+
65+
private function cancelHandler(e:Event):void {
66+
file.removeEventListener(Event.CANCEL, cancelHandler);
67+
file.removeEventListener(Event.SELECT, selectHandler);
68+
}
69+
70+
private function selectHandler(e:Event):void {
71+
cancelHandler(e);
72+
player.stop();
73+
file.addEventListener(Event.COMPLETE, completeHandler);
74+
file.load();
75+
}
76+
77+
private function completeHandler(e:Event):void {
78+
file.removeEventListener(Event.COMPLETE, completeHandler);
79+
player.load(file.data);
80+
if (player.version) player.play();
81+
}
82+
}
83+
}

demos/Demo3.as

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
Flod 4.1
3+
2012/04/30
4+
Christian Corti
5+
Neoart Costa Rica
6+
7+
Last Update: Flod 4.0 - 2012/03/10
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
10+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
11+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
12+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13+
14+
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
15+
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to
16+
Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
17+
18+
---
19+
20+
This is a simple demo showing how to use the FileLoader class to play a module, in any of the supported
21+
formats, with an embedded module.
22+
23+
*/
24+
package {
25+
import flash.display.*;
26+
import flash.utils.*;
27+
import neoart.flod.*;
28+
import neoart.flod.core.*;
29+
30+
public final class Demo3 extends Sprite {
31+
[Embed(source="filename.mod", mimeType="application/octet-stream")]
32+
33+
private var
34+
Song : Class,
35+
loader : FileLoader,
36+
player : CorePlayer;
37+
38+
public function Demo3() {
39+
loader = new FileLoader();
40+
player = loader.load(new Song() as ByteArray);
41+
if (player && player.version) player.play();
42+
}
43+
}
44+
}

demos/Demo4.as

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
Flod 4.1
3+
2012/04/30
4+
Christian Corti
5+
Neoart Costa Rica
6+
7+
Last Update: Flod 4.0 - 2012/03/10
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
10+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
11+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
12+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13+
14+
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
15+
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to
16+
Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
17+
18+
---
19+
20+
This is a simple demo showing how to use a single player to play an embedded module.
21+
22+
List of available players and include locations:
23+
24+
D1Player Delta Music 1.0 neoart.flod.deltamusic
25+
D2Player Delta Music 2.0 neoart.flod.deltamusic
26+
DMPlayer Digital Mugician neoart.flod.digitalmugician
27+
F2Player FastTracker II XM neoart.flod.fasttracker
28+
FEPlayer FredEd neoart.flod.fred
29+
FCPlayer Future Composer neoart.flod.futurecomposer
30+
JHPlayer Jochen Hippel neoart.flod.hippel
31+
RHPlayer Rob Hubbard neoart.flod.hubbard
32+
S1Player SidMON neoart.flod.sidmon
33+
S2Player SidMON II neoart.flod.sidmon
34+
FXPlayer SoundFX neoart.flod.soundfx
35+
BPPlayer SoundMon neoart.flod.soundmon
36+
HMPlayer His Master's NoiseTracker neoart.flod.trackers
37+
MKPlayer NoiseTracker neoart.flod.trackers
38+
PTPlayer ProTracker neoart.flod.trackers
39+
STPlayer Ultimate Soundtracker neoart.flod.trackers
40+
DWPlayer David Whittaker neoart.flod.whittaker
41+
*/
42+
package {
43+
import flash.display.*;
44+
import flash.events.*;
45+
import flash.utils.*;
46+
import neoart.flod.core.*;
47+
import neoart.flod.fred.*;
48+
49+
public final class Demo4 extends Sprite {
50+
[Embed(source="filename.mod", mimeType="application/octet-stream")]
51+
52+
private var
53+
Song : Class,
54+
player : FEPlayer;
55+
56+
public function Demo4() {
57+
player = new FEPlayer();
58+
player.load(new Song() as ByteArray);
59+
if (player.version) player.play();
60+
}
61+
}
62+
}

demos/Demo5.as

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
Flod 4.1
3+
2012/04/30
4+
Christian Corti
5+
Neoart Costa Rica
6+
7+
Last Update: Flod 4.0 - 2012/03/10
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
10+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
11+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
12+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13+
14+
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
15+
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to
16+
Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
17+
18+
---
19+
20+
This is a simple demo showing how to use the FileLoader class to play a module, in any of the supported
21+
formats, loaded from the server.
22+
23+
Warning: the server must be able to handle the correct file extension, if it can't just rename the file
24+
to filename.wav and it should work...
25+
*/
26+
package {
27+
import flash.display.*;
28+
import flash.events.*;
29+
import flash.net.*;
30+
import neoart.flod.*;
31+
import neoart.flod.core.*;
32+
33+
public final class Demo5 extends Sprite {
34+
private var
35+
url : URLLoader,
36+
loader : FileLoader,
37+
player : CorePlayer;
38+
39+
public function Demo5() {
40+
loader = new FileLoader();
41+
42+
url = new URLLoader();
43+
url.dataFormat = URLLoaderDataFormat.BINARY;
44+
url.addEventListener(Event.COMPLETE, completeHandler);
45+
url.load(new URLRequest("filename.mod"));
46+
}
47+
48+
private function completeHandler(e:Event):void {
49+
url.removeEventListener(Event.COMPLETE, completeHandler);
50+
player = loader.load(url.data);
51+
if (player && player.version) player.play();
52+
}
53+
}
54+
}

demos/Demo6.as

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
Flod 4.1
3+
2012/04/30
4+
Christian Corti
5+
Neoart Costa Rica
6+
7+
Last Update: Flod 4.0 - 2012/03/10
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
10+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
11+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
12+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13+
14+
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
15+
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to
16+
Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
17+
18+
---
19+
20+
This is a simple demo showing how to use a single player to play a module loaded from the server.
21+
22+
List of available players and include locations:
23+
24+
D1Player Delta Music 1.0 neoart.flod.deltamusic
25+
D2Player Delta Music 2.0 neoart.flod.deltamusic
26+
DMPlayer Digital Mugician neoart.flod.digitalmugician
27+
F2Player FastTracker II XM neoart.flod.fasttracker
28+
FEPlayer FredEd neoart.flod.fred
29+
FCPlayer Future Composer neoart.flod.futurecomposer
30+
JHPlayer Jochen Hippel neoart.flod.hippel
31+
RHPlayer Rob Hubbard neoart.flod.hubbard
32+
S1Player SidMON neoart.flod.sidmon
33+
S2Player SidMON II neoart.flod.sidmon
34+
FXPlayer SoundFX neoart.flod.soundfx
35+
BPPlayer SoundMon neoart.flod.soundmon
36+
HMPlayer His Master's NoiseTracker neoart.flod.trackers
37+
MKPlayer NoiseTracker neoart.flod.trackers
38+
PTPlayer ProTracker neoart.flod.trackers
39+
STPlayer Ultimate Soundtracker neoart.flod.trackers
40+
DWPlayer David Whittaker neoart.flod.whittaker
41+
*/
42+
package {
43+
import flash.display.*;
44+
import flash.events.*;
45+
import flash.net.*;
46+
import neoart.flod.core.*;
47+
import neoart.flod.sidmon.*;
48+
49+
public final class Demo6 extends Sprite {
50+
private var
51+
url : URLLoader,
52+
player : S1Player;
53+
54+
public function Demo6() {
55+
player = new S1Player();
56+
57+
url = new URLLoader();
58+
url.dataFormat = URLLoaderDataFormat.BINARY;
59+
url.addEventListener(Event.COMPLETE, completeHandler);
60+
url.load(new URLRequest("filename.mod"));
61+
}
62+
63+
private function completeHandler(e:Event):void {
64+
url.removeEventListener(Event.COMPLETE, completeHandler);
65+
player.load(url.data);
66+
if (player.version) player.play();
67+
}
68+
}
69+
}

0 commit comments

Comments
 (0)