View Full Version : simple math functions
David Bird
12-04-2001, 08:09 PM
Looking for a way to perform simple math functions in a Flash movie....I want to enter a value, enter another value, and get a result, i.e., multiply value1 - 5, by value2 - 4, result = 20
Any assistance would be greatly appreciated
var val1;
var val2;
var result;
val1=5;
val2=10;
result=val1*val2;
result is 50.
is that what your looking for?
David Bird
12-04-2001, 10:30 PM
Yep, that's it....A further question...what actionscript command do I use to get that where I want it?!
the simplest is to put a dynamic text box on the same timeline as the code and name it result.
the variable result will be displayed in the text box.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.