Skip to main content
Known Participant
August 29, 2010
Question

problem with mute/pause sound on multi audio players in one page

  • August 29, 2010
  • 1 reply
  • 990 views

hello guys. im using this player http://activeden.net/item/background-music-button/28370 for my site and i am also using http://activeden.net/item/advanced-mp3-player-resizeable-paypal-support/full_screen_preview/111963 i have 2 instances of advanced player in one page and the backround player. I want to pause the other players when one of the 2 advanced players are playing, something like that: if myadvancedmp3player1 is playing (if i press the play button), pause myadvancedmp3player2 and pause backround_music. if myadvancedmp3player2 is playing, pause myadvancedmp3player1 and pause backround_music

i have try those codes inside the players:
myplayer.onPress=function() {
myplayer2.pauseSound();
}
on (press) {
myplayer2.pauseSound();
}
but it didnt work, then i try this:
myplayer.loadConfig("mysongs.xml");
myplayer2.loadConfig("othersongs.xml");
myplayer.onPress=function() {
{
myplayer2.pauseSound();
}
and it works but myplayer is not functionable any more, is there any more specific way to do this? for example
myplayer.playbutton.onpress? where and how i can find tthe supported functions that i can call?  te backround player has a file in the files that called AC_RunActiveContent.js and the advanced player swfobject.js. are those functions somewhere in there?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
August 30, 2010

there's no problem controlling more than one sound in as2 independently of the others as long as you use distinct movieclips to create your sound instances:

var s1:Sound=new Sound(mc1);

var s2:Sound=new Sound(mc2);

Known Participant
August 30, 2010

mc1 and mc2 are the name of the instances of the advanced mp3 players? this code i will put in on the keyframe that my players appear?

kglad
Community Expert
Community Expert
August 30, 2010

no, those are movieclips.

you need to find where the sound instances are created in your mp3 players so you can edit it.