View Single Post
  #1 (permalink)  
Old Feb 27th, 2008, 20:30
Germaris Germaris is offline
New Member
Join Date: Jan 2008
Location: Canada
Age: 67
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Multiplying variables...

Hi there!

Here is the whole script of a test document which doesn't work...
Excuse me but I never used multiplication of variables and I confess how shameful I feel.
I absolutely don't understand the explanations the Flash Help contains...

Document contains three Input Fields, a Dynamic Field and a Button.
Clicking the Button returns NaN !!!

I thank you in advance for any help.

Best regards from Old Gerry


Code: Select all
var a:Number = new Number(field1.text);
var b:Number = new Number(field2.text);
var c:Number = new Number(field3.text);
operationFct = function () {
	var res:Number = new Number();
	res = (a * b) + c;
	resultFld.text = res;
};
myButton.onRelease = function() {
	operationFct();
};
stop();
Reply With Quote