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 ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different primitive data types used in actionscript?

789


what is the key advantage of using loadvars instead of loadvariables? : Adobe flash

834


what is the key advantage of flash being a true clientside application? : Adobe flash

852


what is the downside of macromedia ui components making extensive use of ingeritance and encapsulation? : Adobe flash

931


which methods is most likely an event handler? : Adobe flash

918


which two statements about device fonts are true? : Adobe flash

842


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

900


what are the properties can be used to control the order in which the user can tab through the elements in a flash movie? : Adobe flash

847


Write a program to create custom list in actionscript?

760


you are creating a project for the flashlite player. You are concerned with the processor capabilities of the device. Which graphic asset would require the most processing power on the player? : Adobe flash

790


which two textfield events can be captured to trigger scripts to run? : Adobe flash

896


to what does object drawing model refer? : Adobe flash

795


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

2525


you understand from the sb-25 manual that the built-in, retractable bounce card is meant for use with the flash head in a vertical position? : Adobe flash

788


where is the data pulled by a load variables function stored? : Adobe flash

863