Date post: | 08-Mar-2016 |
Category: |
Documents |
Upload: | camilo-551323 |
View: | 15 times |
Download: | 0 times |
bbc
Adobe G
oLiv
e cs
2
SDK Programmers Reference
2005 Adobe Systems Incorporated. All rights reserved.
Adobe Creative Suite 2 GoLive CS2 SDK Programmers Reference for Windows and Macintosh.
NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Adobe Systems Incorporated. The software described in this document is furnished under license and may only be used or copied in accordance with the terms of such license.
This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and all warranties of merchantability, fitness for particular purposes, and noninfringement of third party rights.
Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization.
Adobe, the Adobe logo, Acrobat, and GoLive are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Apple, Mac, Macintosh, and Mac OS are trademarks of Apple Computer, Inc., registered in the United States and other countries. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. JavaScript and all Java-related marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. UNIX is a registered trademark of The Open Group.
All other trademarks are the property of their respective owners.
If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement.
The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.
iii
Contents
Welcome .................................................................................................................................... xlvAbout the Adobe GoLive CS2 SDK........................................................................................................................................ xlvAbout This Book.......................................................................................................................................................................... xlvi
Who should read this book .............................................................................................................................................. xlviWhat is in this book ............................................................................................................................................................. xlviDocument conventions ....................................................................................................................................................xlvii
Typographical conventions ......................................................................................................................................xlviiJavaScript conventions...............................................................................................................................................xlvii
Case sensitivity.....................................................................................................................................................................xlvii
1 Objects........................................................................................................................................ 37Global Properties and Functions ............................................................................................................................................37
Global properties ...................................................................................................................................................................37app ........................................................................................................................................................................................37boxes ....................................................................................................................................................................................37common..............................................................................................................................................................................37controls................................................................................................................................................................................37dialogs .................................................................................................................................................................................37document ...........................................................................................................................................................................37documents .........................................................................................................................................................................37menubar..............................................................................................................................................................................38menus ..................................................................................................................................................................................38module ................................................................................................................................................................................38modules ..............................................................................................................................................................................38pictures................................................................................................................................................................................38prefs ......................................................................................................................................................................................38server....................................................................................................................................................................................38settings ................................................................................................................................................................................38website ................................................................................................................................................................................38websites ..............................................................................................................................................................................38
Global functions .....................................................................................................................................................................39absoluteURL.......................................................................................................................................................................39alert .......................................................................................................................................................................................39callCallback ........................................................................................................................................................................39clearOutput........................................................................................................................................................................39command ...........................................................................................................................................................................39confirm ................................................................................................................................................................................39createPicture .....................................................................................................................................................................39disposePicture ..................................................................................................................................................................40fileGetDialog......................................................................................................................................................................40filePutDialog......................................................................................................................................................................40folderGetDialog................................................................................................................................................................40prompt.................................................................................................................................................................................40registerCallback................................................................................................................................................................40relativeURL .........................................................................................................................................................................41startTimer ...........................................................................................................................................................................41
Adobe GoLive CS2SDK Programmers Reference Contents iv
stopTimer............................................................................................................................................................................41unregisterCallback ..........................................................................................................................................................41write......................................................................................................................................................................................41writeln..................................................................................................................................................................................41
app Object .....................................................................................................................................................................................42Acquiring the app object ....................................................................................................................................................42app object properties...........................................................................................................................................................42
appSettingsFolder...........................................................................................................................................................42asymmetricTokens ..........................................................................................................................................................42clipboard.............................................................................................................................................................................42currentFolder ....................................................................................................................................................................42defaultBrowser .................................................................................................................................................................43folder ....................................................................................................................................................................................43fontsets................................................................................................................................................................................43htmlStyles...........................................................................................................................................................................43imageConverter ...............................................................................................................................................................43isModal ................................................................................................................................................................................43osVersion ............................................................................................................................................................................43prefs ......................................................................................................................................................................................43scanBrackets ......................................................................................................................................................................43sdkVersion ..........................................................................................................................................................................43server....................................................................................................................................................................................43settingsFolder ...................................................................................................................................................................44symmetricTokens.............................................................................................................................................................44systemFolder .....................................................................................................................................................................44tableStyles ..........................................................................................................................................................................44tempFolder ........................................................................................................................................................................44translator.............................................................................................................................................................................44trashFolder .........................................................................................................................................................................44userSettingsFolder ..........................................................................................................................................................44vcs..........................................................................................................................................................................................44version .................................................................................................................................................................................44
app object functions.............................................................................................................................................................45activate ................................................................................................................................................................................45broadcast ............................................................................................................................................................................45createProgressLog...........................................................................................................................................................45createSite ............................................................................................................................................................................46decodeHTML .....................................................................................................................................................................46encodeHTML .....................................................................................................................................................................46getModiferState ...............................................................................................................................................................46isModulePresent ..............................................................................................................................................................47launchHelp.........................................................................................................................................................................47launchURL ..........................................................................................................................................................................47newDocument..................................................................................................................................................................47openDocument ................................................................................................................................................................47openMarkup ......................................................................................................................................................................48openPrefs............................................................................................................................................................................48postKey................................................................................................................................................................................48quit ........................................................................................................................................................................................48setCursor.............................................................................................................................................................................49setProgress.........................................................................................................................................................................49
Adobe GoLive CS2SDK Programmers Reference v
startProgress......................................................................................................................................................................50stopProgress......................................................................................................................................................................50
attribute Object.............................................................................................................................................................................51Acquiring an attribute object ............................................................................................................................................51attribute object properties .................................................................................................................................................51
name.....................................................................................................................................................................................51specified ..............................................................................................................................................................................51value .....................................................................................................................................................................................51
bounds Object...............................................................................................................................................................................52Acquiring a bounds object .................................................................................................................................................52bounds object properties ...................................................................................................................................................52
bottom.................................................................................................................................................................................52height...................................................................................................................................................................................52left .........................................................................................................................................................................................52right ......................................................................................................................................................................................52top .........................................................................................................................................................................................52width ....................................................................................................................................................................................52x..............................................................................................................................................................................................52y..............................................................................................................................................................................................52
box Object.......................................................................................................................................................................................53Acquiring box objects ..........................................................................................................................................................53box object properties ...........................................................................................................................................................53
alignment ...........................................................................................................................................................................53bottomMargin ..................................................................................................................................................................53classid...................................................................................................................................................................................53document ...........................................................................................................................................................................53element ...............................................................................................................................................................................53height...................................................................................................................................................................................53heightPercent ...................................................................................................................................................................53inspector .............................................................................................................................................................................54leftMargin ...........................................................................................................................................................................54link.........................................................................................................................................................................................54links.......................................................................................................................................................................................54mouseControl ...................................................................................................................................................................54name.....................................................................................................................................................................................54rightMargin ........................................................................................................................................................................54topMargin...........................................................................................................................................................................54width ....................................................................................................................................................................................54widthPercent.....................................................................................................................................................................54x..............................................................................................................................................................................................54y..............................................................................................................................................................................................54
box object functions .............................................................................................................................................................54createLink ...........................................................................................................................................................................54refresh ..................................................................................................................................................................................55removeLink ........................................................................................................................................................................55
changeMarkup Object................................................................................................................................................................56Acquiring a changeMarkup object ..................................................................................................................................56changeMarkup object properties ....................................................................................................................................56
name.....................................................................................................................................................................................56version .................................................................................................................................................................................56
changeMarkup object functions ......................................................................................................................................56
Adobe GoLive CS2SDK Programmers Reference vi
changeMarkup Constructor.........................................................................................................................................56getProperty........................................................................................................................................................................57setProperty.........................................................................................................................................................................57Setting properties for supported actions ...............................................................................................................57
collection Object ..........................................................................................................................................................................60Acquiring collection objects ..............................................................................................................................................60
BoxCollection ....................................................................................................................................................................60ControlCollection.............................................................................................................................................................60CSSMediaList .....................................................................................................................................................................60CSSRuleCollection ...........................................................................................................................................................60CSSStyleSheetCollection...............................................................................................................................................60DialogCollection ..............................................................................................................................................................60DocumentCollection ......................................................................................................................................................60FontSetCollection............................................................................................................................................................60History..................................................................................................................................................................................60HTMLStyleCollection ......................................................................................................................................................61LinkCollection ...................................................................................................................................................................61MarkupCollection ............................................................................................................................................................61MarkupSettingCollection..............................................................................................................................................61MarkupSettingElement Collection............................................................................................................................61MarkupSettingEntity Collection.................................................................................................................................61MenuCollection................................................................................................................................................................61MenuItemCollection.......................................................................................................................................................61ModuleCollection ............................................................................................................................................................61PictureCollection..............................................................................................................................................................61ServerInfoCollection .......................................................................................................................................................61VCSHandlerCollection....................................................................................................................................................61WebsiteCollection ...........................................................................................................................................................61
collection object properties ...............................................................................................................................................61length...................................................................................................................................................................................61
comment Object...........................................................................................................................................................................62Acquiring comment objects ..............................................................................................................................................62comment object properties ...............................................................................................................................................62
data .......................................................................................................................................................................................62length...................................................................................................................................................................................62nodeValue ..........................................................................................................................................................................62
comment object functions .................................................................................................................................................62appendData.......................................................................................................................................................................62deleteData..........................................................................................................................................................................63insertData ...........................................................................................................................................................................63replaceData........................................................................................................................................................................63substringData....................................................................................................................................................................63
common Object ............................................................................................................................................................................64Acquiring the common object..........................................................................................................................................64common object functions ..................................................................................................................................................64
create ...................................................................................................................................................................................64control Object Types ...................................................................................................................................................................65
Acquiring control objects ...................................................................................................................................................65general control object properties ....................................................................................................................................65
active ....................................................................................................................................................................................65bounds.................................................................................................................................................................................65
Adobe GoLive CS2SDK Programmers Reference vii
enabled................................................................................................................................................................................65height, width .....................................................................................................................................................................65helpTip.................................................................................................................................................................................66itemCount ..........................................................................................................................................................................66items.....................................................................................................................................................................................66location................................................................................................................................................................................66multi .....................................................................................................................................................................................66name.....................................................................................................................................................................................66parent...................................................................................................................................................................................66placement ..........................................................................................................................................................................66posx, posy...........................................................................................................................................................................66selection..............................................................................................................................................................................66size ........................................................................................................................................................................................66state ......................................................................................................................................................................................66text ........................................................................................................................................................................................66textselection ......................................................................................................................................................................66type.......................................................................................................................................................................................67value .....................................................................................................................................................................................67values ...................................................................................................................................................................................67visible ...................................................................................................................................................................................67
general control object functions......................................................................................................................................68add ........................................................................................................................................................................................68addItem ...............................................................................................................................................................................68awaitDrag ...........................................................................................................................................................................68beginDraw..........................................................................................................................................................................68changeItem........................................................................................................................................................................69dispatchEvent ...................................................................................................................................................................69endDraw..............................................................................................................................................................................69find ........................................................................................................................................................................................69hide .......................................................................................................................................................................................69refresh ..................................................................................................................................................................................69remove.................................................................................................................................................................................70removeAll ...........................................................................................................................................................................70removeItem .......................................................................................................................................................................70show .....................................................................................................................................................................................70
Control: button Object ...............................................................................................................................................................71Acquiring a button object...................................................................................................................................................71
Control: checkbox Object..........................................................................................................................................................72Acquiring a checkbox object .............................................................................................................................................72checkbox object properties ...............................................................................................................................................72
value .....................................................................................................................................................................................72Control: colorfield Object ..........................................................................................................................................................73
Acquiring a colorfield object .............................................................................................................................................73Control: combobox Object .......................................................................................................................................................74
Acquiring a combobox object...........................................................................................................................................74combobox object properties.............................................................................................................................................74
items.....................................................................................................................................................................................74selection..............................................................................................................................................................................74
combobox object functions...............................................................................................................................................75add ........................................................................................................................................................................................75changeItem........................................................................................................................................................................75
Adobe GoLive CS2SDK Programmers Reference viii
find ........................................................................................................................................................................................75remove.................................................................................................................................................................................75removeAll ...........................................................................................................................................................................75
Control: custom Control Object..............................................................................................................................................76Acquiring a custom control object ..................................................................................................................................76
Control: edittext Object .............................................................................................................................................................77Acquiring an edittext object ..............................................................................................................................................77
Control: filelist Object .................................................................................................................................................................79Acquiring a filelist object.....................................................................................................................................................79filelist object properties.......................................................................................................................................................79
items.....................................................................................................................................................................................79multi .....................................................................................................................................................................................79selection..............................................................................................................................................................................80text ........................................................................................................................................................................................80
filelist object functions.........................................................................................................................................................80add ........................................................................................................................................................................................80find ........................................................................................................................................................................................80remove.................................................................................................................................................................................80removeAll ...........................................................................................................................................................................80
Control: frame Object .................................................................................................................................................................81Acquiring a frame object.....................................................................................................................................................81
Control: hierarchy Object ..........................................................................................................................................................82Acquiring a hierarchy object..............................................................................................................................................82hierarchy object properties................................................................................................................................................83
items.....................................................................................................................................................................................83multi .....................................................................................................................................................................................83selection..............................................................................................................................................................................83
hierarchy object functions..................................................................................................................................................83add ........................................................................................................................................................................................83find ........................................................................................................................................................................................83remove.................................................................................................................................................................................84removeAll ...........................................................................................................................................................................84
Control: item Object....................................................................................................................................................................85Acquiring an item object.....................................................................................................................................................85item object properties..........................................................................................................................................................85
icon .......................................................................................................................................................................................85index.....................................................................................................................................................................................85parent...................................................................................................................................................................................85selected ...............................................................................................................................................................................85text ........................................................................................................................................................................................85
item object functions ...........................................................................................................................................................86toString................................................................................................................................................................................86valueOf ................................................................................................................................................................................86
Control: line Object......................................................................................................................................................................87Acquiring a line object .........................................................................................................................................................87
Control: list Object .......................................................................................................................................................................88Acquiring a list object...........................................................................................................................................................88list object properties .............................................................................................................................................................88
items.....................................................................................................................................................................................88selection..............................................................................................................................................................................88
list object functions...............................................................................................................................................................89
Adobe GoLive CS2SDK Programmers Reference ix
add ........................................................................................................................................................................................89find ........................................................................................................................................................................................89remove.................................................................................................................................................................................89removeAll ...........................................................................................................................................................................89
Control: node Object...................................................................................................................................................................90Acquiring a node object ......................................................................................................................................................90node object properties ........................................................................................................................................................91
expanded............................................................................................................................................................................91icon .......................................................................................................................................................................................91index.....................................................................................................................................................................................91items.....................................................................................................................................................................................91parent...................................................................................................................................................................................91selected ...............................................................................................................................................................................91text ........................................................................................................................................................................................91
node object functions ..........................................................................................................................................................91add ........................................................................................................................................................................................91find ........................................................................................................................................................................................92remove.................................................................................................................................................................................92removeAll ...........................................................................................................................................................................92toString................................................................................................................................................................................92valueOf ................................................................................................................................................................................92
Control: preview Object.............................................................................................................................................................93Acquiring a preview object ................................................................................................................................................93preview object properties...................................................................................................................................................93
busy ......................................................................................................................................................................................93preview object functions ....................................................................................................................................................93
goBack .................................................................................................................................................................................93goForward..........................................................................................................................................................................93goHome ..............................................................................................................................................................................93setFile ...................................................................................................................................................................................93setSource ............................................................................................................................................................................93stop .......................................................................................................................................................................................93
Control: progressbar Object .....................................................................................................................................................94Acquiring a progressbar object ........................................................................................................................................94progressbar object properties...........................................................................................................................................94
maxvalue.............................................................................................................................................................................94minvalue .............................................................................................................................................................................94
Control: radiobutton Object.....................................................................................................................................................95Acquiring a radiobutton object ........................................................................................................................................95radiobutton object properties ..........................................................................................................................................95
value .....................................................................................................................................................................................95Control: scrollbar Object............................................................................................................................................................96
Acquiring a scrollbar object ...............................................................................................................................................96scrollbar object properties .................................................................................................................................................96
jumpdelta ...........................................................................................................................................................................96maxvalue.............................................................................................................................................................................96minvalue .............................................................................................................................................................................96stepdelta .............................................................................................................................................................................96
Control: slider Object ..................................................................................................................................................................97Acquiring a slider object......................................................................................................................................................97slider object properties........................................................................................................................................................97
Adobe GoLive CS2SDK Programmers Reference x
jumpdelta ...........................................................................................................................................................................97maxvalue.............................................................................................................................................................................97minvalue .............................................................................................................................................................................97stepdelta .............................................................................................................................................................................97
Control: source Object................................................................................................................................................................98Acquiring a source object ...................................................................................................................................................98source object properties .....................................................................................................................................................98
lineNumbers ......................................................................................................................................................................98sourceArea .........................................................................................................................................................................98syntax ...................................................................................................................................................................................98wordWrap...........................................................................................................................................................................98
Control: statictext Object ..........................................................................................................................................................99Acquiring a statictext object..............................................................................................................................................99
Control: urlgetter Object ........................................................................................................................................................ 100Acquiring a urlgetter object............................................................................................................................................ 100urlgetter object functions................................................................................................................................................ 100
setLink............................................................................................................................................................................... 100CSSCharsetRule Object .......................................................................................................................................................... 101
Acquiring a CSSCharsetRule object.............................................................................................................................. 101CSSCharsetRule object properties ................................................................................................................................ 101
cssText .............................................................................................................................................................................. 101encoding.......................................................................................................................................................................... 101parentRule....................................................................................................................................................................... 101parentStyleSheet .......................................................................................................................................................... 101type.................................................................................................................................................................................... 101
CSSFontFaceRule Object ....................................................................................................................................................... 102Acquiring a CSSFontfaceRule object ........................................................................................................................... 102CSSFontfaceRule object properties.............................................................................................................................. 102
cssText .............................................................................................................................................................................. 102parentRule....................................................................................................................................................................... 102parentStyleSheet .......................................................................................................................................................... 102style.................................................................................................................................................................................... 102type.................................................................................................................................................................................... 102
CSSImportRule Object ............................................................................................................................................................ 103Acquiring a CSSImportRule object ............................................................................................................................... 103CSSImportRule object properties.................................................................................................................................. 103
cssText .............................................................................................................................................................................. 103href ..................................................................................................................................................................................... 103media ................................................................................................................................................................................ 103parentRule....................................................................................................................................................................... 103parentStyleSheet .......................................................................................................................................................... 103styleSheet ........................................................................................................................................................................ 103type.................................................................................................................................................................................... 103
CSSImportRule object functions ................................................................................................................................... 104addMedium .................................................................................................................................................................... 104deleteMedium ............................................................................................................................................................... 104openDocument ............................................................................................................................................................. 104
CSSMediaRule Object ............................................................................................................................................................. 105Acquiring a CSSMediaRule object................................................................................................................................. 105CSSMediaRule object properties................................................................................................................................... 105
cssRules ............................................................................................................................................................................ 105
Adobe GoLive CS2SDK Programmers Reference xi
cssText .............................................................................................................................................................................. 105media ................................................................................................................................................................................ 105parentRule....................................................................................................................................................................... 105parentStyleSheet .......................................................................................................................................................... 105type.................................................................................................................................................................................... 105
CSSMediaRule object functions..................................................................................................................................... 105deleteRule ....................................................................................................................................................................... 105insertRule......................................................................................................................................................................... 106
CSSPageRule Object ................................................................................................................................................................ 107Acquiring a CSSPageRule object ................................................................................................................................... 107CSSPageRule object properties ..................................................................................................................................... 107
cssText .............................................................................................................................................................................. 107parentRule....................................................................................................................................................................... 107parentStyleSheet .......................................................................................................................................................... 107selectorText .................................................................................................................................................................... 107type.................................................................................................................................................................................... 107
CSSStyleDeclaration Object................................................................................................................................................... 108Acquiring a CSSStyleDeclaration object..................................................................................................................... 108CSSStyleDeclaration object properties ....................................................................................................................... 108
cssText .............................................................................................................................................................................. 108length................................................................................................................................................................................ 108parentRule....................................................................................................................................................................... 108
CSSStyleDeclaration object functions ......................................................................................................................... 108getPropertyPriority ...................................................................................................................................................... 108getPropertyValue.......................................................................................................................................................... 108item.................................................................................................................................................................................... 108removeProperty ............................................................................................................................................................ 109setProperty...................................................................................................................................................................... 109
CSSStyleRule Object ................................................................................................................................................................. 110Acquiring a CSSStyleRule object ................................................................................................................................... 110CSSStyleRule object properties...................................................................................................................................... 110
cssText .............................................................................................................................................................................. 110parentRule....................................................................................................................................................................... 110parentStyleSheet .......................................................................................................................................................... 110selectorText .................................................................................................................................................................... 111style.................................................................................................................................................................................... 111type.................................................................................................................................................................................... 111
CSSStyleSheet Object .............................................................................................................................................................. 112Acquiring a CSSStyleSheet object................................................................................................................................. 112CSSStyleSheet object properties................................................................................................................................... 113
cssRules ............................................................................................................................................................................ 113ownerRule ....................................................................................................................................................................... 113
CSSStyleSheet object functions..................................................................................................................................... 113deleteRule ....................................................................................................................................................................... 113insertRule......................................................................................................................................................................... 113
CSSUnknownRule Object ....................................................................................................................................................... 114Acquiring a CSSPageRule object ................................................................................................................................... 114CSSPageRule object properties ..................................................................................................................................... 114
cssText .............................................................................................................................................................................. 114parentRule....................................................................................................................................................................... 114parentStyleSheet .......................................................................................................................................................... 114
Adobe GoLive CS2SDK Programmers Reference xii
type.................................................................................................................................................................................... 114DAV Object .................................................................................................................................................................................. 115
Acquiring a DAV object..................................................................................................................................................... 115DAV object properties....................................................................................................................................................... 115
absurl................................................................................................................................................................................. 115access ................................................................................................................................................................................ 115connected........................................................................................................................................................................ 115creationDate................................................................................................................................................................... 115error ................................................................................................................................................................................... 115exists.................................................................................................................................................................................. 115host .................................................................................................................................................................................... 116isFolder ............................................................................................................................................................................. 116lastError ............................................................................................................................................................................ 116lastname........................................................................................................................................................................... 116modificationDate.......................................................................................................................................................... 116parent................................................................................................................................................................................ 116relurl .................................................................................................................................................................................. 116size ..................................................................................................................................................................................... 116
DAV object functions.............................................................................