Skip navigation
DjBSBG
Currently Being Moderated

Re: How can make mp3 player stop after playing next one?

Feb 17, 2013 5:06 PM

Tags: #automatically #after #stop #player #mp3 #starting #other

Hi! I make one personal web site with mp3 player. So i list songs in table with about 20-30 players on page.

I want when player1 works and when player2 start playing, than player1 must stop. And that must be for all players (like soundcloud).

 

And also, how can i make when the song from player1 finish to start player2 automaticlly?

 

This is the code (for all players is same except the id number):

<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript">

                              var flashvars = {};

                              flashvars.repeat="0";

                              flashvars.playerID="player1";

                              flashvars.mp3path="melz.mp3";

                              var params = {};

                              var attributes = {};

                              attributes.id = "player1";

                              swfobject.embedSWF("s5_mp3_player.swf", "player1", "500", "30", "9.0.0", true, flashvars, params, attributes);

</script>

<div id="players_wrapper">

  <div id="player1"> <a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" /> </a> </div><br/><br/>

</div>

 
Replies
  • Currently Being Moderated
    Feb 18, 2013 12:22 AM   in reply to DjBSBG

    You will have to use LocalConnection if the two swf-players don`t share a common parent-swf. A good example can be found here (Q4).

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 18, 2013 5:07 AM   in reply to DjBSBG

    It`s a bit difficult to understand what you have in mind

    So i list songs in table with about 20-30 players on page.

    Does that really mean you plan to have 20-30 mp3 players on stage? Or do you mean one player with 20-30 songs?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 18, 2013 5:20 AM   in reply to DjBSBG

    I reeally didn't understand a lot from java :/

    I´m not talking about java, but of Actionscript 3. If you have no programming experience and can`t understand the solution I linked to in my first document, this task will be too difficult for you, trust me. It`s not worth the effort to learn  all that for the only reason of

    I make one personal web site

    I also can`t imagine that anyone has already made an off-the-shelf- solution to control 20-30 mp3 players in the same application. The requirements are a bit......exotic. Sorry

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 18, 2013 5:38 AM   in reply to DjBSBG

    Could you show a screenshot of soundcloud.com? I don`t want to create an account simply to get an impression, why they would embed multiple players

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 18, 2013 6:10 AM   in reply to DjBSBG

    To achieve sth like this it would probably be the easiest way to adjust an example like this to your needs.

    It shows how a swf sends a message to the Browsers javascript.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points