package com.oxylusflash.book { import com.as3dmod.util.ModConstant; import flash.display.BitmapData; public class BookPage3DRight extends BookPage3D { public function BookPage3DRight(frontBmp:BitmapData, backBmp:BitmapData, idx:int):void { super(frontBmp, backBmp, idx); page3D.x = Global.pageW2 * Global.theBook.pagesHolder.scaleX; bendMod.constraint = ModConstant.LEFT; _side = BookPage.RIGHT_SIDE; _bendRotation = 1; if (!_isHard) _bendForce = 1; } // Update bend,angle and rotation parameters. override protected function updateBendForce():void { bendMod.force = MAX_BEND_FORCE * (1 - (_bendForce >= 0 ? _bendForce : -_bendForce)); } override protected function updateBendAngle():void { bendMod.angle = MAX_BEND_ANGLE * _bendAngle; } override protected function updateBendRotation():void { var br:Number = _isHard ? (_bendRotation - 1) * 0.5 : _bendRotation; this.rotationY = br >= 0 ? 0 : -br * MAX_BEND_ROTATION; _flipped = _bendRotation <= (_isHard ? -HARD_FLIP_LIMIT : -FLIP_LIMIT); } } }