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
which is an advantage of selecting a flash player version in publish settings before beginning a project? : Adobe flash
Explain what does the void function and object contain in actionscript?
Write a function for a button.
which methods is most likely an event handler? : Adobe flash
what happens if an .swf is loaded into a already occupied level? : Adobe flash
How to play a movie clip?
Do you know how does removal of actual objects and data work in actionscript?
can any one tell good training center for adobe flex in chennnai?
a button instance is named circle_btn. Actionscript is placed on the main timeline so that the button is clicked a movie clip instance named rec_mc s width is changed to 100? : Adobe flash
what is vector graphic animation? : Adobe flash
what is the effect on the instances of a symbol if the symbol itself is changed? : Adobe flash
Tell me what are the features involved in updating a language?
which items cannot be hidden from screen readers? : Adobe flash
How to add event listeners in mxml components. Name the as3 components?
what are the correct statements consenting text field? : Adobe flash