Solved

Javascript message box from Flash

Posted on 2010-11-15
5
402 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

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.

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

820 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