I am going to be getting key events that sum up a degree of rotation.

ie. 3, 0, 1, ^  = 301 degrees (well, I get keCodes that I need to translate
back into their corresponding numbers)

So I was thinking I have an array that I push the values (keyCode) into...
when I get a delimiter, I then combine the digits before the delimiter

numbOne *= 100;
numbTwo *= 10;
numbThree = thirdDigitIfExists;

totalNumber = numbOne + numbTwo + numbThree;

And then set the rotation, clear the array out, and then wait for more
keyCodes to pour in.

I'm a little worried about the speed of execution, as I could get tons of
sets of keyCodes and this needs to be as accurate as possible. I could use a
wrapper and use serial data sent in, but i want to avoid a 3rd party
wrapper. I imagine that the approach I've outlined above shouldn't be too
terribly slow, but wondering if there might be a way that would be quicker
execution-wise knowing I'll be getting sets of keyCodes to implement into a
rotational number (0-359).

Eric
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to