Solved

Javascript message box from Flash

Posted on 2010-11-15
5
396 Views
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?
0
Comment
Question by:Arrow_1
  • 3
  • 2
5 Comments
 
LVL 14

Expert Comment

by:ali_kayahan
ID: 34139724
0
 
LVL 13

Author Comment

by:Arrow_1
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?
0
 
LVL 14

Accepted Solution

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

import flash.external.ExternalInterface;
myButton.addEventListener(MouseEvent.CLICK,function(e){
                  ExternalInterface.call("javascript_popup_function",'parameter for js function here');                                             
            });
0
 
LVL 13

Author Comment

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

Expert Comment

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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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)
The goal of the tutorial is to teach the user how to how to record live broadcast.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now