How to Communicate with JavaScript?



How to Communicate with JavaScript?..

Answer / 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

More Scripts AllOther Interview Questions

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

0 Answers  


What is URL Loader.?

1 Answers  


how do u define in ur build.xml If I need to execute a task before executing my task?

0 Answers  


What are the advantages and disadvantages of Descriptive programing and Object repository in QTP??

1 Answers   Impetus,


i a had secured second class in tenth and twelth and i secured first claas.can i apply for job

1 Answers   IBM,






How do you insert record into scripting using siebel crm

0 Answers   KPIT,


what is the Structure of an ANT file?

0 Answers  


what is the difference between 32 bit O.S n 64 bit O.S?

1 Answers  


How to Communicate with JavaScript?

1 Answers  


why do u need an ANT?

0 Answers  


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?

0 Answers   Nous,


I have deducted tds on pay slip for employees ist month tell me how to deposit this amt to govt. by bank or any form is available fill the same and deposit the govt. department. Pls explain me which form to be used for deposit the same with due date.

0 Answers  


Categories