Developer Guide (API Reference) > Flash Viewer > Methods/Functions |
Method |
Details |
||
alert |
Show an alert box in the viewer with a message. |
||
assignHighlightColor |
Assign a color through javascript for text selection. |
||
loadHighlights |
Passing Highlights XML to Viewer through JavaScript. |
||
clearHighlights |
Clear loaded highlights XML. |
||
gotoPage(pageNumber ) |
Load a particular page in the viewer. |
||
getMarksXml | Retrieves the XML string that describes all annotations in the document. | ||
loadAnnotationsFile |
Takes a file name and loads the XML stream from the file. For example: var app = document.getElementById("ViewerEnterpriseAnnotation"); This will cause the Flash viewer to search for and open an annotations file called "annotations.xml" in the root of the Markups folder. |
||
loadDocument |
Takes a document file name and loads it into the viewer, replacing any active document with the new one.
|
alert(“text to be shown in alert box”)
Example |
Copy Code
|
---|---|
<a href=javascript: ViewerEnterprise.alert(“text to be shown in alert box”)>Show Alert</a>
|
Method |
Details |
alert |
Show an alert box in the viewer with a message |
assignHighlightColor |
Assign a color through javascript for text selection. |
loadHighlights |
Passing Highlights XML to Viewer through JavaScript. |
clearHighlights |
Clear loaded highlights XML. |
loadAnnotations |
Passing Annotations XML to Viewer through JavaScript. |
removeAnnotations |
Clear loaded annotations XML. |
saveAnnotations(repress_save_popup = false) |
Save loaded annotations, repressing the "save annotation as" popup dialog if the passed in variable is set to true AND the saveAnnotationAs flash var is used with a non-empty string. |
getMarksXml | Retrieves the XML string that describes all annotations in the document. |
alert(“text to be shown in alert box”)
Example |
Copy Code
|
---|---|
<a href=javascript: ViewerEnterprise.alert(“text to be shown in alert box”)>Show Alert</a>
|
assignHighlightColor(hexcode of color)
Example |
Copy Code
|
---|---|
<a href=javascript: ViewerEnterprise.assignHighlightColor (0xFFFF00)>Set Color</a> |
loadHighlights(XML_TO_ADD)
clearHighlights()
Example |
Copy Code
|
---|---|
ViewerEnterprise.loadHighlights( "<root><actions><action type='addHighlight'> <highlight documentname='PowerCfg.odt' id='AE40B90F8A971CF262C3090970DEC151' userid='' tooltip='' mode='ByText' occurance='1' page='0' allowDelete='true' color='16776960' start='0' end='0' annotation='0'><![CDATA[paper]]></highlight></action></actions></root>" );
ViewerEnterprise.clearHighlights();
|