| Package | de.mightypirates.megazine.flex |
| Class | public class MegaZine |
| Inheritance | MegaZine mx.core.UIComponent |
<mx:WindowedApplication ... xmlns:mp="de.mightypirates.megazine.flex.>Then add the component. To define the book content, there are two ways. One is to use the book definition XML directly:
<mp:MegaZine>
<mx:XML>
<book>
<chapter>
<page/>
<page/>
</chapter>
</book>
</mx:XML>
</mp:MegaZine>
The second is to give the path to the book definition file:
<mp:MegaZine xmlFile="book.mz3"/>When using the fat swc, make the Assets available like this:
<mp:MegaZine addedToStage="Assets.init(loaderInfo)">Finally, make sure to give it a size. To make it fill it's parent use:
<mp:MegaZine left="0" right="0" top="0" bottom="0">
Default MXML PropertyxmlData
| Property | Defined by | ||
|---|---|---|---|
| basePath : String
Base path the book should use to resolve relative URLs.
| MegaZine | ||
| instance : IMegaZine
[read-only]
The actual, underlying MegaZine instance.
| MegaZine | ||
| xmlData : XML
Raw XML data representing a book definition.
| MegaZine | ||
| xmlFile : String
Path to an XML file containing a book definition.
| MegaZine | ||
| Property | Defined by | ||
|---|---|---|---|
| basePath_ : String
The base path used when resolving relative paths.
| MegaZine | ||
| megazine : MegaZine
The actual instance of the engine.
| MegaZine | ||
| xmlData_ : XML
XML data used to describe the book.
| MegaZine | ||
| xmlFile_ : String
Path to XML file with book definition.
| MegaZine | ||
| Method | Defined by | ||
|---|---|---|---|
|
MegaZine()
| MegaZine | ||
|
dispose():void
Dispose the current book instance, clearing up any used resources.
| MegaZine | ||
| Method | Defined by | ||
|---|---|---|---|
|
init():void
Do actual initialization of the book.
| MegaZine | ||
| basePath_ | property |
protected var basePath_:StringThe base path used when resolving relative paths.
| basePath | property |
basePath:String [read-write]Base path the book should use to resolve relative URLs.
Implementation public function get basePath():String
public function set basePath(value:String):void
| instance | property |
instance:IMegaZine [read-only]The actual, underlying MegaZine instance.
Implementation public function get instance():IMegaZine
| megazine | property |
protected var megazine:MegaZineThe actual instance of the engine.
| xmlData_ | property |
protected var xmlData_:XMLXML data used to describe the book.
| xmlData | property |
xmlData:XML [read-write]
Raw XML data representing a book definition. This property is
mutually exclusive with xmlFile. Setting this will
trigger a complete reload of the book, and will make
references to the current value of instance invalid.
public function get xmlData():XML
public function set xmlData(value:XML):void
| xmlFile_ | property |
protected var xmlFile_:StringPath to XML file with book definition.
| xmlFile | property |
xmlFile:String [read-write]
Path to an XML file containing a book definition. This property is
mutually exclusive with xmlData. Setting this will
trigger a complete reload of the book, and will make
references to the current value of instance invalid.
public function get xmlFile():String
public function set xmlFile(value:String):void
| MegaZine | () | constructor |
public function MegaZine()
| dispose | () | method |
public function dispose():voidDispose the current book instance, clearing up any used resources.
| init | () | method |
protected function init():voidDo actual initialization of the book.