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 is generally considered the ideal group size for usability testing? : Adobe flash

768


Differentiate between as2 and as3.

913


What will replace flash in 2020?

819


what is the primary difference between the xml.sendandload method and the xml.load method? : Adobe flash

723


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

2473


Write a program use a text field and display it using the actionscript?

749


where to start the adobe flash? : Adobe flash

823


Explain what does the void function and object contain in actionscript?

801


What is the use of pre-loader?

905


How to add an effect to the movie clip?

808


when should one generally use the post method instead of the get method? : Adobe flash

828


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

774


to what does object drawing model refer? : Adobe flash

761


you have a rectangle shape with rounded corners. You want to ensure that the corners do not distort when the rectangle is scaled. What should you do? : Adobe flash

870


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

781