I have been playing around with Flash CS3 and Action Script 3 (AS3). I've done a few projects with Flash using AS3, but I was still feeling a bit under-confident about it. Also, I had a lot of ideas related to the store software that I've been working on.
One of the things I've been wanting to do with flash was to create a generic "rotator" that I could integrate into a store. My friend Terry at Helen's Heart has a website with pictures of shoes. They're gorgeous, and I kept thinking "wouldn't it be cool if a web user could grab that shoe and look at it from different angles?!"
Such a thing is possible -- even easy -- in Flash. However, with all of the shoes that Helen's Heart stocks, it would be a daunting task to build a flash file for each and every single product.
Which is why I developed the flash component that you can see to the right. It's plain-vanilla looking, which I hope will allow it to fit in a variety of web sites. You can click and drag the picture to rotate it.
It's big "strength" is that it doesn't compile the graphics into the flash file. You pass it a "rootUrl" variable which provides a directory. The directory must contain a file called "rotations.xml" which lists the perspectives and files used in the rotatable view.
The perspective is a number from 0 to 359 (degree of rotation), and the imagename is the filename for the image that you want to use for that perspective. In this example, I've used 20 files, with an image for every 18 degrees. However, you could include 360 files if you wanted, one for every 1 degree of rotation. in-between rotations round downward to the nearest image. In this way, you could use it for a fairly choppy (but bandwidth-considerate) rotation with just a few images, or a fairly smooth (bandwidth-heavy) rotation with many images.
You can also adjust the "width" and "height" attributes to make it fit thumbnail graphics or full-size photographs.
Just click on the image
and "drag" left-or-right
to rotate the scene.
Feel Free to steal this and use it
in your websites. However,
I would appreciate credit. If
that doesn't work for you,
I would
appreciate an
email letting me
know
that
people are benefiting
from my effort.
This second one demonstrates my idea a bit better, since it uses real photographs. I used a paper plate and a thumbtack to keep the rotation uniform, The skeleton couldn't stand on top of the thumbtack, which is why he moves so much, instead of rotating in place. The lighting isn't great, either, but it demonstrates the idea. I'm thinking about building a machine to automatically take photographs in a 360 degree arc. It would basically be a light box with a rotating platform and a webcam.
Email comments to:Joshua Jacobsen Last modified:
4/27/2009 10:26:17 PM
URL for this page: http://www.drowlord.com/Professional/Flash/EONRotator.html