Web Hosting Talk







View Full Version : How to rotate an image by the given degree, in Flash?


wayiran
08-08-2006, 12:15 PM
I dont know much about Flash and action script, but I am involved with a project in which I have to use flash for this purpose!

I need a text box, in which the user types the degree and a button that after clicking rotates the image by the given degree.

Help me,:crying: :bawling:

Thank you

Flasher
08-08-2006, 05:25 PM
1) Create a movie clip containing the image and call it, say, my_image

2) Create a text field and set it to be a variable, say, my_dregrees

3) Create a button and assign the follwong action to it:
on(release){ my_image._rotation = my_dregrees;}

That's all.

wayiran
08-08-2006, 07:34 PM
Flasher, Thanks for your answer...

But it didnt work! I followed your 3 steps, but the image didnt rotate!
Here there are some printscreens of it:

http://wayiran.persiangig.com/image/1.gif
http://wayiran.persiangig.com/image/2.gif
http://wayiran.persiangig.com/image/3.gif
and result:
http://wayiran.persiangig.com/image/4.gif

Help me...
Thanks

Flasher
08-09-2006, 05:19 AM
Flasher, Thanks for your answer...

But it didnt work! I followed your 3 steps, but the image didnt rotate!
Here there are some printscreens of it:

http://wayiran.persiangig.com/image/1.gif
http://wayiran.persiangig.com/image/2.gif
http://wayiran.persiangig.com/image/3.gif
and result:
http://wayiran.persiangig.com/image/4.gif

Help me...
Thanks

In fact I tested the code mentioned above before I posted it here. Perhaps you miss a minor point...

NFX
08-10-2006, 07:09 PM
Flasher, Thanks for your answer...

But it didnt work! I followed your 3 steps, but the image didnt rotate!
Here there are some printscreens of it:

http://wayiran.persiangig.com/image/1.gif
http://wayiran.persiangig.com/image/2.gif
http://wayiran.persiangig.com/image/3.gif
and result:
http://wayiran.persiangig.com/image/4.gif

Help me...
Thanks

In picture #2, set VAR (bottom right in the object's properties) to my_degrees. That should do it.