Example Main.html File; Creating An Extension Module - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide

Example Main.html File

This incomplete example shows the basic structure of the Main.html file for an extension with some
typical components, such as a menu item, dialog box with UI controls, a custom element with an
Inspector, and event-handling functions:
<html>
<body>
// define JavaScript event-handling functions
// add a menu item to a GoLive menu
// define a dialog with UI controls
// define a custom element and add it to the Objects palette
// define an Inspector for the custom element
</body>
</html>

Creating An Extension Module

Every extension takes the form of a Main.html file that resides in its own uniquely named folder in the
Extend Scripts folder. This section describes how to create the file and folder structure GoLive expects
extensions to have.
To begin creating an extension, first create the extension folder. Create a folder with a unique name and
place it in the Adobe GoLive CS_ Lang /Modules/Extend Scripts/ folder.
<jsxmodule ...>
<script>
function initializeModule (){
if confirm ("Modify...?"){
fileGetDialog(...);}
...}
function menuSignal (menuItem){
if (menuItem.name == "myItem") {
//do something
}
...}
...
</script>
<jsxmenubar>
<jsxmenu ...>
<jsxitem name="myItem" title="MyItem" >
</jsxmenu>
</jsxmenubar>
<jsxdialog ... >
<jsxcontrol ...>
...
</jsxdialog>
<jsxelement name="myTag" ...>
<jsxepalettegroup name="myTag" ...>
<jsxpaletteentry name="myTag" ...>
<jsxinspector name="myTag" ...>
<jsxcontrol type="edit" ...>
...
</jsxinspector
Adobe GoLive CS2
How to Create an Extension
21

Advertisement

Table of Contents
loading

Table of Contents