Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.


AS3: Determining the viewable side of a display object

Posted December 19, 2008 by senocular

I've just posted a new ActionScript function for AS3: isFrontFacing(). This function lets you determine what side of a movie clip or other display object is visible and currently facing the user. In other words, is the display object flipped, or not? This method works for both 2D and Flash Player 10's 3D transformations on display objects. This can be particularly useful if you want an object to display different graphics when looking at its reversed or back side.
Chimay (from Kirupa) has posted an example here:
http://shapevent.com/source/nav3d.html (source)

More on how the function works can be read from a post explaining the process in detail.