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 / satyendra dewangan

Using getURL method in AS 2.0..we can possibly call
javascript function..

Syntax:-

getURL("javascript:weightMIN('"+argument+"');");


If you want to call javascript function:-

function weightMIN(val){

alert(val);
}


OR

You can use also ExternalInterface class in flash AS 2.0..
import flash.external.*;

var methodName:String = "goHome";
var instance:Object = null;
var method:Function = goToAdobe;
var wasSuccessful:Boolean =
ExternalInterface.addCallback(methodName, instance, method);

var txtField:TextField = this.createTextField("txtField",
this.getNextHighestDepth(), 0, 0, 200, 50);
txtField.border = true;
txtField.text = wasSuccessful.toString();

function goToAdobe() {
txtField.text = "http://www.adobe.com";
getURL("http://www.adobe.com", "_self");
}

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

in which level does the original movie resides? : Adobe flash

832


which of the following is not a result of exporting a movie for a debug build? : Adobe flash

932


which keyword is used to attach methods and properties to a class? : Adobe flash

938


How to add event listeners in mxml components. Name the as3 components?

877


can any one tell good training center for adobe flex in chennnai?

2571


which of the assumptions cannot be made when developing an application for intranet deployment? : Adobe flash

855


which of the following is most likely a class constructor? : Adobe flash

871


what is default frame rate of the time line in frame per second? : Adobe flash

970


which method is best for removing an object(e.g.,Myobj) from memory? : Adobe flash

965


tell the difference between indexed array and associative array? : Adobe flash

966


How to create a logo using pen tool?

966


which of the following is not a typical host application for the flash player? : Adobe flash

925


What are the different ways in which the variables can be assigned?

943


Explain what are the changes presented by actionscript?

817


How to write a program to create custom list in actionscript?

884