views:

148

answers:

2

Has anyone got any alternatives to what Colin Moock has coded to GET VISIBLE WIDTH/HEIGHT OF A DISPLAY OBJECT in ActionScript 3? That esp. in perspective of DisplayObjects that have 3D transforms applied and visible dimensions of which you need to consider for a calculation.

Any leads would be appreciated.

A: 

Haven't tested this... try: displayObject.transform.pixelBounds().

jeremynealbrown
__pixelBounds__ is not a method but a property of Transform class, thus the above code would result in error. What pixelBounds will retrieve is the Rectangle object with the bounds of the DisplayObject before transformations, unfortunately.
Ain
There's a workaround that deploys BitmapData at http://tekkie.flashbit.net/flash/as/actionscript-3-lacks-functionality-for-visible-bounds-of-displayobject
Ain
A: 

Since the appropriate functionality is entirely missing from ActionScript 3 at this point, please vote for the feature request at Adobe!

Ain