3 Replies Latest reply on Oct 3, 2007 9:25 AM by clbeech

    Please help; next btn and onSoundComplete()

    Boxing Boom Level 1

      Can someone help me form tearing out any more hair? The following code should work but it is not, it should play the next song:

      this.sound_obj.onSoundComplete = function(){
      (song_nr==songfile.length-1)?_global.song_nr=0 : _global.song_nr++;
      _root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);

      I have it also attached to a Next button, as follows;

      next_btn.onRelease = function(){
      (song_nr == songfile.length+1) ? _global.song_nr=0 : _global.song_nr++;
      _root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);

      The XML code is as follows;

      ?xml version='1.0' encoding='utf-8'?>
      <song name="i-tuts" file="ituts_track.mp3" ><song />
      <song name="test2" file="test2.mp3" ><song />

      Any help, will greatly reduce hair loss ;)

      Boxing Boom