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
in which level does the original movie resides? : Adobe flash
which of the following is not a result of exporting a movie for a debug build? : Adobe flash
which keyword is used to attach methods and properties to a class? : Adobe flash
How to add event listeners in mxml components. Name the as3 components?
can any one tell good training center for adobe flex in chennnai?
which of the assumptions cannot be made when developing an application for intranet deployment? : Adobe flash
which of the following is most likely a class constructor? : Adobe flash
what is default frame rate of the time line in frame per second? : Adobe flash
which method is best for removing an object(e.g.,Myobj) from memory? : Adobe flash
tell the difference between indexed array and associative array? : Adobe flash
How to create a logo using pen tool?
which of the following is not a typical host application for the flash player? : Adobe flash
What are the different ways in which the variables can be assigned?
Explain what are the changes presented by actionscript?
How to write a program to create custom list in actionscript?