| Method | Defined by | ||
|---|---|---|---|
|
computeFlip(ptd:Point, pt:Point, pw:int, ph:int, ish:Boolean, sens:int):Object
[static]
Compute and generate a new flip.
| PageFlip | ||
|
drawBitmapSheet(ocf:Object, mc:Shape, bmp0:BitmapData, bmp1:BitmapData):void
[static]
Draw a sheet using two Bitmap objects.
| PageFlip | ||
| computeFlip | () | method |
public static function computeFlip(ptd:Point, pt:Point, pw:int, ph:int, ish:Boolean, sens:int):ObjectCompute and generate a new flip.
Parametersptd:Point — Point indicating the position of the PTD point (the drag one) relative to the upper-left corner.
|
|
pt:Point — Point indicating the original position of the dragged point. The two possible values for its x and y properties are 0 or 1. pt(0,0) is the upper-left corner, for example, pt (1,1) is the bottom-right one.
|
|
pw:int — int indicating the sheet width in pixels.
|
|
ph:int — int indicating the sheet height in pixels.
|
|
ish:Boolean — If true, horizontal mode is provided, if false, vertical.
|
|
sens:int — Number indicating the constraints sensibility. This parametter is a multiplicator for the constraints values. It's intended to prevent some awefull flickering effects. Its possible value is ranged between 0.9 and 1. 0.9 -> when ptd move is free (drag'n'drop), 1 -> when ptd move is progresive (tween when release). At best, you should never swap it from .9 to 1. A progressive incrementation is better. If flickering effects don't disturb you or if your ptd moves is coded, keep this parametter to 1.
|
Object — Object containing:cPoints:Array - Array of points which describes the flipped part of the sheet. Note that in case of the ptd point is aligned with its original position or if the height of the shape is very small (<1) this array is set to null. pPoints:Array - Array of points wich describes the fixed part of the sheet. matrix:Matrix - Transformation matrix for the flipped part of the sheet. width:Number - Sheet width. height:Number - Sheet height. |
| drawBitmapSheet | () | method |
public static function drawBitmapSheet(ocf:Object, mc:Shape, bmp0:BitmapData, bmp1:BitmapData):voidDraw a sheet using two Bitmap objects.
Parametersocf:Object — computeFlip() returned object
|
|
mc:Shape — Target
|
|
bmp0:BitmapData — First page bitmap (left-top aligned)
|
|
bmp1:BitmapData — Second page bitmap (left-top aligned)
|