1 Reply Latest reply on Feb 28, 2007 5:14 AM by Pal_w_G

    Skip Track

      Well, after altering my music player so it plays through 1 frame instead of 1 frame plays 1 track and so on. I'm having a problem now with how to skip tracks.

      Previously i would skip tracks by simply having a button direct to the next frame, but now i have the actionscript so 1 song plays after the other i'm a bit stuck.

      The best idea i can come up with is to use CASE statments and then have an IF statment on the skip button to make it select the next track(case).

      or is it possible to direct actionscript to specific lines of actionscript?

      Anyone got any better/easier ways of inplementing this?


        • 1. Re: Skip Track
          When you built any mp3 or sound player .....we keep all the mp3 track name and path in an external XML file......you load the xml file through flash's xml object then parse it and store the relative paths in an array.....we search the array depending on the paths or any predefined id..... and play or load the sound....

          using xml has number of advantages .... major is you need to edit your code ... when you want to change or add songs....... you only have to change the external xml.....

          any way you can store your songs in an array .... inside the flash and loop through it .... retrieve the file you want to play.....

          the only way to execute any specific line of code is to put it inside a function and then call that function from the place you want.