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 5940685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:00:10+00:00 2026-05-22T16:00:10+00:00

Here’s the challenge: I have a Flash movie which will be embedded in a

  • 0

Here’s the challenge: I have a Flash movie which will be embedded in a page using an unknown DOM ID that I want to be able to identify/store for callback in a JS function.

My ideal user flow would be:

  1. User clicks button in Flash.
  2. Flash pauses any animations / video / sounds / etc.
  3. Flash calls an injected JS function to display a page-covering overlay experience.
  4. When user closes overlay experience, a callback method on the Flash object is called.
  5. Flash resumes playback.

The problem is, when AS3 uses the ExternalInterface.call(“functionName”, args…) method, there doesn’t seem to be a DOM event triggered, and thus it is impossible to tell which object called a JS function, so having a “registerMe()” function doesn’t seem to work. Basically, the injected JS function has no way to determine which DOM object to call, because the ID of the Flash object is unknown.

[UPDATE]
It turns out, a SWF can determine its own url using loaderInfo.url. I’m passing that information to the script that launches the overlay experience so it can be stored for a future comparison against all application/x-shockwave-flash DOM objects. When a match is found, that is the calling SWF. Does anyone see a flaw in this logic? (I’m not nearly as proficient with JS as I am with AS)

  • 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-22T16:00:11+00:00Added an answer on May 22, 2026 at 4:00 pm

    The JavaScript function you are calling is being called manually, not as an event. It’s just like if you used the call or apply methods in JS.

    What you can do is pass the DOM name/ID of the active flash video as a parameter to the function you’re calling, so that it knows which DOM element to refer back to:

    ExternalInterface.call( 'functionName', arg1, arg2, ..., ExternalInterface.objectID );
    

    One “gotcha” with this method is that you need to make sure the object and/or embed elements have both their [id] and [name] attributes set, because ExternalInterface.objectID will be registered inconsistently across browsers.

    If I remember right, IE reads the [name] and ff/chrome/opera/safari read the [id], although I believe a couple browsers would fallback successfully to the [name]. I will need to do a test to confirm this.

    In any event, give an identical name and id and it should work fine (you’ll be able to select the element in the DOM just based on the ID).

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

Sidebar

Related Questions

Here's the problem....I have three components...A Page that contains a User Control and a
Here's the situation, i want to have a user that can enter time on
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Here is what I want to do. Use this HTML line and have the
Here's the setup - I have a view that lists products. On that same
Here's my situation. I have a DotNetNuke application. I want to link to an
Here is a scenario: User installs .NET application that you have made. After some
Here is my scenario. I have a website running under AppPool1 and that works
Here are the tables I have: Table A which has entries with item and
Here's the code I have. It works. The only problem is that the first

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.