473,287 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Calling JavaScript from ActionScript

270 100+
Hello,
I'm beginner to actionscript, I've defined following function in script tag of page

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. function showMessage(){
  3.         alert("javascript says: Hello ActionScript");
  4. }
  5. </script>
i want to call it from actionscript,

what i've already wrote is:

Expand|Select|Wrap|Line Numbers
  1. import flash.external.ExternalInterface;
  2.  
  3. on (press) {
  4.     //mx.controls.Alert.show("Hello, world!");
  5.     ExternalInterface.call("showMessage()");
  6. }
neither it shows the alert, nor calls the showMessage function,

reply
May 19 '09 #1
2 4978
Don't you mean ExternalInterface.call("showMessage") instead of ExternalInterface.call("showMessage()") ?
May 20 '09 #2
NitinSawant
270 100+
Got it..

Thanks a million...
May 20 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steven | last post by:
Hello, I have a Javascript function which will get executed only when I click a Image Button on my aspx page (code behind - C#). C# InImgBut on click function --> {...
5
by: Krishna | last post by:
Hi all, Can i call my javascript functions from the web controls.Any appropriate site which will be tell more on this will be helpfull. Regards.., Krishna
10
by: Bishoy George | last post by:
// I wrote the following code but it is not working. // Any help please? // ------------------------------------------------ using System; using System.Collections; using System.ComponentModel;...
4
by: Martin Feuersteiner | last post by:
Dear Group I'm using VB to write an aspnet application. I would like to call a javascript function from within a VB Sub or VB Function, is it possible? My code is something like this: VB...
5
by: srini.venkatesan | last post by:
I am trying to call a javascript from Datagrid which is using OnUpdatecommand, I dont see update being invoked, what am I missing, Is it the right way to call. I have just cut and pasted only the...
8
by: wpelgrum | last post by:
When I open a webpage with javascript my browser (both IE6 and FF2.0.0.3) freezes anywhere from seconds to more than a minute. During that period, the browser is frozen and windows (XP-SP2) is very...
1
by: archcool | last post by:
hi iam new to php and i need help in my php file i have written php code and as well javascript code.the php code displays a form and i need to validate the fields present in the form calling a...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.