• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 414
  • Last Modified:

Javascript message box from Flash

I need to generate a popup message box from a Flash movie. Currently it seems this must be done through javascript if I'd like it to actually be separate from the Flash movie. I need the popup to display a yes/no prompt and report the response back to the Flash movie. Can this be done? If so, how?
0
Aaron Feledy
Asked:
Aaron Feledy
  • 3
  • 2
1 Solution
 
Ali KayahanFull Stack DeveloperCommented:
0
 
Aaron FeledyDrupal Developer and ConsultantAuthor Commented:
Ok, using that I can have javascript create the popup when the page loads, but how can I have Flash trigger that popup instead?
0
 
Ali KayahanFull Stack DeveloperCommented:
Easy , from flash ;

import flash.external.ExternalInterface;
myButton.addEventListener(MouseEvent.CLICK,function(e){
                  ExternalInterface.call("javascript_popup_function",'parameter for js function here');                                             
            });
0
 
Aaron FeledyDrupal Developer and ConsultantAuthor Commented:
Can I make this work in AS2?
0
 
Ali KayahanFull Stack DeveloperCommented:
it should also work for as2 except button event listening just trigger ExternalInterface line from as2
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now