| Package | soi.core |
| Class | public class Application |
| Inheritance | Application mx.core.Application |
| Implements | soi.events.IHotSpotEventHandler, soi.events.IProjectEventHandler |
LocalConnection listener to recieve
communications from the AS2.0 flash document.swf of the current project regarding the status
of initialising, processing, loading and completion of loading of the document.swf. The results
of these communications from the document.swf are used to set the totalPages,
currentPage and scaleRatio properties.
This class also provides a toString method to return the current state
of the links xml in a format ready to be written to file.
| Property | Defined by | ||
|---|---|---|---|
| activeProject : ProjectDetailsModel
The
activeProject property is the root instance of the ProjectDetailsModel class. | Application | ||
| contentsModel : ContentsModel
The
contentsModel property is the root instance of the ContentsModel class. | Application | ||
| currentLink : XML
This property is a reference to the
currentLink property of the LinksModel
class and is used by the hotspot control logic to place, change, and clear the x, y, w, and h values
of the currently selected link in the links xml. | Application | ||
| currentPage : Number
This property represents the number of the current open page in the eMag Viewer tab.
| Application | ||
| documentLoader : DocumentLoader
A reference to the documentLoader control.
| Application | ||
| hotSpotFactory : Canvas
A reference to the Canvas used as the container for the
HotSpot control. | Application | ||
| linksModel : LinksModel
The
linksModel property is the root instance of the LinksModel class. | Application | ||
| mainPanel : Panel
A reference to the mainPanel Panel.
| Application | ||
| mainTab : TabNavigator
A reference to the main TabNavigator control.
| Application | ||
| manageContents : ManageContents
A reference to the ManageContents palette in the main Accordion control.
| Application | ||
| manageLinks : ManageLinks
A reference to the ManageLinks palette in the main Accordion control.
| Application | ||
| palettes : Accordion
A reference to the main Accordion control.
| Application | ||
| splashScreen : Image
A reference to the Image used as the splash screen in the eMag Viewer tab.
| Application | ||
| totalPages : Number
This property represents the total number of pages of the active document in the eMag Viewer tab.
| Application | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| Application | ||
|
handleHotSpotEvent(event:HotSpotEvent):void
The registered handler for
soi.events.HotSpotEvent events. | Application | ||
|
handleProjectEvent(event:ProjectEvent):void
The registered handler for
soi.events.ProjectEvent events. | Application | ||
|
onDocumentComplete(returnedTotalPages:Number, returnedScaleRatio:Number):void
This method is called by the document.swf through the
fromFlash LocalConnection. | Application | ||
|
onLoadError(thisErrorCode:String, thisHTTPStatus:Number):void
This method is called by the document.swf through the
fromFlash LocalConnection. | Application | ||
|
onLoadInit():void
This method is called by the document.swf through the
fromFlash LocalConnection. | Application | ||
|
onWrapperInit():void
This method is called by the document.swf through the
fromFlash LocalConnection. | Application | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
Dispatched when the document.swf has completed loading in the DocumentLoader
control and called the onDocumentComplete method via the fromFlash
LocalConnection. | Application | |||
Dispatched when the project is loaded - to load the document.swf in the DocumentLoader
control. | Application | |||
Dispatched when the project is closed - to unload the document.swf from the DocumentLoader
control. | Application | |||
| activeProject | property |
activeProject:ProjectDetailsModel [read-write]
The activeProject property is the root instance of the ProjectDetailsModel class.
This property can be used as the source for data binding.
Implementation public function get activeProject():ProjectDetailsModel
public function set activeProject(value:ProjectDetailsModel):void
| contentsModel | property |
contentsModel:ContentsModel [read-write]
The contentsModel property is the root instance of the ContentsModel class.
This property can be used as the source for data binding.
Implementation public function get contentsModel():ContentsModel
public function set contentsModel(value:ContentsModel):void
| currentLink | property |
public var currentLink:XML
This property is a reference to the currentLink property of the LinksModel
class and is used by the hotspot control logic to place, change, and clear the x, y, w, and h values
of the currently selected link in the links xml.
This property can be used as the source for data binding.
| currentPage | property |
currentPage:Number [read-write]
This property represents the number of the current open page in the eMag Viewer tab.
Setting this property will automatically set the currentPage property of
the activeProject and linksModel classes.
The default value is null.
This property can be used as the source for data binding.
Implementation public function get currentPage():Number
public function set currentPage(value:Number):void
| documentLoader | property |
public var documentLoader:DocumentLoaderA reference to the documentLoader control.
| hotSpotFactory | property |
public var hotSpotFactory:Canvas
A reference to the Canvas used as the container for the HotSpot control.
| linksModel | property |
linksModel:LinksModel [read-write]
The linksModel property is the root instance of the LinksModel class.
Setting this property to a non-null value automatically adds a propertyChange
event listener which is used to handle changes to the currentLink property of the
class made by the hotspot control, or child display list objects.
This property can be used as the source for data binding.
Implementation public function get linksModel():LinksModel
public function set linksModel(value:LinksModel):void
| mainPanel | property |
public var mainPanel:PanelA reference to the mainPanel Panel.
| mainTab | property |
public var mainTab:TabNavigatorA reference to the main TabNavigator control.
| manageContents | property |
public var manageContents:ManageContentsA reference to the ManageContents palette in the main Accordion control.
| manageLinks | property |
public var manageLinks:ManageLinksA reference to the ManageLinks palette in the main Accordion control.
| palettes | property |
public var palettes:AccordionA reference to the main Accordion control.
| splashScreen | property |
public var splashScreen:ImageA reference to the Image used as the splash screen in the eMag Viewer tab.
| totalPages | property |
totalPages:Number [read-write]
This property represents the total number of pages of the active document in the eMag Viewer tab.
User interface components such as the PageBrowser composite control monitor
this property as part of their encapsulated business logic.
Setting this property will automatically set the currentPage property,
and the totalPages property of the activeProject class.
This property can be used as the source for data binding.
Implementation public function get totalPages():Number
public function set totalPages(value:Number):void
| Application | () | constructor |
public function Application()
Constructor.
The constructor automatically instantiates the following:
The fromFlash LocalConnection.
The activeProject class.
The linksModel class.
The contentsModel class.
The constructor also adds listeners for ProjectEvent and
HotSpotEvent event objects.
| handleHotSpotEvent | () | method |
public function handleHotSpotEvent(event:HotSpotEvent):void
The registered handler for soi.events.HotSpotEvent events.
event:HotSpotEvent — event object.
|
| handleProjectEvent | () | method |
public function handleProjectEvent(event:ProjectEvent):void
The registered handler for soi.events.ProjectEvent events.
event:ProjectEvent — event object.
|
| onDocumentComplete | () | method |
public function onDocumentComplete(returnedTotalPages:Number, returnedScaleRatio:Number):void
This method is called by the document.swf through the fromFlash LocalConnection.
It is called when the document.swf has loaded and completed processing of its contents.
This method sets the totalPages property, and the scaleRatio property.
This method enables the palettes of the main Accordion, clears the splash screen Image,
and dispatches the ProjectEvent.DOCUMENT_COMPLETE event.
returnedTotalPages:Number — is the total pages of the document.swf returned by the document wrapper.
|
|
returnedScaleRatio:Number — is the scale ratio of the document.swf returned by the document wrapper
calculated from the width of the HotSpotFactory Canvas passed in through the
loadDocument method of the documentLoader control.
|
| onLoadError | () | method |
public function onLoadError(thisErrorCode:String, thisHTTPStatus:Number):void
This method is called by the document.swf through the fromFlash LocalConnection.
It processes a load error from the AS2.0 MovieClipLoader class.
thisErrorCode:String — error code of the loader.
|
|
thisHTTPStatus:Number — HTTP Status number of the loader.
|
| onLoadInit | () | method |
public function onLoadInit():void
This method is called by the document.swf through the fromFlash LocalConnection.
It is unused - but exists for debugging purposes as it is called when the document.swf is
loaded, but has not processed its contents.
| onWrapperInit | () | method |
public function onWrapperInit():void
This method is called by the document.swf through the fromFlash LocalConnection.
It processes the document wrapper's initialisation and calls the loadDocument method of the
documentLoader control - passing the width of the hotSpotFactory canvas
used as the container for the HotSpot control.
| documentComplete | event |
soi.events.ProjectEvent
soi.events.ProjectEvent.DOCUMENT_COMPLETE
Dispatched when the document.swf has completed loading in the DocumentLoader
control and called the onDocumentComplete method via the fromFlash
LocalConnection.
This event does not bubble.
The ProjectEvent.DOCUMENT_COMPLETE constant defines the value of the
type property of the event object for a documentComplete event.
| documentLoad | event |
soi.events.ProjectEvent
soi.events.ProjectEvent.DOCUMENT_LOAD
Dispatched when the project is loaded - to load the document.swf in the DocumentLoader
control.
This event does not bubble.
The ProjectEvent.DOCUMENT_LOAD constant defines the value of the
type property of the event object for a documentLoad event.
| documentUnload | event |
soi.events.ProjectEvent
soi.events.ProjectEvent.DOCUMENT_UNLOAD
Dispatched when the project is closed - to unload the document.swf from the DocumentLoader
control.
This event does not bubble.
The ProjectEvent.DOCUMENT_UNLOAD constant defines the value of the
type property of the event object for a documentUnload event.