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
Tell me what are the different ways in which the variables can be assigned?
Do you know what are the different primitive data types used in actionscript?
What are the changes presented by actionscript?
Explain what are the features provided by actionscript 3.0?
How to add event listeners in mxml components.
which actionscript classes are used to play flv formatted video? : Adobe flash
How many methods for depth are available?
which items cannot be hidden from screen readers? : Adobe flash
How to play a movie clip?
when does the accessibility . Isactive () method return true? : Adobe flash
Tell me what are the features involved in updating a language?
How to add conditional logic for the submit button?
which methods is most likely an event handler? : Adobe flash
what are the statements best describes an event handler? : Adobe flash
Why is flash being discontinued?