A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: pop up audio player silencing page player

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Location
    C-Town California
    Posts
    20

    pop up audio player silencing page player

    I recently added a pop up player to my site, which pops up the audio player in a new window if you care to listen while navigating other pages (or want to listen without having the songs start over each time you change a page, because i'm working primarily html, and only using a flash player, so each time you load a new page it starts over). What i'm wondering is if there is some kind of global function that will have the media player on the page check if the pop up player is playing, and if it is, then not to start the audio. I'm not sure if that makes sense or not, but basically i want one audio player to be playing at a time, so you don't have songs clashing against each other.
    "And it will fall, hopefully on you."

  2. #2
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    What other player? If your using a pop up player in a new window, what other media player does it conflict with? If the other player is a flash movie, you could use the localConnection method to communicate between the movies and tell one to only play if the other is not. If the media player is something like windows media player or realplayer, you wont have control over those from a flash movie. You could probably write a javascript or vbscript function to communicate between the flash movie and the HTML page containing the media player that would be able to turn it on and off.

  3. #3
    Junior Member
    Join Date
    Jun 2004
    Location
    C-Town California
    Posts
    20
    sorry i realize i worded that bad. On my website, i have a media player embedded, its flash, but it also has the option of a pop up player, which opens the same player in a new window. Now, that's fine, because i make the sounds stop when you click to launch the pop up player, however if you change pages on my site, then the embedded player starts back up again, conflicting with the player opened in a new window. is that clearer?
    "And it will fall, hopefully on you."

  4. #4
    Junior Member
    Join Date
    Jun 2004
    Location
    C-Town California
    Posts
    20
    bump?
    "And it will fall, hopefully on you."

  5. #5
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    You could use a boolean variable to determine which player is supposed to be playing....

    myPopUp=false;

    Then from the button you launch the pop up player from.....

    myButton.onRelease=function(){
    myPopUp=true;
    }

    Then for the player embeded in the flash movie.......
    code:

    this.onEnterFrame=function(){
    if(myPopUp){
    //depending on how you have the player set up.
    mySound.stop();
    or maybe...
    _root.playerMC.gotoAndStop("off");
    }
    }


  6. #6
    Junior Member
    Join Date
    Jun 2004
    Location
    C-Town California
    Posts
    20
    thank you, sounds good, i'll give it a go.
    "And it will fall, hopefully on you."

  7. #7
    Junior Member
    Join Date
    Jun 2004
    Location
    C-Town California
    Posts
    20
    ok well, no luck. i think the problem is that everytime i change pages, the player reloads, and thus voids whatever was before. However, i didn't go into the _root thing much, but i'm not sure it would have helped. It needs to like go out and check if the player is open before it loads the songs....
    "And it will fall, hopefully on you."

  8. #8
    Art-by-Andy amorari's Avatar
    Join Date
    Dec 2004
    Location
    Orlando, Florida
    Posts
    151
    guitarcorey... did you ever find a solution to the audio player embedded in your html file reloading when the user clicks around? I'm trying to do the same thing. The player has to be in html so I want the audio to play from somewhere else. Any advice?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center