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
Write a function for a button.
Which is the quickest way to make the stroke around an oval shape into a dotted line? : Adobe flash
which code should be added to create a second blue square to the right of the first? : Adobe flash
How to add an effect to the movie clip?
Tell me what are the different ways in which the variables can be assigned?
explain the correct way to create an alert box using geturl and javascript? : Adobe flash
which items cannot be hidden from screen readers? : Adobe flash
what methods are used to pass variables out of flash to a server side solution? : Adobe flash
How to play a movie clip?
How to write a program use a text field and display it using the actionscript?
what is not a benefit of using macromedias pre-built ui components? : Adobe flash
What is meant by vector graphic animation? What is the use of pre-loader?
you have a rectangle shape with rounded corners. You want to ensure that the corners do not distort when the rectangle is scaled. What should you do? : Adobe flash
Explain what are the differences between javascript and actionscript?
you want to create a rectangle shape with a defined corner radius. Which tool should you use? : Adobe flash