Tutorials No Comments

In second part of our Flash AS3 3D Flip Tutorial we will take a look at unwanted blur effect that appears when we try to implement 3D rotations. Similar 3D engine is used in our WordPress 3D Banner Plugin.


  1. Flash AS3 Tutorial: 3D Flip effect Part I
  2. Flash AS3 Tutorial: 3D Blur Fix
  3. Flash AS3 Tutorial: Unlimited 3D rotations
  4. Flash AS3 Tutorial: Rolling Newspaper effect

[kml_flashembed publishmethod=”static” fversion=”9.0.0″ movie=”http://premiumcoding.com/wp-content/uploads/2011/08/3DFlip1.swf” width=”570″ height=”260″ targetclass=”flashmovie”]

Get Adobe Flash player


Download Flash 3D Blur Fix source (812)


Blur occurs because of the way Flash renders 3D. When z axis is applied it will create a small anomaly. Whether this is intended or not is not really known but it produces a result that isn’t satisfactory. That’s why we will implement a small fix that will correct the issue.
[amazon_carousel widget_type=”SearchAndAdd” width=600″ height=”200″ title=”” market_place=”US” shuffle_products=”True” show_border=”False” keywords=”flash tutorial, learn flash” browse_node=”” search_index=”Books” /]


Open the AS3 file that we created in first part of our tutorial. Add two more variables to the beginning of the file:
[cc lang=”actionscript3″]
var imageX3DScale:Number;
var imageY3DScale:Number;
Now just before the flip3D function copy and paste following code:
[cc lang=”actionscript3″]
imageX3DScale= adNumber1.width/(adNumber1.width+1);
imageY3DScale = adNumber1.height/(adNumber1.height+1);
adNumber1.width = adNumber1.width – imageX3DScale;
adNumber1.height = adNumber1.height – imageY3DScale;
adNumber2.width = adNumber2.width – imageX3DScale;
adNumber2.height = adNumber2.height – imageY3DScale;
First two lines define a small value of pixels that we have to decrease width and height for. After we get the values needed for fix (value is near 1) we apply them to both images that we are using. That will slightly decrease the size of the image (in our case width of the image is now 269 pixels, was 270 pixels before the fix) but the unwanted blur effect is now gone. You can see a before/after image below.

Flash AS3 Blur Problem Fix


Hopefully this small fix will save some head banging that occured in my case when I was first searching to fix this problem. In third part of our 3D Flip tutorial we will create a simple 3D engine that will allow us to use unlimited 3D rotations along all axis (x,y and z) so stay tuned. Good luck!

Download Flash 3D Blur Fix Source (906)
Written by PremiumCoding
We develop beautiful Wordpress themes with minimal and clean design.