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
Can you explain what are the differences between javascript and actionscript?
What are the different ways in which the variables can be assigned?
what is flash tweening? : Adobe flash
who can create flash movies? : Adobe flash
Hat are the differences between javascript and actionscript?
What is the use of pre-loader?
which of the following is not a typical host application for the flash player? : Adobe flash
Explain what are the features provided by actionscript 3.0?
Hello! I would like to learn the technique (I don't know if there is a name for it) used by Stu Campbell (a.k.a. Sutu) in his flash comic book Nawlz for animating the image of whale in episode one. The the three tutorials that the artist made explain the basic scenario of the working process but they do not at all go into coding and such.
What are the ways in which actionscript's code can be protected?
what is the primary difference between the xml.sendandload method and the xml.load method? : Adobe flash
How to add event listeners in mxml components. Name the as3 components?
What is the main purpose of actionscript?
which keyword is used to attach methods and properties to a class? : Adobe flash
Write a program use a text field and display it using the actionscript?