Solved

Javascript message box from Flash

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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 goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

919 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

20 Experts available now in Live!

Get 1:1 Help Now