Forum Moderators: phranque

Message Too Old, No Replies

Flash MX- tween 360 degree

         

yllai

8:51 am on May 9, 2005 (gmt 0)

10+ Year Member



Hi,
With Flash MX, how can I make one object (let said a rectangle) to be rotate 360 degree? I not mean to rotate the object when we doing the flash file, I mean have to make the rectangle rotate 360 degree in the same place when we play the flash movie.

any idea?

rocknbil

6:36 pm on May 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yllai - you don't say in which plane you're rotating in, but that doesn't really matter.

Even in flash, you are still working with a two dimensional space and in order to do believable rotations, the object is basically "drawn" at every animation frame. The only 360 rotation you're going to be able to achieve without 3-D rendering is in the flat plane in front of you, and you can do this via ActionScript by setting the object rotation at timed intervals.

Browse around the MM site for articles on 3-D rendering, you can mathematically do all of this with basic geometric shapes and actionscript.

yllai

11:33 pm on May 9, 2005 (gmt 0)

10+ Year Member



I'm not going to draw the geometri shape but I will import an object's image. Is it means that I have to have the image for each dimension of the object?

rocknbil

12:28 am on May 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are far better descriptions of this in the tutorials on the MM site, but if you wish to rotate an object along a vertical or horizontal axis (or combo of), yes. Your two-dimensional canvas has no awareness of what the back of the object "looks" like. As it rotates around, you're going to have to draw it.

There are drawing tools in Flash that draw on-the-fly - that is, construct a cube, then as the cube rotates through any of the three axes, it draws the lines and planes for you based on mathematical calculations of where the points should be in your "space." But beyond rudementary geometric shapes, it becomes very complicated and more deadly, very CPU-intensive.

The authors of those tut's recommend a good third-party 3-D software for importing your more complex rotating objects as flat images in a series of animation frames. Combined with Flash's abilities to create 3-D basic geometry, if you get it all synchronized it can be pretty fascinating. :-D

monkeythumpa

12:32 am on May 10, 2005 (gmt 0)

10+ Year Member



You can convert it to an object, select movie, then create that object on a timeline, lets say 12 frames. On the first and 12th frame make sure there is a keyframe. right click on the first keyframe and create motion tween. There is an option to select how many times you want it to rotate and which way. Tweak that and then test it. Once you put that movie object into your movie it will play continually no matter how long the animation lasts.