not enuff info.
how are you making it turn just once? and by turn, do you mean rotate (like the hands of a clock)?
Yes. I click on a button, and the ball turns a full 360 degrees in a circle. I want it to stop anywhere in the circle randomly. Sorry for the choice of words, I mean rotate along a circonférence.
how does the ball rotate? timeline tween or code?
code. I am thinking of using frames to solve my problem, although it want be as elegant as something happening randomly. I am going to choose 7 situations ( frames ) each with a different currantAngle
and so on. Each click will take me to different frame.The user won't notice a thing hopefully.
newRotation = Math.random() * 360;
myTween = new Tween(myBall, "rotation", Strong.easeOut, myBall.rotation, newRotation, .5, true);
Giving me error messages. What did I do wrong? I copied, pasted the script and drew a ball and a button.
Scene 1, Layer 'as3', Frame 1, Line 7 1046: Type was not found or was not a compile-time constant: Tween.
Scene 1, Layer 'as3', Frame 1, Line 9 1180: Call to a possibly undefined method Tween.
Scene 1, Layer 'as3', Frame 1, Line 9 1120: Access of undefined property Strong.
i thought you would know to have this up at the top of your code if you didnt already:
Thank you for your help, but that was not what I was looking for. I am trying to make a roulette, but the ball stops always at the same place, as you can see below. I will do some fine tuning for the sound later.
i cant help unless you show your code and explain the setup. without that we can only guess
whats the code for your button?