Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to Communicate with JavaScript?

Answer Posted / dindayal dhakar

1. In previous versions of Flash, JavaScript communication
was done via fscommand. This was a buggy and complex
technology. In fact, it was so bad that most developers
actually preferred to put their JavaScript function calls
inside the getURL function. This got the job done, but was
far from ideal.
2. Flash 8 introduces a ground-breaking new way to
integrate Flash with its host called the External
Interface. This allows Flash/JavaScript integration to be
more powerful and stable. It is also very easy to use.
External Interface offers Flash 8 Developers the following
advantages: it's easier to implement, it allows for
synchronous communication, and it supports sending a wider
selection of data types, including objects.
3. Fscommand didn't allow for synchronous communication.

4. The External Interface allows you to call a JavaScript
function and receive a return value.
5. Fscommand allowed you to send primitive data types as
arguments in the function calls. Now, with External
Interface, you can send complex objects as arguments. In
example 2 below, we are passing the entire
system.capabilities object back to JavaScript.

<script language="JavaScript">
function getLocation() {
return window.location.toString();
}
</script>

import flash.external.ExternalInterface;
function displayPageLocation():Void {
locationDisplay.text = ExternalInterface.call
("getLocation");
}
locationButton.addEventListener("click",
mx.utils.Delegate.create(this,
displayPageLocation));

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Need a batch file or VB script to delete old (more than 90datys) roaming profiles

2258


I Am Planning to Write ISTQB foundation level Ceritification of inida. can Any Body let me know how to prepare for it & Any Study material can you provide or Any other E-books i should need to Study. Please Mail to me ajaybe_2004@yahoo.co.in THnaks in advance Ajay

2165


What is the procedure for installing USP-35 on my compure?

2068


We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

2632


how can we move to the next column in excel sheet in file operation using descriptive programming inQTP?

2190


Why we use Action Script(Multimedia Flash) rather than using other scripting languages (JAVA,VB...etc) ?

2759


what is the Structure of an ANT file?

2242


Someone who protect my excel file, m using ms office 2007 and windows 7 operating system, pls help me, how can i unprotect sheet

2244


why script is client dependant.

2393


how can i get two different fonts in a single line

1943


How can you convert QTP 8.2 scripts to QTP 9.2. Please give some inputs ASAP.

2780


How do you insert record into scripting using siebel crm

5482


how do invoke OS task through ANT?

2651


In sap script, created 1 form but when its went to production system , client want some changes in 1 (ex - addrss) window, what we will do?

1463


If we add regular expressions to a script recorded in QTP, will it effect the performance of the script?

2139