ive done a little media player for my mates website.means i didnt understand the xml and loading audio that way i decided to try another way,which was to load external .swf which contained audio.so ive done this everything working.the problem is i tried to add a timer, so that when the 30 sec sample was done it would go to the next frame which loads a different track.i found a piece of timer code which is
[color=#000000][color=#0000bb] loadMovieNum[/color][color=#007700]([/color][color=#dd0000]“track2.swf”[/color][color=#007700], [/color][color=#0000bb]1[/color][color=#007700]);
if ([/color][color=#0000bb]bytes_loaded [/color][color=#007700]== [/color][color=#0000bb]bytes_total[/color][color=#007700]) {
var [/color][color=#0000bb]time [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700];
[/color][color=#0000bb]timer [/color][color=#007700]= function(){
[/color][color=#0000bb]time[/color][color=#007700]++;
if([/color][color=#0000bb]time [/color][color=#007700]== [/color][color=#0000bb]30[/color][color=#007700]){
[/color][color=#0000bb]clearInterval[/color][color=#007700]([/color][color=#0000bb]run[/color][color=#007700]);
[/color][color=#0000bb]nextFrame[/color][color=#007700]();
};
};
}
var [/color][color=#0000bb]run [/color][color=#007700]= [/color][color=#0000bb]setInterval[/color][color=#007700]([/color][color=#0000bb]timer[/color][color=#007700], [/color][color=#0000bb]1000[/color][color=#007700]);
[/color][color=#0000bb]stop[/color]color=#007700;
It all works first time around but when you select the track again then it cuts out 20-25 seconds,I posted this on another forum and was told to put it within a onenterframe statement.but it didnt work :crying: … any ideas thanx…
[/color][/color]