144
Chapter 11: Application
Example
The following example calls the
dw.getFlashPath()
function to obtain the path to the Flash
application and then passes the path in the form of a file://URL to the
dw.openWithApp()
function to open the document with Flash:
var myDoc = dreamweaver.getDocumentDOM();
if (dreamweaver.validateFlash()) {
var flashArray = dreamweaver.getFlashPath();
dreamweaver.openWithApp(myDoc.myForm.swfFilePath, flashArray[1]);
}
dreamweaver.getPrimaryBrowser()
Availability
Dreamweaver 3.
Description
Gets the path to the primary browser.
Arguments
None.
Returns
A string that contains the path on the user’s computer to the primary browser, which is expressed
as a file:// URL. If no primary browser is defined, it returns nothing.
dreamweaver.getPrimaryExtensionEditor()
Availability
Dreamweaver 3.
Description
Gets the primary editor for the specified file.
Arguments
fileURL
•
The
fileURL
argument is the path to the file to open, which is expressed as a file:// URL.
Returns
An array that contains a pair of strings. The first string in the pair is the name of the editor, and
the second string is its location on the user’s computer, which is expressed as a file:// URL. If no
primary editor is defined, the function returns an array that contains one empty string.
000_DW_API_Print.book Page 144 Wednesday, August 20, 2003 9:14 AM
Summary of Contents for DREAMWEAVER MX 2004-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 24: ...24 Contents...
Page 32: ......
Page 70: ...70 Chapter 5 Fireworks Integration...
Page 76: ...76 Chapter 6 Flash Integration...
Page 116: ...116 Chapter 9 The JavaBeans API...
Page 140: ......
Page 152: ...152 Chapter 11 Application...
Page 218: ...218 Chapter 12 Workspace...
Page 248: ...248 Chapter 13 Site...
Page 292: ...292 Chapter 14 Document...
Page 378: ...378 Chapter 17 Design...
Page 430: ...430 Chapter 18 Code...
Page 486: ...486 Index...