Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

The FlashPaper.SelectionRange Class

Several methods in IFlashPaper use or return an object of type FlashPaper.SelectionRange. This is a simple class that is defined as follows:

class FlashPaper.SelectionRange
public var headPageIdx:Number;
public var headCharIdx:Number;
public var tailPageIdx:Number;
public var tailCharIdx:Number;
function equals(that:FlashPaper.SelectionRange):Boolean
return this.headPageIdx == that.headPageIdx &&
this.headCharIdx == that.headCharIdx &&
this.tailPageIdx == that.tailPageIdx &&
this.tailCharIdx == that.tailCharIdx;

It is legal and acceptable to decompose these objects, or to construct them yourself, because their structure and contents are guaranteed to remain compatible in future versions of FlashPaper.