dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: dynamic rotation

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    249

    dynamic rotation

    Im researching 3d for flash and I have found that Swift 3d appears to be the most desired solution for flash. I suspect there may be others, but I am more interested in a particular capability for any solution that might present itself. I currently work with a 3d cad software called Solid Works and I have some limited experience with 3ds max. My question is this, if having generated a 3d object and importing it into flash can you then dynamically rotate the object?

  2. #2
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    yes you can. just render an animation of the object rotating 360 degrees. then export the animation and import it into flash. you can then gotoAndStop() a frame from the animation depending on the position of the mouse. this should simulate dragging the object around it's axis.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  3. #3
    free-webmaster-resource.com deamothul's Avatar
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    1,475

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Posts
    249
    thanks guys,

    I have done something like that already and basically your limited to a rotation of one axis only.

  5. #5
    Senior Member
    Join Date
    Feb 2002
    Posts
    147
    Well, it's really difficult because Flash can't handle 3D objects, every possible angle you want to use has to be rendered in a seperate frame. For a simple one-dimensional animation, you could do a very choppy animation with 10 frames (every 36 degrees). To be able to rotate the object along two axis, you're looking at 100 frames, and that'll still be really choppy. You're looking at thousands of frames to do it properly. Hardest part will definitely be capturing all the separate frames. And then you've got the issue of navigating through--basically, you'd need a 2-dimensional matrix with an x-rotation value and a y rotation value.

    If I were doing it, I'd organize it by capturing all the views around a single line of rotation in a single clip, then tilt the angle of the rotation 36 degrees, and repeat. So you have a bunch of movie clips named something like x0, x36, x72, etc. And in each movie clip, there's a bunch of frames, each named something like y0, y36, y72. So if the user is viewing clip x0 y0 and the press up, the view stays on movie-clip x0 and loads frame y36. And if they click right from that point, it would load movieclip x36, and jump to the frame named y36.

    Anyway, that's just one thought of how it could be done. Or you could just use director and probably do it in about fifteen minutes, and it would look way better, too.


    --just another thought on that, you could reduce the numbers of frames by 50 percent, because x0 y180 is the same as x180 y0, etc. The number of frames you'd need to capture would be roughly ((360/z)^2/) 2, where z is the number of degrees between captures.
    Last edited by octothorp; 04-02-2004 at 07:55 PM.

  6. #6
    Senior Member
    Join Date
    Apr 2001
    Posts
    249
    Thanks for the info,

    I looked at using Director but theres no way to import a Director file into flash. Flash just wont handle it. I've tried several different attempts to incorporate Director into flash and at the very least the best I could achieve was one of two solutions, first was to launch the Director exe using the flash fsCommand and second to use the getURL property and launch the Director html page.

    It's to bad you cant launch an html page in flash without it opening up a web browser. I thought there might be a way to open a web page in flash but have it contained with in a mc. But that doesnt work either.

    Using Director by itself would be ok, but the user would need to down load the Shockwave player or I install it before the application starts. Flash on the otherhand is on almost every pc running Windows.

    Anyway this was a good exercise at least now I know I can't do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center