tagnu
01-24-2009, 10:19 AM
Hi all,
I have an mp3 file of 50 MB size, which has 4 songs combined.
For example, song1 plays from 00:00:00 (hour:minute:seconds) to 00:05:00 and other songs in the following order.
00:05:01 - 00:10:00 - Song2
00:10:01 - 00:14:00 - Song3
00:14:01 - 00:20:00 - Song4
What I'm looking for is to load the each songs separately.
Say, just to load Song 3 from 00:10:01 - 00:14:00, I use the following code.
var test_sound:Sound = new Sound();
test_sound.loadSound("http://localhost/test/combined-songs.mp3",true);
test_sound.onLoad = function ():Void{
test_sound.start(600);
};
The problem is, it loads everything and then plays from the 600th second.
But if I remove the onLoad event and make it like:
var test_sound:Sound = new Sound();
test_sound.loadSound("http://localhost/test/combined-songs.mp3",true);
//test_sound.onLoad = function ():Void{
test_sound.start(600);
//};
it doesn't skip the first part :(
Is there a way to load only the required data?
Thank you.
I have an mp3 file of 50 MB size, which has 4 songs combined.
For example, song1 plays from 00:00:00 (hour:minute:seconds) to 00:05:00 and other songs in the following order.
00:05:01 - 00:10:00 - Song2
00:10:01 - 00:14:00 - Song3
00:14:01 - 00:20:00 - Song4
What I'm looking for is to load the each songs separately.
Say, just to load Song 3 from 00:10:01 - 00:14:00, I use the following code.
var test_sound:Sound = new Sound();
test_sound.loadSound("http://localhost/test/combined-songs.mp3",true);
test_sound.onLoad = function ():Void{
test_sound.start(600);
};
The problem is, it loads everything and then plays from the 600th second.
But if I remove the onLoad event and make it like:
var test_sound:Sound = new Sound();
test_sound.loadSound("http://localhost/test/combined-songs.mp3",true);
//test_sound.onLoad = function ():Void{
test_sound.start(600);
//};
it doesn't skip the first part :(
Is there a way to load only the required data?
Thank you.