I have a piece of code that won’t work, if you know please explain why:
(everything else works)
function cw() {
i=0;
while (i < 46) { //45 degree rotation
x=getTimer();
while (getTimer()< x+10) {} //10ms delay
menu._rotation += i;
choice._rotation += i;
i++;
}}
I am calling this function from a button (onPress), the final result is
as it should be but i don’t have the motion effect (delay), it just skips those 44 degrees and goes straight to 45 WITH the delay of 450ms??? -WHY?
(i’ve tried to do that straight from the button, without a function,
because i thought that the function might be working properly -it returns the final result -> 45deg with the 450ms delay BUT it doesn’t do anything when i put it on a button, it seems to me that menu and choice aren’t accessible, but i don’t understand why)
THX