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
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
you want to skin flash cs3 components. What should you do? : Adobe flash
Can you explain what does the void function and object contain in actionscript?
What are the different primitive data types used in actionscript?
How many methods for depth are available?
what is not a benefit of using macromedias pre-built ui components? : Adobe flash
Can you explain what are the differences between javascript and actionscript?
which text anti-aliasing property setting will result in the smallest swf file size? : Adobe flash
when should one generally use the post method instead of the get method? : Adobe flash
Write a program use a text field and display it using the actionscript?
Hi All, I am new in flash so please help me, When I make a website on Flash & when we wright code on buttons in AS2[CODE: on(release) gotoAndStop ()], we found when we click twice on a button the page automatically switch. (means, code do not work properly). Thanks,
what is needed when using static text to have font outline embedded in swf file? : Adobe flash
what is vector graphic animation? : Adobe flash
How to start a graphic animation at a specific frame?
what is the most important factor in determining the compatibility of your application? : Adobe flash