Skip to main content
Participant
July 23, 2015
Question

Actionscript 2 help needed to limiting the degree of rotation movieclip

  • July 23, 2015
  • 3 replies
  • 442 views

i need help with the "limiting degree of rotation movie clip"

I have movieclip. I want to rotate my movieclip with button. I made a script on the button

on(release){

            _root.my_movieclip._rotation+=5;           

}

The script runs. every time I click on a button, movieclip will rotate +5. but I want to limit rotation.

for example, I limit only to 30 degrees rotation when clicked addition and subtraction rotation to 45 degrees.

is there that can help me?

This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
July 23, 2015

on(release){

            _root.my_movieclip._rotation+=5;    

_root.my_movieclip._rotation>30){

_root.my_movieclip._rotation=30;


}

Participant
July 25, 2015

thank's kglad... its work... I hope someday when you get into trouble. you easy finish

kglad
Community Expert
Community Expert
July 25, 2015

you're welcome.

(p.s when using the adobe forums, please mark helpful/correct responses, if there are any.)