package com.dougmccune.containers { import caurina.transitions.Tweener; import flash.display.DisplayObject; import flash.geom.ColorTransform; import mx.core.EdgeMetrics; import org.papervision3d.objects.DisplayObject3D; public class lib_flex_cover_com_dougmccune_containers_CoverFlowContainer extends BasePV3DContainer { /** * The angle that each Plane is rotated on the y axis. This corresponds to PaperVision's yRotation property on * the Plane. This is in degrees and should range from 0-90. A value of 0 means no rotation is applied and a value of 90 * would mean the Plane is rotated so much that it would effectively disappear. */ public var rotationAngle:Number = 70; /** * If true the Planes near the edge of the component will fade to transparent. Kind of a cool effect sometimes * if you want it. */ public var fadeEdges:Boolean = false; /** * @private * * For some of the layout stuff we need to know the max height of all the children. As children are * added we make sure to update maxChildHeight. */ protected var maxChildHeight:Number; /** * @private * * For some of the layout stuff we need to know the max width of all the children. As children are * added we make sure to update maxChildWidth. */ protected var maxChildWidth:Number; override public function addChild(child:DisplayObject):DisplayObject { super.addChild(child); if(isNaN(maxChildHeight) || child.height > maxChildHeight) { maxChildHeight = child.height; } return child; } override protected function layoutChildren(unscaledWidth:Number, unscaledHeight:Number):void { super.layoutChildren(unscaledWidth, unscaledHeight); layoutCoverflow(unscaledWidth, unscaledHeight); } protected function layoutCoverflow(uncaledWidth:Number, unscaledHeight:Number):void { var n:int = numChildren; for(var i:int=0; i