Difference between revisions of "Book"

From MegaZine3
Jump to navigation Jump to search
m (added bookBgColor)
m (added htmlFavicon)
Line 12: Line 12:
 
Obviously not all settings can be be put into one of these two categories 100%, so there might be some discrepancy in expectance, meaning the icons should only serve as very rough, primary orientation.
 
Obviously not all settings can be be put into one of these two categories 100%, so there might be some discrepancy in expectance, meaning the icons should only serve as very rough, primary orientation.
  
= Attributes =
+
<h1> Attributes </h1>
{{Attribute
+
<p><span class="fck_mw_template">{{AttributefckLR| h= ==fckLR| name = [[Image:Applications-system.png|Behavior-related setting]] allowcrossdomaindatafckLR| type = BooleanfckLR| default = falsefckLR| info =fckLRWhen set to &lt;code&gt;true&lt;/code&gt;, the engine explicitly tries to load &lt;code&gt;crossdomain.xml&lt;/code&gt; files from domains when the
| h= ==
 
| name = [[Image:Applications-system.png|Behavior-related setting]] allowcrossdomaindata
 
| type = Boolean
 
| default = false
 
| info =
 
When set to <code>true</code>, the engine explicitly tries to load <code>crossdomain.xml</code> files from domains when the first load operation for that domain is performed. The names of the already checked domains are stored, so that the request is only performed once.
 
}}
 
 
 
{{Attribute
 
| h= ==
 
| name = [[Image:Applications-system.png|Behavior-related setting]] asulextension
 
| type = String
 
| default = asul
 
| info =
 
This allows users who's server does not allow custom file extension to set the [[ASUL document]]s' extension. When changing this parameter, make sure you also change the actual file extensions accordingly (i.e. change the extension from <code>.asul</code> of the files in the [[#guipath|<code>gui</code>]] folder to whatever you set here, which will in most cases be <code>.xml</code>).
 
}}
 
 
 
[[Image:Autodrag.jpg|frame||right|||||Automatically dragging, left mouse button is not pressed.]]
 
{{Attribute
 
| h= ==
 
| name = [[Image:Applications-system.png|Behavior-related setting]] autodrag
 
| type = Boolean
 
| default = true
 
| info =
 
Determines whether to automatically drag corners when moving the cursor closer than the set [[#dragrange|dragrange]] to them (while the cursor is on top of a page). The idea is to give users a hint that they can drag the corners to turn a page.
 
}}
 
 
 
{{Attribute
 
| h= ==
 
| name = [[Image:Applications-graphics.png|Display-related setting]] bgcolor
 
| type = Integer
 
| default = 0xCCCCCC
 
| info =
 
The default background color for pages in the book. 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 <code>0x</code>. 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).
 
 
 
A value of <code>0x000000</code> (or just <code>0</code>) is ''transparent'', not black. If you want black, use <code>0xFF000000</code>, i.e. use the ARGB format (alpha-red-green-blue) instead of RGB (red-green-blue).
 
 
 
This attribute is inherited by [[chapter]]s, from which it is is in turn inherited by [[page]]s.
 
}}
 
 
 
[[Image:Bggradient.jpg|frame||right|||||The background gradient and automatically generated book edge.]]
 
{{Attribute
 
| h= ==
 
| name = [[Image:Applications-graphics.png|Display-related setting]] bggradient
 
| type = Boolean
 
| default = true
 
| info =
 
Determines whether to show the gradient in the [[background]] below the book or not.
 
}}
 
 
 
{{Attribute
 
| h= ==
 
| name = [[Image:Applications-graphics.png|Display-related setting]] bookBgColor
 
| type = Integer
 
| version = 2.4.0
 
| default = 0xff222222
 
| info =
 
The background color for the book. This color is used for both the online version (set in the index.html file) and the preview window in mz3Tool. This attribute is will be supported in mz3Viewer soon"
 
 
 
"Can be an ARGB or RGB value. A value of 0x000000 (or just 0) is transparent, NOT BLACK!!
 
}}
 
 
 
{{Attribute
 
| h= ==
 
| name = [[Image:Applications-system.png|Behavior-related setting]] cachehandle
 
| type = String
 
| default = Engine Version (in the format x.y.zz, e.g. 2.0.11)
 
| version = 2.0.11
 
  
 
= Child Nodes =
 
= Child Nodes =

Revision as of 09:33, 19 June 2017

<css> /* Make toc float left, to better use the space right to it */

#toc { float:left; margin:1em 2em 1em 0; }

</css>

The book tag of an XML book definition is the outermost node, root node to all other nodes. It defines basic behavior of the engine.

Book attributes are in general global settings, such as page turning behavior (speed, area in which a page turn can be triggered, and so on). Some of the attributes are inherited by the chapters the book contains, such as the pages' background color.

All listed attributes titles are prefixed with a small icon. When annotated with Display-related setting, that means the setting is primarily graphics related, i.e. it means the settings changes how something is displayed. Behavior-related setting on the other hand means that the setting is primarily used to control the book's behavior.

Obviously not all settings can be be put into one of these two categories 100%, so there might be some discrepancy in expectance, meaning the icons should only serve as very rough, primary orientation.

Attributes

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/7/7e/Autodrag.jpg" _fck_mw_filename="Autodrag.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/5/5c/Bggradient.jpg" _fck_mw_filename="Bggradient.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

When set to false this will re-trigger corner hinting when the cursor idles outside a page.

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/5/53/Dragkeepdist.jpg" _fck_mw_filename="Dragkeepdist.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

<img src="/wiki/images/1/17/Dragrange.jpg" _fck_mw_filename="Dragrange.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR


Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/0/0d/Foldfx.jpg" _fck_mw_filename="Foldfx.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/5/5a/Handcursor.jpg" _fck_mw_filename="Handcursor.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR


Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/1/1b/Reflection.jpg" _fck_mw_filename="Reflection.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/f/f0/Rotate.jpg" _fck_mw_filename="Rotate.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

<img src="/wiki/images/9/95/Shadows.jpg" _fck_mw_filename="Shadows.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/1/12/Spinecurvature.jpg" _fck_mw_filename="Spinecurvature.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR


Template:AttributefckLR

Child Nodes

The book may have chapter child nodes, one for each chapter, to define the actual contents of the book.

Two child nodes can be used to define an overall background of the book, background for a static, global background, and pagebackground for a background bound to the page's position and size (i.e. it will also be scaled when zooming in or out). Those two nodes take any number of ASUL elements as their children, which will then be displayed as their actual children on the stage. The variables for the parent size and height (pw, ph) will be the total space available to the engine for background (which is the whole stage size when using the release as it is), and the page width and height for the pagebackground. The origin (top left, coordinates 0,0) is the top left of the overall space available to the engine for the background and the position of the top left corner of the book for the pagebackground.

As of version 2.0.8 it is also possible to define an overall foreground via foreground, which may contain ASUL elements to be shown on top of everything else.

Plugins may use additional nodes to let the user define additional properties, as does the sidebar plugin.

Examples

<book
    pagewidth="400"
    pageheight="600"
    bgcolor="0xffffff"
    plugins="navigationbar, gallery, links, anchors"
    lang="en,de"
    minscale="0.5"
>
    <background>
        <box anchors="0,0,pw,ph" background="image(data/overall_bg.png)"/>
    </background>
    <pagebackground>
        <box width="pagew" height="pageh" background="image(data/prepage.jpg)"/>
    </pagebackground>

    <chapter>
        <page>
            <img src="data/cover.jpg"/>
        </page>
        <!-- ... -->
    </chapter>
    <!-- ... -->
</book>
MegaZine3 Core-related articles
Book elements Book · Chapter · Page · Spreadpage
Page elements Area · GIF · Image · Navigation · Sound · Text · Video