So far I've only been able to achieve that in Illustrator and then saving
the perspectively squished vectors as a .swf What I'd love to do is to get
that perspective squish done within Flash 8 using script.
I know about 3D program extensions for Flash like Sandy, but I find them
cryptic (at best) and over kill for my simple needs.

Using something like Sandy is the only choice you have. For example:

http://sandy.media-box.net/blog/distortimage-20-the-fastest-way-to-freely-distort-image-with-flash-in-actionscript.html
http://sandy.media-box.net/blog/distordimage-the-way-to-distord-bitmaps-by-code.html

You need something like this. This is done by dividing an image in triangles and then projecting them.

But you'd still have to be careful, as simple distortion ISN'T perspective. The above examples are simply distorting the image, but not accounting for proximity (it's just squishing the texture). If you get a side too thin, it'll just look thin, not "far".

This is an old example, but uses a similar approach but with correct calculation (each side of the box is made of 4 triangles):

http://www.nkag.co.jp/

For something like that, you'd need to either build a complex plane with Sandy, using a bunch of squares (so it will do correct perspective, or close to it anyways), or build the whole calculation and projection yourself. Which can be done, but will probably take some time.

If you have a VERY simple drawing, you could directly draw it using the drawing API. You'd need to encode all your points and redraw based on 3d positions. This would be the best choice quality wise, but again depends on how your 'image' is, and could be quite slow.



Zeh
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to