Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4112052
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:08:42+00:00 2026-05-20T22:08:42+00:00

Basically I created a simple mp3 player, and there are multiple copies of that

  • 0

Basically I created a simple mp3 player, and there are multiple copies of that embedded in a page. Now when I play one, I want all the others to pause…..any idea how to do this? is it possible to do n-way localconnection? or is there a better alternative?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:08:43+00:00Added an answer on May 20, 2026 at 10:08 pm

    ExternalInterface.call can be used to call JavaScript from a SWF and, vice-versa, ExternalInterface.addCallback can be used to expose certain methods to be called by JavaScript.

    For example, in each SWF, you might have:

    ExternalInterface.addCallback("externalStopAudio", stopAudio);
    
    // later..
    function stopAudio():void {
        // Code to stop audio
        _audioStream.stop(); 
    }
    
    function playAudio():void {
        // tell JS to stop all audio
        ExternalInterface.call("stopAllAudio");
        // play this players audio
        _audioStream.play();
    }
    

    And then in the JS that is part of the HTML containing the SWF:

    <script>
        // these references need to be actual pointers to the SWFs, this will vary 
        // depending on how you have it setup - might be SWFObject, Jquery, etc
        var a = [swf1, swf2, swf3];
    
        // called by SWF
        function stopAllAudio() {
            // called to SWF
            for(var i = 0; i < a.length; i++) {
                 a[i].externalStopAudio();
            }
        }
    
    </script>
    

    Depending on security settings/domain placement, you may need the following:

    In HTML:

    <param name="allowScriptAccess" value="always" />
    

    In SWF:

    flash.system.Security.allowDomain(sourceDomain)
    

    See: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html#addCallback%28%29

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a simple demo here that demonstrates the problem: http://jsfiddle.net/boblauer/eCugY/ Basically, I want
Created a simple WCF service that basically logs to a db. the build is
basically I want to encapsulate a simple component from code that I already have.
I basically created some tables to play around with: I have Two main tables,
I created a native Android app that basically hosts a webView control. That webView
Basically, I have created a custom control that uses an UpdatePanel, and as I
Basically, I have a model where I've created a superclass that many other classes
Basically it breaks down like this: A master template page is loaded when one
I've created a simple KML file that works in the standalone Google Earth client,
I have created an Ajax enabled WCF web service that contains this simple method:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.