Javascript message box from Flash

Posted on 2010-11-15
Last Modified: 2012-06-27
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?
Question by:Arrow_1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 14

Expert Comment

ID: 34139724
LVL 13

Author Comment

ID: 34140264
Ok, using that I can have javascript create the popup when the page loads, but how can I have Flash trigger that popup instead?
LVL 14

Accepted Solution

ali_kayahan earned 500 total points
ID: 34140652
Easy , from flash ;

import flash.external.ExternalInterface;
        "javascript_popup_function",'parameter for js function here');                                             
LVL 13

Author Comment

ID: 34141186
Can I make this work in AS2?
LVL 14

Expert Comment

ID: 34141253
it should also work for as2 except button event listening just trigger ExternalInterface line from as2

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In my daily work (mainly using, I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question