# My AS3 pride and joy

**URL:** <https://forum.kirupa.com/t/my-as3-pride-and-joy/216062>\
**Category:** open source\
**Created:** [February 13, 2007, 1:51pm UTC](https://forum.kirupa.com/t/my-as3-pride-and-joy/216062 "2007-02-13T13:51:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flashthinker](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@Flashthinker](https://forum.kirupa.com/u/Flashthinker)\
**Post date:** [February 13, 2007, 1:51pm UTC](https://forum.kirupa.com/t/my-as3-pride-and-joy/216062/1 "2007-02-13T13:51:54Z")

</div>

Meh, I thought it was about time that I showed you my favourite AS3 flash EVER… In fact even though it’s not a comlpeted product, it is still the best flash I have ever made.

[http://denvish.net/ulf/130207/84599\_t1.php](http://denvish.net/ulf/130207/84599_t1.php)

It involves 3 classes;

- “Bmp” class which refers to the Bitmap that I will use to map the cube
- “Texture” class - that distorts the bitmap so that I can get a perspective-effect (The logic behind this class was inspired by this: [http://sandy.media-box.net/blog/distordimage-the-way-to-distord-bitmaps-by-code.html](http://sandy.media-box.net/blog/distordimage-the-way-to-distord-bitmaps-by-code.html))
- “Cube” class which distorts the “Texture” to points in 3D space.

I am not sure if I want to make my Texture class public atm.  
In anycase, this is a testament to AS3’s speed. Just think of how slow it would be in AS2!! There are 4 heavily textured cubes rotating at teh same time!

Also, I compared my texture class to that of Sandy’s AS2 class and mine was WAY faster.

P.S. The lighting was a bit of a half-\*\*\* job on my part. It looks at the “surface area of the texture” but it’s inacurate because I only took the bounding box into consideration… I added chunks of code to make it more accurate.

_EDIT_ I have added the AS3 source files! OMG.
