all groups > flash actionscript > june 2004 >
You're in the

flash actionscript

group:

Maths Loop ?



Maths Loop ? The Big Giant Head
6/29/2004 10:50:35 PM
flash actionscript: Hello...

does anyone have a 'system' for this ?

three dynamic text boxes one above the other.
Lets call them digi1, digi2 and digi3.
Each one starts by displaying a one or two digit number.
AS on the main line says somethig like:
digi = digi3*2;

digi3 = digi2/2*4;

digi = digi2*2/3;

(I just took numbers from the top of my head for this example).

My idea is that the equations will somehow 'balance' and create a stable
maths loop between the three boxes which never displays numbers of
more than seven digits and which never ends.

Anyone got the numbers ????

Best wishes (and good head scratching)
Tony


Re: Maths Loop ? David Stiller
6/30/2004 9:23:49 AM
I'm not 100% clear on your objective, but you might consider the concept
of listeners in ActionScript. Fire up the Help files and search "Using
event listeners," which describes the mechanism. You could use listener
objects for each of your text fields, which would listen for keystrokes, for
example. A separate function could decide what to do with the values of the
other text fields when any one of them changes.


David
stiller ( at ) quip ( dot ) net


[quoted text, click to view]

AddThis Social Bookmark Button