Page
A page defines a single page side of a physical page. It holds elements defining the page side's content. Page sides may override some settings from their containing chapter, such as the background color.
Contents |
Attributes
bgcolor
- Type: Integer
- Overrides:
chapter@bgcolor
The background color for this page. This refers to the base color a page has, if there are no elements on the page obscuring the actual page itself.
Can be an ARGB or RGB value. While the number may be in any format parseable by ActionScript, it is recommended for readability's sake to use a hexadecimal formatted value. Hexadecimal values are marked by prefixing them with 0x.
A value of 0x000000 (or just 0) is transparent, not black. If you want black, use 0xFF000000, i.e. use the ARGB format (alpha-red-green-blue) instead of RGB (red-green-blue).
Note that using many transparent pages next to each other, causing a deep level of transparency and thus many visible pages, can reduce performance significantly (and is therefore not recommended on a book or chapter level).
bgopaque
- Type: Boolean
- Default:
false - Version: 2.0.11
Whether to treat this page as opaque when determining page visibility, regardless of the bgcolor.
This can be useful when pages share the same "mask", i.e. the same areas are visible, but parts of the page are transparent. A practical example of this is a book where pages have rounded corners. All pages have the same shape, so no visual glitches will happen if the not-topmost-pages are hidden, even though the topmost page will have a transparent background.
Why would you want to use this? Performance will be noticeably better if the unnecessary pages are hidden.
dragarea
- Type: String
- Default:
top,middle,bottom - Overrides:
chapter@dragarea - Version: 2.0.10
A comma separated list of the areas which should be clickable by the user to trigger page turns or drags.
The top and bottom areas are the top and bottom page corners, being squares of the size dragrange x dragrange. The middle is the remaining space between those squares, with a width of dragrange.
dragrange
- Type: Number
- Overrides:
chapter@dragrange - Version: 2.0.10
The distance to the border inside which auto dragging starts (when the user moves the cursor near a corner), and clicking triggers a page turn or drag.
edgecolor
- Type: Integer
- Overrides:
chapter@edgecolor
The color used when painting a page's edge for the book edges. This defaults to the bgcolor of the page itself.
buffer
- Type: Boolean
- Default:
false
Determines whether to create a static copy of the page's content while turning or dragging the page. This means that no content of the page will be animated while the page itself is moving (e.g. animations in loaded swfs). On the other hand performance will greatly increase for complex SWFs with many animated elements or vector graphics. As soon as the page's movement finishes the content's animation will be displayed again.
Note: right sides of spreadpages will always be buffered while turning either the left or right side of the spreadpage.
buffer_aa
- Type: Boolean
- Default:
false
Determines whether the buffer should use anti aliasing (smoothing). This can result in noticeably improved quality of the video while dragging a page or zooming. Can have a high impact on performance, though.
buffer_animate
- Type: Boolean
- Default:
false
Only used when buffer is set to true (or if the page is the right part of a spreadpage, which implicates it).
Determines if the content should be animated while the page is being buffered (i.e. turned). This can be useful when having videos or other dynamic content on pages.
Note: has a strong impact on performance. It is not recommended to use multiple pages with animated buffers next to each other, when there is a chance they will all be flipped at once by the user.
foldfx
- Type: Number
- Overrides:
chapter@foldfx
The alpha value of folding effects for this pages. If set to 0 folding effects are turned off, 1 means 100% opaque. Folding effects refer to a shadow inbetween two pages, simulating a curvature of the pages.
height
- Type: Number
- Overrides:
chapter@pageheight - Version: 2.0.10
The height of this page.
The restriction for custom page sizes is, that they have to be smaller (or the same size) as defined in the book tag.
lighting
- Type: string
- Default:
shadows, highlights
allows a more finegrained control of which „light“ effects to use on pages: highlights and / or shadows, or neither. Default is „shadows, highlights“. Can be set the whole book and individually for pages also.
shadows
- Type: Number
- Overrides:
book@shadows
The intensity of the shadow and highlight effects while turning or dragging the page. The value is the intensity, higher is stronger. If set to 0 shadow and highlight are turned off, 1 means 100% strength.
This is what gives pages "depth" when dragging / turning them, so it is not recommended to turn this off.
spread
- Type: Boolean
- Default:
false
Allows the definition of spreadPages, i.e. double pages where all content is defined in one page. This allows easier creation of pages where one image spreads both sides and even the use of dynamic content on the whole area. For example, this way one can use the space of two pages to display a video.
For proper functionality, this attribute has to be set on both sides, i.e. on one even and on one odd page side.
Important: all content must be defined on the left side of the double page.
Note: it is not recommended to use this attribute directly. Instead, for an easier way of using spreadpages, have a look at the spreadpage tag, which can be used instead of a page tag.
stiffskew
- Type: Number
- Default:
1.0 - Overrides:
chapter@stiffskew - Version: 2.0.12
This controls the tilt of stiff pages, where lower values lead to a "flatter" turn, higher values to a "steeper" one.
stiff
- Type: Boolean
- Default:
false
If true, this page (together with it's other side) will be a stiff page, resulting in a different turning animation, which resembles that of a hardcover's cover. Only has to be defined in one page of the affected "physical" page. Stiff pages cannot have folding effects.
turningenabled
- Type: Boolean
- Default:
false
If true, this page cannot be turned backwards (in case of a left page) or turned forward (in case of a right page).
The page with the attribute set acts as a 'blocking page', i.e. it is not possible to go to a page before (if the attribute turningenabled is set on the left page) or after (if attribute is set on a right page). Even a direct jump, neither via a direct API call nor using the GUI (page knobs/bubbles in navigation bar) it is not possible to jump past the page.
Practical examples are to keep a book always open (for this the attribute must be included on the second and the second last page), or to block of an area of the book before the user performed some action (filled out form, solved quiz, ...)
width
- Type: Number
- Overrides:
chapter@pagewidth - Version: 2.0.10
The width of this page.
The restriction for custom page sizes is, that they have to be smaller (or the same size) as defined in the book tag.
Child Nodes
A page can contain any number of elements. Those will all be positioned absolutely. The element defined last (i.e. the lowest most entry in the XML node) will be displayed top most.
| MegaZine3 Core-related articles | |
|---|---|
| Book elements | Book · Chapter · Page · Spreadpage |
| Page elements | Area · GIF · Image · Navigation · Sound · Text · Video |


