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 the advantage of progressive video download? : Adobe flash

843


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

882


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

904


How many methods for depth are available?

884


what is generally considered the ideal group size for usability testing? : Adobe flash

866


you want to skin flash cs3 components. What should you do? : Adobe flash

929


what is the effect on the instances of a symbol if the symbol itself is changed? : Adobe flash

884


Can you explain what are the changes presented by actionscript?

904


Name the as3 components?

925


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

842


Write a program to create custom list in actionscript?

818


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

832


what is the best reason for using the geturl command, instead of the fscommand, when communicating with the host application? : Adobe flash

824


which two are symbol options when converting an object into a symbol? : Adobe flash

1150


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

857