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
what are the statements best describes an event handler? : Adobe flash
is everyone required flash player plugin? : Adobe flash
Do you know what is the difference between an array and vector?
How to add event listeners in mxml components. Name the as3 components?
How to add event listeners in mxml components.
which two textfield events can be captured to trigger scripts to run? : Adobe flash
Explain what are the differences between javascript and actionscript?
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
Write a program use a text field and display it using the actionscript?
at which point can you start usability testing? : Adobe flash
What are the different primitive data types used in actionscript?
Give an example that illustrates polymorphism in flash script.
which is an advantage of selecting a flash player version in publish settings before beginning a project? : Adobe flash
Tell me what is the main purpose of actionscript?
where to start the adobe flash? : Adobe flash