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

if we set slow sync as you suggest in answers on the many online forums you visit, would not we be opening ourselves up to blurred shots when the shutter speed gets significantly below 1/60? : Adobe flash

852


which of the external actionscript files must you #include in your movie in order to use flash remoting? : Adobe flash

794


which statement best describes what the #initclip num and #endinitclip commands indicate? : Adobe flash

864


in general, non-mp3 digital audio destined to be imported into the flash mx authoring environment should first be compressed how much? : Adobe flash

795


which of the following is not a guideline for conducting effective usability testing? : Adobe flash

834


What are the features provided by actionscript 3.0?

832


Hi All, I am new in flash so please help me, When I make a website on Flash & when we wright code on buttons in AS2[CODE: on(release) gotoAndStop ()], we found when we click twice on a button the page automatically switch. (means, code do not work properly). Thanks,

2269


what is the purpose of the break statement? : Adobe flash

975


Give an example that illustrates polymorphism in flash script.

891


explain the flash vs. Animated images and java applets? : Adobe flash

852


Why is flash being discontinued?

831


which text anti-aliasing property setting will result in the smallest swf file size? : Adobe flash

816


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

2510


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

919


the f601/n6006 had a special control to set the fill-flash option on the body; is there a similar way to set fill levels on the f90x/n90s and sb-28 combo? : Adobe flash

801