Professional Documents
Culture Documents
5 Help Manual
©2006 Multidmedia Limited {mdm}
I ZINC™ v2.5 Help Manual
Table of Contents
Foreword 0
Part I Introduction 2
1 Welcome ................................................................................................................................... 2
2 System Requirements
................................................................................................................................... 2
3 What's New in...................................................................................................................................
2.5? 2
{mdm}Script
.........................................................................................................................................................
2.0 Usage 32
{mdm}Script
.........................................................................................................................................................
2.0 Advanced Usage 32
4 Forms ................................................................................................................................... 33
Forms Overview
.......................................................................................................................................................... 33
Working with ..........................................................................................................................................................
Forms 33
5 Templates ................................................................................................................................... 35
Templates Overview
.......................................................................................................................................................... 35
Saving a Template
.......................................................................................................................................................... 35
Loading a Template
.......................................................................................................................................................... 36
6 CD/DVD Burning
................................................................................................................................... 37
Creating a CD/DVD
.......................................................................................................................................................... 37
7 Icon Resources
................................................................................................................................... 38
ICO .......................................................................................................................................................... 38
ICO Overview
......................................................................................................................................................... 38
Adding an.........................................................................................................................................................
ICO Resource 39
ICNS .......................................................................................................................................................... 39
ICNS Overview
......................................................................................................................................................... 39
Adding an.........................................................................................................................................................
ICNS Resource 39
8 Installers ................................................................................................................................... 39
Overview .......................................................................................................................................................... 39
Building an Installer
.......................................................................................................................................................... 40
9 Mac OSX ................................................................................................................................... 41
Overview .......................................................................................................................................................... 41
Compiling for..........................................................................................................................................................
Mac OSX from Windows 41
10 CMD Edition................................................................................................................................... 43
Introduction .......................................................................................................................................................... 43
Quickstart Guide
.......................................................................................................................................................... 44
Mapping Network
..........................................................................................................................................................
Locations 45
Part V Tutorials 55
1 Command Line
...................................................................................................................................
Parameters 55
Introduction .......................................................................................................................................................... 55
Step 1 .......................................................................................................................................................... 55
Step 2 .......................................................................................................................................................... 55
Step 3 .......................................................................................................................................................... 56
2 Creating an Extension
................................................................................................................................... 56
Introduction .......................................................................................................................................................... 56
Step 1 .......................................................................................................................................................... 56
Step 2 .......................................................................................................................................................... 59
Step 3 .......................................................................................................................................................... 62
II
III ZINC™ v2.5 Help Manual
Step 4 .......................................................................................................................................................... 64
Step 5 .......................................................................................................................................................... 64
3 Custom File ...................................................................................................................................
Menu 65
Introduction .......................................................................................................................................................... 65
Step 1 .......................................................................................................................................................... 65
Step 2 .......................................................................................................................................................... 66
Step 3 .......................................................................................................................................................... 67
Step 4 .......................................................................................................................................................... 67
4 Database Connectivity
................................................................................................................................... 67
Introduction .......................................................................................................................................................... 67
Step 1 .......................................................................................................................................................... 68
Step 2 .......................................................................................................................................................... 68
Step 3 .......................................................................................................................................................... 68
Step 4 .......................................................................................................................................................... 69
5 Masking Projectors
................................................................................................................................... 70
Introduction .......................................................................................................................................................... 70
Step 1 .......................................................................................................................................................... 70
Step 2 .......................................................................................................................................................... 70
Step 3 .......................................................................................................................................................... 71
6 Packing & Extracting
...................................................................................................................................
Files 71
Introduction .......................................................................................................................................................... 71
Step 1 .......................................................................................................................................................... 71
Step 2 .......................................................................................................................................................... 72
Step 3 .......................................................................................................................................................... 72
7 Socket Communication
................................................................................................................................... 72
Introduction .......................................................................................................................................................... 72
Step 1 .......................................................................................................................................................... 73
Step 2 .......................................................................................................................................................... 74
Step 3 .......................................................................................................................................................... 74
8 Using Video ................................................................................................................................... 74
Introduction .......................................................................................................................................................... 74
Step 1 .......................................................................................................................................................... 74
Step 2 .......................................................................................................................................................... 75
Step 3 .......................................................................................................................................................... 75
Step 4 .......................................................................................................................................................... 75
9 Global & Secure
...................................................................................................................................
Variables 76
Introduction .......................................................................................................................................................... 76
Step 1 .......................................................................................................................................................... 76
Step 2 .......................................................................................................................................................... 76
Step 3 .......................................................................................................................................................... 77
ActiveX.doVerbInPlaceActivate()
......................................................................................................................................................... 83
ActiveX.doVerbPrimary()
......................................................................................................................................................... 84
ActiveX.doVerbOpen()
......................................................................................................................................................... 85
ActiveX.doVerbShow()
......................................................................................................................................................... 85
ActiveX.doVerbUIActivate()
......................................................................................................................................................... 86
ActiveX.getProperty()
......................................................................................................................................................... 86
ActiveX.hide()
......................................................................................................................................................... 87
ActiveX.loadObject()
......................................................................................................................................................... 87
ActiveX.runMethod()
......................................................................................................................................................... 88
ActiveX.runMethodRet()
......................................................................................................................................................... 88
ActiveX.saveDoc()
......................................................................................................................................................... 89
ActiveX.saveObject()
......................................................................................................................................................... 90
ActiveX.setProperty()
......................................................................................................................................................... 90
ActiveX.show()
......................................................................................................................................................... 91
Properties .......................................................................................................................................................... 91
ActiveX.height
......................................................................................................................................................... 91
ActiveX.visible
......................................................................................................................................................... 92
ActiveX.width
......................................................................................................................................................... 92
ActiveX.x ......................................................................................................................................................... 92
ActiveX.y ......................................................................................................................................................... 93
2 mdm.Application
................................................................................................................................... 93
Objects .......................................................................................................................................................... 95
Application.Library
......................................................................................................................................................... 95
Methods ......................................................................................................................................... 96
Application.Library.extractAllToDir()
................................................................................................................................... 96
Application.Library.extractAllToExecPath()
................................................................................................................................... 96
Application.Library.extractToExecPath()
................................................................................................................................... 97
Application.Library.extractToFile()
................................................................................................................................... 97
Application.Library.extractToVar()
................................................................................................................................... 98
Application.Screensaver
......................................................................................................................................................... 98
Methods ......................................................................................................................................... 98
Application.Screensaver.mouseMoveExits()
................................................................................................................................... 98
Application.Screensaver.keyPressExits()
................................................................................................................................... 99
Application.Timer
......................................................................................................................................................... 99
Methods ......................................................................................................................................... 100
Application.Timer.start()
................................................................................................................................... 100
Application.Timer.stop()
................................................................................................................................... 100
Application.Timer.stopAll()
................................................................................................................................... 101
Events ......................................................................................................................................... 101
onTimerX ................................................................................................................................... 101
Application.Trial
......................................................................................................................................................... 102
Methods ......................................................................................................................................... 102
Application.Trial.activate()
................................................................................................................................... 102
Application.Trial.evaluate()
................................................................................................................................... 103
Application.Trial.resetTimer()
................................................................................................................................... 104
Properties ......................................................................................................................................... 104
Application.Trial.daysLeft
................................................................................................................................... 104
Application.Trial.expired
................................................................................................................................... 104
Application.Trial.tampered
................................................................................................................................... 105
Application.Trial.usesLeft
................................................................................................................................... 105
Methods .......................................................................................................................................................... 106
Application.bringToFront()
......................................................................................................................................................... 106
Application.delay()
......................................................................................................................................................... 106
Application.doEvents()
......................................................................................................................................................... 107
IV
V ZINC™ v2.5 Help Manual
Application.enableExitHandler()
......................................................................................................................................................... 107
Application.exit()
......................................................................................................................................................... 108
Application.exitWithCode()
......................................................................................................................................................... 108
Application.exitWithModalResult()
......................................................................................................................................................... 109
Application.getCMDParams()
......................................................................................................................................................... 109
Application.getEnvVar()
......................................................................................................................................................... 110
Application.getSecureVar()
......................................................................................................................................................... 111
Application.maximize()
......................................................................................................................................................... 111
Application.minimize()
......................................................................................................................................................... 112
Application.minimizeToTray()
......................................................................................................................................................... 112
Application.printVar()
......................................................................................................................................................... 113
Application.restore()
......................................................................................................................................................... 113
Application.say()
......................................................................................................................................................... 114
Application.sendToBack()
......................................................................................................................................................... 114
Application.setEnvVar()
......................................................................................................................................................... 115
Application.shake()
......................................................................................................................................................... 115
Application.showTips()
......................................................................................................................................................... 116
Application.textAreaEnhance()
......................................................................................................................................................... 117
Properties .......................................................................................................................................................... 117
Application.filename
......................................................................................................................................................... 117
Application.filenameUnicode
......................................................................................................................................................... 117
Application.filenameUnix
......................................................................................................................................................... 118
Application.isMinimized
......................................................................................................................................................... 118
Application.path
......................................................................................................................................................... 119
Application.pathUnicode
......................................................................................................................................................... 119
Application.pathUnix
......................................................................................................................................................... 120
Application.title
......................................................................................................................................................... 120
Events .......................................................................................................................................................... 120
onAppChangeFocus
......................................................................................................................................................... 120
onAppExit......................................................................................................................................................... 121
onAppMinimize
......................................................................................................................................................... 121
onAppRestore
......................................................................................................................................................... 122
onArrowKeyPress
......................................................................................................................................................... 122
onBottomHit
......................................................................................................................................................... 123
onDragDrop
......................................................................................................................................................... 123
onFormChangeFocus
......................................................................................................................................................... 124
onFormClose
......................................................................................................................................................... 124
onFormMaximize
......................................................................................................................................................... 125
onFormMinimize
......................................................................................................................................................... 125
onFormReposition
......................................................................................................................................................... 126
onFormResize
......................................................................................................................................................... 126
onFormRestore
......................................................................................................................................................... 127
onLeftHit......................................................................................................................................................... 127
onMDMScriptException
......................................................................................................................................................... 128
onMDMScriptExceptionOSX
......................................................................................................................................................... 128
onRightHit
......................................................................................................................................................... 129
onSplashClosed
......................................................................................................................................................... 129
onTopHit......................................................................................................................................................... 130
3 mdm.AppleScript
................................................................................................................................... 130
Methods .......................................................................................................................................................... 131
AppleScript.compileScript()
......................................................................................................................................................... 131
AppleScript.getCompilationError()
......................................................................................................................................................... 131
AppleScript.getLastError()
......................................................................................................................................................... 132
AppleScript.getProperty()
......................................................................................................................................................... 132
AppleScript.getResult()
......................................................................................................................................................... 133
AppleScript.run()
......................................................................................................................................................... 133
AppleScript.runEvent()
......................................................................................................................................................... 134
AppleScript.setProperty()
......................................................................................................................................................... 135
AppleScript.setScript()
......................................................................................................................................................... 135
4 mdm.Audio................................................................................................................................... 136
Methods .......................................................................................................................................................... 136
Audio.isRecording()
......................................................................................................................................................... 136
Audio.startRecording()
......................................................................................................................................................... 137
Audio.startRecordingWithAutoOff()
......................................................................................................................................................... 137
Audio.stopRecording()
......................................................................................................................................................... 138
5 mdm.Browser
................................................................................................................................... 139
Constructor .......................................................................................................................................................... 140
mdm.Browser()
......................................................................................................................................................... 140
Methods .......................................................................................................................................................... 141
Browser.addFavorite()
......................................................................................................................................................... 141
Browser.back()
......................................................................................................................................................... 142
Browser.close()
......................................................................................................................................................... 142
Browser.forward()
......................................................................................................................................................... 143
Browser.goto()
......................................................................................................................................................... 143
Browser.gotoTarget()
......................................................................................................................................................... 144
Browser.hide()
......................................................................................................................................................... 144
Browser.print()
......................................................................................................................................................... 145
Browser.printCopies()
......................................................................................................................................................... 145
Browser.printFooter()
......................................................................................................................................................... 146
Browser.printHeader()
......................................................................................................................................................... 146
Browser.printHTMLHeader()
......................................................................................................................................................... 147
Browser.printMargins()
......................................................................................................................................................... 147
Browser.printOrientation()
......................................................................................................................................................... 148
Browser.printPreview()
......................................................................................................................................................... 148
Browser.refresh()
......................................................................................................................................................... 149
Browser.setSourceInTarget()
......................................................................................................................................................... 149
Browser.show()
......................................................................................................................................................... 150
Browser.stop()
......................................................................................................................................................... 150
Properties .......................................................................................................................................................... 151
Browser.favorites
......................................................................................................................................................... 151
Browser.height
......................................................................................................................................................... 151
Browser.isBusy
......................................................................................................................................................... 152
Browser.source
......................................................................................................................................................... 152
Browser.title
......................................................................................................................................................... 153
Browser.url
......................................................................................................................................................... 153
Browser.userAgent
......................................................................................................................................................... 153
Browser.visible
......................................................................................................................................................... 154
Browser.width
......................................................................................................................................................... 154
Browser.x......................................................................................................................................................... 155
Browser.y......................................................................................................................................................... 155
Events .......................................................................................................................................................... 156
onDocumentComplete
......................................................................................................................................................... 156
6 mdm.Clipboard
................................................................................................................................... 156
Methods .......................................................................................................................................................... 156
Clipboard.clear()
......................................................................................................................................................... 156
Clipboard.copy()
......................................................................................................................................................... 157
Clipboard.copyString()
......................................................................................................................................................... 157
VI
VII ZINC™ v2.5 Help Manual
Clipboard.cut()
......................................................................................................................................................... 158
Clipboard.paste()
......................................................................................................................................................... 159
7 mdm.COMPort
................................................................................................................................... 159
Methods .......................................................................................................................................................... 161
COMPort.close()
......................................................................................................................................................... 161
COMPort.open()
......................................................................................................................................................... 161
COMPort.send()
......................................................................................................................................................... 162
COMPort.sendFileContents()
......................................................................................................................................................... 162
COMPort.sendHEXData()
......................................................................................................................................................... 163
COMPort.setBreak()
......................................................................................................................................................... 163
COMPort.setDTR()
......................................................................................................................................................... 164
COMPort.setEcho()
......................................................................................................................................................... 164
COMPort.setRTS()
......................................................................................................................................................... 164
COMPort.setXON()
......................................................................................................................................................... 165
COMPort.setXOFF()
......................................................................................................................................................... 165
COMPort.unsetBreak()
......................................................................................................................................................... 166
COMPort.unsetDTR()
......................................................................................................................................................... 166
COMPort.unsetRTS()
......................................................................................................................................................... 167
COMPort.useLineMode()
......................................................................................................................................................... 167
COMPort.useThreshold()
......................................................................................................................................................... 168
Properties .......................................................................................................................................................... 168
COMPort.initialDTR
......................................................................................................................................................... 168
COMPort.initialRTS
......................................................................................................................................................... 169
COMPort.ports
......................................................................................................................................................... 169
COMPort.rxBuffer
......................................................................................................................................................... 170
COMPort.txBuffer
......................................................................................................................................................... 170
Events .......................................................................................................................................................... 170
onCOMPortCTSChanged
......................................................................................................................................................... 170
onCOMPortDSRChanged
......................................................................................................................................................... 171
onCOMPortData
......................................................................................................................................................... 171
onCOMPortHEXData
......................................................................................................................................................... 172
onCOMPortDataSent
......................................................................................................................................................... 172
onCOMPortError
......................................................................................................................................................... 173
onCOMPortSendProgress
......................................................................................................................................................... 174
8 mdm.Database
................................................................................................................................... 174
Objects .......................................................................................................................................................... 175
Database.ADO
......................................................................................................................................................... 175
Methods ......................................................................................................................................... 175
Database.ADO.close() ................................................................................................................................... 175
Database.ADO.connect()................................................................................................................................... 176
Database.ADO.error() ................................................................................................................................... 176
Database.ADO.errorDetails()
................................................................................................................................... 177
Database.ADO.getBlob()................................................................................................................................... 177
Database.ADO.getData()................................................................................................................................... 178
Database.ADO.getField()
................................................................................................................................... 179
Database.ADO.getHTML()................................................................................................................................... 179
Database.ADO.getRecordCount()
................................................................................................................................... 180
Database.ADO.getXML() ................................................................................................................................... 180
Database.ADO.runQuery()
................................................................................................................................... 181
Database.ADO.select() ................................................................................................................................... 181
Database.ADO.success()................................................................................................................................... 182
Database.MSAccess
......................................................................................................................................................... 182
Methods ......................................................................................................................................... 183
Database.MSAccess.close()
................................................................................................................................... 183
Database.MSAccess.compact()
................................................................................................................................... 183
Database.MSAccess.connect()
................................................................................................................................... 184
Database.MSAccess.connectAbs()
................................................................................................................................... 184
Database.MSAccess.connectReadOnly()
................................................................................................................................... 185
Database.MSAccess.connectReadOnlyAbs()
................................................................................................................................... 186
Database.MSAccess.error()
................................................................................................................................... 186
Database.MSAccess.errorDetails()
................................................................................................................................... 187
Database.MSAccess.getBlob()
................................................................................................................................... 187
Database.MSAccess.getData()
................................................................................................................................... 188
Database.MSAccess.getField()
................................................................................................................................... 189
Database.MSAccess.getHTML()
................................................................................................................................... 189
Database.MSAccess.getRecordCount()
................................................................................................................................... 189
Database.MSAccess.getXML()
................................................................................................................................... 190
Database.MSAccess.runQuery()
................................................................................................................................... 190
Database.MSAccess.select()
................................................................................................................................... 191
Database.MSAccess.success()
................................................................................................................................... 191
Database.MySQL
......................................................................................................................................................... 192
Methods ......................................................................................................................................... 192
Database.MySQL.close()................................................................................................................................... 192
Database.MySQL.connect()
................................................................................................................................... 193
Database.MySQL.getData()
................................................................................................................................... 194
Database.MySQL.getField()
................................................................................................................................... 194
Database.MySQL.getLastError()
................................................................................................................................... 195
Database.MySQL.getLastInsertedId()
................................................................................................................................... 195
Database.MySQL.getRecordCount()
................................................................................................................................... 196
Database.MySQL.getStatus()
................................................................................................................................... 196
Database.MySQL.isConnected
................................................................................................................................... 197
Database.MySQL.runQuery
................................................................................................................................... 197
9 mdm.Dialogs
................................................................................................................................... 198
Objects .......................................................................................................................................................... 198
Dialogs.BrowseFile
......................................................................................................................................................... 198
Methods ......................................................................................................................................... 199
Dialogs.BrowseFile.show()
................................................................................................................................... 199
Dialogs.BrowseFile.showCreatorCode()
................................................................................................................................... 200
Properties ......................................................................................................................................... 200
Dialogs.BrowseFile.allowMultiple
................................................................................................................................... 200
Dialogs.BrowseFile.buttonText
................................................................................................................................... 201
Dialogs.BrowseFile.creatorCode
................................................................................................................................... 201
Dialogs.BrowseFile.defaultDirectory
................................................................................................................................... 202
Dialogs.BrowseFile.defaultExtension
................................................................................................................................... 202
Dialogs.BrowseFile.defaultFilename
................................................................................................................................... 202
Dialogs.BrowseFile.dialogText
................................................................................................................................... 203
Dialogs.BrowseFile.filterList
................................................................................................................................... 203
Dialogs.BrowseFile.filterText
................................................................................................................................... 204
Dialogs.BrowseFile.title
................................................................................................................................... 204
Dialogs.BrowseFileUnicode
......................................................................................................................................................... 205
Methods ......................................................................................................................................... 205
Dialogs.BrowseFileUnicode.show()
................................................................................................................................... 205
Properties ......................................................................................................................................... 206
Dialogs.BrowseFileUnicode.allowMultiple
................................................................................................................................... 206
Dialogs.BrowseFileUnicode.defaultDirectory
................................................................................................................................... 206
Dialogs.BrowseFileUnicode.defaultExtension
................................................................................................................................... 207
Dialogs.BrowseFileUnicode.defaultFilename
................................................................................................................................... 207
VIII
IX ZINC™ v2.5 Help Manual
Dialogs.BrowseFileUnicode.filterList
................................................................................................................................... 208
Dialogs.BrowseFileUnicode.title
................................................................................................................................... 208
Dialogs.BrowseFileToSave
......................................................................................................................................................... 209
Methods ......................................................................................................................................... 209
Dialogs.BrowseFileToSave.show()
................................................................................................................................... 209
Dialogs.BrowseFolder
......................................................................................................................................................... 210
Methods ......................................................................................................................................... 210
Dialogs.BrowseFolder.show()
................................................................................................................................... 210
Properties ......................................................................................................................................... 211
Dialogs.BrowseFolder.defaultDirectory
................................................................................................................................... 211
Dialogs.BrowseFolder.title
................................................................................................................................... 211
Methods .......................................................................................................................................................... 212
Dialogs.inputBox()
......................................................................................................................................................... 212
Dialogs.prompt()
......................................................................................................................................................... 212
Dialogs.promptUnicode()
......................................................................................................................................................... 213
Dialogs.promptAdv()
......................................................................................................................................................... 213
Dialogs.promptAdvUnicode()
......................................................................................................................................................... 214
Dialogs.promptModal()
......................................................................................................................................................... 214
Dialogs.promptModalUnicode()
......................................................................................................................................................... 215
10 mdm.DLL ................................................................................................................................... 216
Constructor .......................................................................................................................................................... 216
mdm.DLL()......................................................................................................................................................... 216
Methods .......................................................................................................................................................... 217
DLL.addParameter()
......................................................................................................................................................... 217
DLL.call()
......................................................................................................................................................... 218
DLL.clear()
......................................................................................................................................................... 219
DLL.close()
......................................................................................................................................................... 219
11 mdm.Encryption
................................................................................................................................... 219
Methods .......................................................................................................................................................... 220
Encryption.decryptFile()
......................................................................................................................................................... 220
Encryption.decryptString()
......................................................................................................................................................... 220
Encryption.encryptFile()
......................................................................................................................................................... 221
Encryption.encryptString()
......................................................................................................................................................... 221
12 mdm.Exception
................................................................................................................................... 222
Objects .......................................................................................................................................................... 223
Exception.DebugWindow
......................................................................................................................................................... 223
Methods ......................................................................................................................................... 223
Exception.DebugWindow.hide()
................................................................................................................................... 223
Exception.DebugWindow.show()
................................................................................................................................... 223
Exception.DebugWindow.trace()
................................................................................................................................... 224
Methods .......................................................................................................................................................... 224
Exception.disableHandler()
......................................................................................................................................................... 224
Exception.enableHandler()
......................................................................................................................................................... 225
Exception.resetHandler()
......................................................................................................................................................... 226
Exception.showErrors()
......................................................................................................................................................... 226
Exception.trapErrors()
......................................................................................................................................................... 226
13 mdm.FileExplorer
................................................................................................................................... 227
Objects .......................................................................................................................................................... 228
FileExplorer.ComboBox
......................................................................................................................................................... 228
Methods ......................................................................................................................................... 228
FileExplorer.ComboBox.getPath()
................................................................................................................................... 228
FileExplorer.ComboBox.hide()
................................................................................................................................... 229
FileExplorer.ComboBox.setPath()
................................................................................................................................... 229
FileExplorer.ComboBox.show()
................................................................................................................................... 230
FileExplorer.ListView
......................................................................................................................................................... 231
Methods ......................................................................................................................................... 231
FileExplorer.ListView.dblClickExecutes()
................................................................................................................................... 231
FileExplorer.ListView.getItems()
................................................................................................................................... 232
FileExplorer.ListView.getSelected()
................................................................................................................................... 233
FileExplorer.ListView.hide()
................................................................................................................................... 233
FileExplorer.ListView.hideHiddenFiles()
................................................................................................................................... 234
FileExplorer.ListView.showHiddenFiles()
................................................................................................................................... 234
FileExplorer.ListView.setViewStyle()
................................................................................................................................... 235
FileExplorer.ListView.show()
................................................................................................................................... 235
FileExplorer.TreeView
......................................................................................................................................................... 236
Methods ......................................................................................................................................... 237
FileExplorer.TreeView.getSelected()
................................................................................................................................... 237
FileExplorer.TreeView.getPath()
................................................................................................................................... 237
FileExplorer.TreeView.hide()
................................................................................................................................... 238
FileExplorer.TreeView.hideHiddenFiles()
................................................................................................................................... 238
FileExplorer.TreeView.setPath()
................................................................................................................................... 239
FileExplorer.TreeView.show()
................................................................................................................................... 240
FileExplorer.TreeView.showHiddenFiles()
................................................................................................................................... 241
Methods .......................................................................................................................................................... 241
FileExplorer.init()
......................................................................................................................................................... 241
Events .......................................................................................................................................................... 242
onFileListViewDblClick
......................................................................................................................................................... 242
14 mdm.FileSystem
................................................................................................................................... 242
Objects .......................................................................................................................................................... 244
FileSystem.BinaryFile
......................................................................................................................................................... 244
FileSystem.BinaryFile.appendData()
......................................................................................................................................... 244
FileSystem.BinaryFile.setData()
......................................................................................................................................... 245
FileSystem.BinaryFile.writeData()
......................................................................................................................................... 245
Methods .......................................................................................................................................................... 246
FileSystem.appendFile()
......................................................................................................................................................... 246
FileSystem.appendFileUnicode()
......................................................................................................................................................... 246
FileSystem.copyFile()
......................................................................................................................................................... 247
FileSystem.copyFileUnicode()
......................................................................................................................................................... 247
FileSystem.copyFolder()
......................................................................................................................................................... 248
FileSystem.createShortcut()
......................................................................................................................................................... 248
FileSystem.deleteFile()
......................................................................................................................................................... 249
FileSystem.deleteFileUnicode()
......................................................................................................................................................... 249
FileSystem.deleteFolder()
......................................................................................................................................................... 250
FileSystem.deleteFolderUnicode()
......................................................................................................................................................... 250
FileSystem.fileExists()
......................................................................................................................................................... 251
FileSystem.fileExistsUnicode()
......................................................................................................................................................... 251
FileSystem.findFile()
......................................................................................................................................................... 252
FileSystem.folderExists()
......................................................................................................................................................... 252
FileSystem.folderExistsUnicode()
......................................................................................................................................................... 253
FileSystem.getAssociation()
......................................................................................................................................................... 253
FileSystem.getCurrentDir()
......................................................................................................................................................... 253
FileSystem.getCurrentDirUnicode()
......................................................................................................................................................... 254
FileSystem.getFileAttribs()
......................................................................................................................................................... 254
FileSystem.getFileCreator()
......................................................................................................................................................... 255
FileSystem.getFileDate()
......................................................................................................................................................... 255
FileSystem.getFileSize()
......................................................................................................................................................... 256
FileSystem.getFileTime()
......................................................................................................................................................... 256
X
XI ZINC™ v2.5 Help Manual
FileSystem.getFileType()
......................................................................................................................................................... 257
FileSystem.getFileList()
......................................................................................................................................................... 257
FileSystem.getFolderList()
......................................................................................................................................................... 258
FileSystem.getFolderSize()
......................................................................................................................................................... 258
FileSystem.getLongPathName()
......................................................................................................................................................... 259
FileSystem.getShortPathName()
......................................................................................................................................................... 259
FileSystem.loadFile()
......................................................................................................................................................... 260
FileSystem.loadFileHEX()
......................................................................................................................................................... 260
FileSystem.loadFileUnicode()
......................................................................................................................................................... 260
FileSystem.makeFolder()
......................................................................................................................................................... 261
FileSystem.makeFolderUnicode()
......................................................................................................................................................... 261
FileSystem.nativePathToUnixPath()
......................................................................................................................................................... 262
FileSystem.saveFile()
......................................................................................................................................................... 262
FileSystem.saveFileHEX()
......................................................................................................................................................... 263
FileSystem.saveFileUnicode()
......................................................................................................................................................... 263
FileSystem.setCurrentDir()
......................................................................................................................................................... 264
FileSystem.setCurrentDirUnicode()
......................................................................................................................................................... 264
FileSystem.setFileAttribs()
......................................................................................................................................................... 265
15 mdm.Flash ................................................................................................................................... 265
Methods .......................................................................................................................................................... 266
Flash.allowScale()
......................................................................................................................................................... 266
Flash.baseURL()
......................................................................................................................................................... 266
Flash.callFunction()
......................................................................................................................................................... 267
Flash.callFunctionUnicode()
......................................................................................................................................................... 267
Flash.getVar()
......................................................................................................................................................... 268
Flash.getVarUnicode()
......................................................................................................................................................... 269
Flash.loadMovie()
......................................................................................................................................................... 269
Flash.setShowAllMode()
......................................................................................................................................................... 270
Flash.setSWFDir()
......................................................................................................................................................... 270
Flash.setSWFDirAdv()
......................................................................................................................................................... 271
Flash.setVar()
......................................................................................................................................................... 271
Flash.setVarUnicode()
......................................................................................................................................................... 272
16 mdm.Forms................................................................................................................................... 272
Methods .......................................................................................................................................................... 274
Forms.addMask()
......................................................................................................................................................... 274
Forms.callFunction()
......................................................................................................................................................... 274
Forms.callFunctionUnicode()
......................................................................................................................................................... 275
Forms.constraints()
......................................................................................................................................................... 275
Forms.dndDisable()
......................................................................................................................................................... 276
Forms.dndEnable()
......................................................................................................................................................... 276
Forms.goToFrame()
......................................................................................................................................................... 277
Forms.goToLabel()
......................................................................................................................................................... 277
Forms.hide()
......................................................................................................................................................... 278
Forms.hideMask()
......................................................................................................................................................... 278
Forms.hideCaption()
......................................................................................................................................................... 279
Forms.hideStatusBar()
......................................................................................................................................................... 279
Forms.maximize()
......................................................................................................................................................... 279
Forms.minimize()
......................................................................................................................................................... 280
Forms.restore()
......................................................................................................................................................... 280
Forms.setFocus()
......................................................................................................................................................... 281
Forms.setStatusBarText()
......................................................................................................................................................... 281
Forms.shake()
......................................................................................................................................................... 282
Forms.show()
......................................................................................................................................................... 282
Forms.showFullScreen()
......................................................................................................................................................... 283
Forms.showInScreen()
......................................................................................................................................................... 283
Forms.showMask()
......................................................................................................................................................... 284
Forms.showModal()
......................................................................................................................................................... 284
Forms.showStatusBar()
......................................................................................................................................................... 284
Forms.startDrag()
......................................................................................................................................................... 285
Forms.stopDrag()
......................................................................................................................................................... 285
Properties .......................................................................................................................................................... 286
Forms.alpha
......................................................................................................................................................... 286
Forms.baseURL
......................................................................................................................................................... 286
Forms.bgColor
......................................................................................................................................................... 287
Forms.height
......................................................................................................................................................... 287
Forms.isCreated
......................................................................................................................................................... 288
Forms.title
......................................................................................................................................................... 288
Forms.titleUnicode
......................................................................................................................................................... 288
Forms.visible
......................................................................................................................................................... 289
Forms.width
......................................................................................................................................................... 289
Forms.windowState
......................................................................................................................................................... 290
Forms.x......................................................................................................................................................... 290
Forms.y......................................................................................................................................................... 291
17 mdm.FTP ................................................................................................................................... 291
Constructor .......................................................................................................................................................... 293
mdm.FTP()......................................................................................................................................................... 293
Methods .......................................................................................................................................................... 294
FTP.abort()
......................................................................................................................................................... 294
FTP.chDir()
......................................................................................................................................................... 295
FTP.close()
......................................................................................................................................................... 295
FTP.deleteDir()
......................................................................................................................................................... 296
FTP.deleteFile()
......................................................................................................................................................... 296
FTP.dirExists()
......................................................................................................................................................... 297
FTP.fileExists()
......................................................................................................................................................... 297
FTP.getDirAttribs()
......................................................................................................................................................... 298
FTP.getDirDateTime()
......................................................................................................................................................... 298
FTP.getFile()
......................................................................................................................................................... 299
FTP.getFileList()
......................................................................................................................................................... 299
FTP.getFileAttribs()
......................................................................................................................................................... 300
FTP.getFileDateTime()
......................................................................................................................................................... 300
FTP.getFileSize()
......................................................................................................................................................... 301
FTP.getFolderList()
......................................................................................................................................................... 301
FTP.login()
......................................................................................................................................................... 302
FTP.makeDir()
......................................................................................................................................................... 302
FTP.moveFile()
......................................................................................................................................................... 303
FTP.refresh()
......................................................................................................................................................... 304
FTP.renameFile()
......................................................................................................................................................... 304
FTP.resumePosition()
......................................................................................................................................................... 305
FTP.sendCommand()
......................................................................................................................................................... 305
FTP.sendFile()
......................................................................................................................................................... 306
FTP.setProxy()
......................................................................................................................................................... 306
Properties .......................................................................................................................................................... 307
FTP.account
......................................................................................................................................................... 307
FTP.async......................................................................................................................................................... 307
FTP.bytesTransferred
......................................................................................................................................................... 308
FTP.currentDir
......................................................................................................................................................... 308
FTP.error......................................................................................................................................................... 308
XII
XIII ZINC™ v2.5 Help Manual
FTP.initialDir
......................................................................................................................................................... 309
FTP.isBusy
......................................................................................................................................................... 310
FTP.isConnected
......................................................................................................................................................... 310
FTP.lastReply
......................................................................................................................................................... 311
FTP.loggerData
......................................................................................................................................................... 311
FTP.NOOP ......................................................................................................................................................... 311
FTP.passive
......................................................................................................................................................... 312
FTP.serverType
......................................................................................................................................................... 312
FTP.success
......................................................................................................................................................... 313
FTP.supportsResume
......................................................................................................................................................... 313
FTP.timeout
......................................................................................................................................................... 314
FTP.transferMode
......................................................................................................................................................... 314
FTP.transferTime
......................................................................................................................................................... 314
Events .......................................................................................................................................................... 315
onAborted......................................................................................................................................................... 315
onBusy ......................................................................................................................................................... 315
onConnected
......................................................................................................................................................... 316
onDirChanged
......................................................................................................................................................... 316
onDirCreated
......................................................................................................................................................... 317
onDirDeleted
......................................................................................................................................................... 317
onError ......................................................................................................................................................... 317
onFileDeleted
......................................................................................................................................................... 318
onFileReceived
......................................................................................................................................................... 318
onFileRenamed
......................................................................................................................................................... 319
onFileSent
......................................................................................................................................................... 319
onFileTransferred
......................................................................................................................................................... 320
onIndexFileReceived
......................................................................................................................................................... 320
onListingDone
......................................................................................................................................................... 320
onLoggedIn
......................................................................................................................................................... 321
onQuit ......................................................................................................................................................... 321
onReady......................................................................................................................................................... 322
onResolvedLinks
......................................................................................................................................................... 322
18 mdm.HTTP ................................................................................................................................... 323
Constructor .......................................................................................................................................................... 323
mdm.HTTP()
......................................................................................................................................................... 323
Methods .......................................................................................................................................................... 324
HTTP.abort()
......................................................................................................................................................... 324
HTTP.close()
......................................................................................................................................................... 324
HTTP.getFile()
......................................................................................................................................................... 325
HTTP.getString()
......................................................................................................................................................... 325
Events .......................................................................................................................................................... 326
onBinaryTransferComplete
......................................................................................................................................................... 326
onError ......................................................................................................................................................... 326
onProgress
......................................................................................................................................................... 327
onTransferComplete
......................................................................................................................................................... 327
19 mdm.Image................................................................................................................................... 328
Objects .......................................................................................................................................................... 328
Image.ScreenCapture
......................................................................................................................................................... 328
Image.ScreenCapture.toBmp()
......................................................................................................................................... 329
Image.ScreenCapture.toBmpAlt()
......................................................................................................................................... 329
Image.ScreenCapture.toJpg()
......................................................................................................................................... 330
Image.ScreenCapture.movieAreaToBmp()
......................................................................................................................................... 331
Image.ScreenCapture.movieAreaToBmpAlt()
......................................................................................................................................... 331
Image.ScreenCapture.movieToBmp()
......................................................................................................................................... 332
Image.ScreenCapture.movieToBmpAlt()
......................................................................................................................................... 332
Methods .......................................................................................................................................................... 333
Image.bmpToJpg()
......................................................................................................................................................... 333
Image.bmpToJpgAdv()
......................................................................................................................................................... 333
Image.bmpToPng()
......................................................................................................................................................... 334
Image.getJpgSize()
......................................................................................................................................................... 334
Image.getSwfHeader()
......................................................................................................................................................... 335
Image.jpgToBmp()
......................................................................................................................................................... 335
Image.jpgToSwf()
......................................................................................................................................................... 336
Image.jpgToSwfSlideShow()
......................................................................................................................................................... 336
Image.pngToSwf()
......................................................................................................................................................... 337
Image.pngToSwfTransparent()
......................................................................................................................................................... 337
Image.setJpgSize()
......................................................................................................................................................... 338
20 mdm.Input ................................................................................................................................... 338
Objects .......................................................................................................................................................... 339
Input.Joystick
......................................................................................................................................................... 339
Methods ......................................................................................................................................... 339
Input.Joystick.enable()
................................................................................................................................... 339
Input.Joystick.disable()
................................................................................................................................... 340
Input.Joystick.setKey()
................................................................................................................................... 341
Events ......................................................................................................................................... 342
onJoystick1ButtonDown ................................................................................................................................... 342
onJoystick1Move ................................................................................................................................... 343
onJoystick2ButtonDown ................................................................................................................................... 343
onJoystick2Move ................................................................................................................................... 344
Input.Mouse
......................................................................................................................................................... 345
Methods ......................................................................................................................................... 346
Input.Mouse.getPosition()
................................................................................................................................... 346
Input.Mouse.generateEvent()
................................................................................................................................... 346
Input.Mouse.setCursor()
................................................................................................................................... 347
Input.Mouse.setPosition()
................................................................................................................................... 348
Input.Mouse.show() ................................................................................................................................... 348
Input.Mouse.hide() ................................................................................................................................... 348
Input.Tablet
......................................................................................................................................................... 349
Methods ......................................................................................................................................... 349
Input.Tablet.enable() ................................................................................................................................... 349
Input.Tablet.disable()................................................................................................................................... 350
Events ......................................................................................................................................... 350
onTabletEvent................................................................................................................................... 350
Input.Twain
......................................................................................................................................................... 351
Methods ......................................................................................................................................... 351
Input.Twain.acquire() ................................................................................................................................... 351
21 mdm.MacShell
................................................................................................................................... 352
Methods .......................................................................................................................................................... 352
MacShell.close()
......................................................................................................................................................... 352
MacShell.exec()
......................................................................................................................................................... 353
Properties .......................................................................................................................................................... 353
MacShell.exitCode
......................................................................................................................................................... 353
MacShell.isRunning
......................................................................................................................................................... 354
MacShell.output
......................................................................................................................................................... 354
22 mdm.MediaPlayer6
................................................................................................................................... 355
Constructor .......................................................................................................................................................... 356
XIV
XV ZINC™ v2.5 Help Manual
mdm.MediaPlayer6()
......................................................................................................................................................... 356
Methods .......................................................................................................................................................... 357
MediaPlayer6.close()
......................................................................................................................................................... 357
MediaPlayer6.fastForward()
......................................................................................................................................................... 357
MediaPlayer6.fastReverse()
......................................................................................................................................................... 358
MediaPlayer6.fullscreen()
......................................................................................................................................................... 358
MediaPlayer6.hide()
......................................................................................................................................................... 359
MediaPlayer6.mute()
......................................................................................................................................................... 359
MediaPlayer6.noMenu()
......................................................................................................................................................... 359
MediaPlayer6.pause()
......................................................................................................................................................... 360
MediaPlayer6.play()
......................................................................................................................................................... 360
MediaPlayer6.show()
......................................................................................................................................................... 361
MediaPlayer6.stop()
......................................................................................................................................................... 361
Properties .......................................................................................................................................................... 362
MediaPlayer6.balance
......................................................................................................................................................... 362
MediaPlayer6.canScan
......................................................................................................................................................... 362
MediaPlayer6.canSeek
......................................................................................................................................................... 363
MediaPlayer6.duration
......................................................................................................................................................... 363
MediaPlayer6.height
......................................................................................................................................................... 363
MediaPlayer6.isInstalled
......................................................................................................................................................... 364
MediaPlayer6.position
......................................................................................................................................................... 364
MediaPlayer6.volume
......................................................................................................................................................... 365
MediaPlayer6.visible
......................................................................................................................................................... 365
MediaPlayer6.width
......................................................................................................................................................... 366
MediaPlayer6.x
......................................................................................................................................................... 366
MediaPlayer6.y
......................................................................................................................................................... 367
Events .......................................................................................................................................................... 367
onMPChangeState
......................................................................................................................................................... 367
23 mdm.MediaPlayer9
................................................................................................................................... 368
Constructor .......................................................................................................................................................... 369
mdm.MediaPlayer9()
......................................................................................................................................................... 369
Methods .......................................................................................................................................................... 370
MediaPlayer9.close()
......................................................................................................................................................... 370
MediaPlayer9.fastForward()
......................................................................................................................................................... 371
MediaPlayer9.fastReverse()
......................................................................................................................................................... 371
MediaPlayer9.featureAvailable()
......................................................................................................................................................... 372
MediaPlayer9.hide()
......................................................................................................................................................... 372
MediaPlayer9.mute()
......................................................................................................................................................... 373
MediaPlayer9.pause()
......................................................................................................................................................... 373
MediaPlayer9.play()
......................................................................................................................................................... 374
MediaPlayer9.show()
......................................................................................................................................................... 374
MediaPlayer9.stop()
......................................................................................................................................................... 375
Properties .......................................................................................................................................................... 375
MediaPlayer9.balance
......................................................................................................................................................... 375
MediaPlayer9.canScan
......................................................................................................................................................... 376
MediaPlayer9.canSeek
......................................................................................................................................................... 376
MediaPlayer9.currentMarker
......................................................................................................................................................... 376
MediaPlayer9.duration
......................................................................................................................................................... 377
MediaPlayer9.height
......................................................................................................................................................... 377
MediaPlayer9.isInstalled
......................................................................................................................................................... 378
MediaPlayer9.markerCount
......................................................................................................................................................... 378
MediaPlayer9.mediaName
......................................................................................................................................................... 378
MediaPlayer9.mediaHeight
......................................................................................................................................................... 379
MediaPlayer9.mediaWidth
......................................................................................................................................................... 379
MediaPlayer9.position
......................................................................................................................................................... 380
MediaPlayer9.source
......................................................................................................................................................... 380
MediaPlayer9.volume
......................................................................................................................................................... 381
MediaPlayer9.visible
......................................................................................................................................................... 381
MediaPlayer9.width
......................................................................................................................................................... 382
MediaPlayer9.x
......................................................................................................................................................... 382
MediaPlayer9.y
......................................................................................................................................................... 383
Events .......................................................................................................................................................... 383
onWMP9Buffering
......................................................................................................................................................... 383
onWMP9ChangeState
......................................................................................................................................................... 384
onWMP9Error
......................................................................................................................................................... 384
onWMP9PositionChanged
......................................................................................................................................................... 385
24 mdm.Menu ................................................................................................................................... 385
Objects .......................................................................................................................................................... 385
Menu.Context
......................................................................................................................................................... 385
Methods ......................................................................................................................................... 386
Menu.Context.disable()................................................................................................................................... 386
Menu.Context.enable() ................................................................................................................................... 387
Menu.Context.insertDivider()
................................................................................................................................... 387
Menu.Context.insertItem()
................................................................................................................................... 388
Menu.Context.itemChecked()
................................................................................................................................... 388
Menu.Context.itemEnabled()
................................................................................................................................... 389
Menu.Context.itemVisible()
................................................................................................................................... 389
Menu.Context.removeItem()
................................................................................................................................... 390
Properties ......................................................................................................................................... 391
Menu.Context.menuType ................................................................................................................................... 391
Events ......................................................................................................................................... 391
onContextMenuClick_* ................................................................................................................................... 391
Menu.Main
......................................................................................................................................................... 392
Methods ......................................................................................................................................... 393
Menu.Main.insertDivider()
................................................................................................................................... 393
Menu.Main.insertHeader()
................................................................................................................................... 393
Menu.Main.insertItem()................................................................................................................................... 394
Menu.Main.itemChecked()
................................................................................................................................... 394
Menu.Main.itemEnabled()
................................................................................................................................... 395
Menu.Main.itemVisible()
................................................................................................................................... 395
Menu.Main.removeHeader()
................................................................................................................................... 396
Menu.Main.removeItem()................................................................................................................................... 396
Properties ......................................................................................................................................... 397
Menu.Main.menuType ................................................................................................................................... 397
Events ......................................................................................................................................... 398
onMenuClick_*................................................................................................................................... 398
Menu.Tray
......................................................................................................................................................... 398
Methods ......................................................................................................................................... 399
Menu.Tray.hideIcon() ................................................................................................................................... 399
Menu.Tray.insertDivider()
................................................................................................................................... 399
Menu.Tray.insertItem()................................................................................................................................... 400
Menu.Tray.itemChecked()
................................................................................................................................... 400
Menu.Tray.itemEnabled()
................................................................................................................................... 401
Menu.Tray.itemVisible()
................................................................................................................................... 402
Menu.Tray.removeItem()................................................................................................................................... 402
Menu.Tray.setIcon() ................................................................................................................................... 403
Menu.Tray.showBalloon()
................................................................................................................................... 403
Menu.Tray.showIcon() ................................................................................................................................... 404
XVI
XVII ZINC™ v2.5 Help Manual
Network.UDP.TFTP.setTimeOut()
................................................................................................................................... 426
Network.UDP.TFTP.setTransferMode()
................................................................................................................................... 426
Network.UDP.TFTP.startServer()
................................................................................................................................... 427
Network.UDP.TFTP.stopServer()
................................................................................................................................... 427
Methods .......................................................................................................................................................... 428
Network.checkConnection()
......................................................................................................................................................... 428
Network.checkConnectionAdv()
......................................................................................................................................................... 428
Network.checkConnectionPing()
......................................................................................................................................................... 429
Network.getHostByIP()
......................................................................................................................................................... 429
Network.getIPByHost()
......................................................................................................................................................... 430
Network.getMACAddress()
......................................................................................................................................................... 430
Network.getURL()
......................................................................................................................................................... 430
Properties .......................................................................................................................................................... 431
Network.IPAddress
......................................................................................................................................................... 431
Network.isPresent
......................................................................................................................................................... 431
26 mdm.PDF6 ................................................................................................................................... 432
Constructor .......................................................................................................................................................... 433
mdm.PDF6()
......................................................................................................................................................... 433
Methods .......................................................................................................................................................... 434
PDF6.close()
......................................................................................................................................................... 434
PDF6.firstPage()
......................................................................................................................................................... 434
PDF6.hide()
......................................................................................................................................................... 434
PDF6.lastPage()
......................................................................................................................................................... 435
PDF6.loadFile()
......................................................................................................................................................... 435
PDF6.nextPage()
......................................................................................................................................................... 436
PDF6.print()
......................................................................................................................................................... 436
PDF6.printWithDialog()
......................................................................................................................................................... 437
PDF6.printAll()
......................................................................................................................................................... 437
PDF6.printPages()
......................................................................................................................................................... 438
PDF6.previousPage()
......................................................................................................................................................... 438
PDF6.setCurrentPage()
......................................................................................................................................................... 439
PDF6.show()
......................................................................................................................................................... 439
Properties .......................................................................................................................................................... 439
PDF6.height
......................................................................................................................................................... 439
PDF6.scrollbars
......................................................................................................................................................... 440
PDF6.toolbar
......................................................................................................................................................... 440
PDF6.visible
......................................................................................................................................................... 441
PDF6.width
......................................................................................................................................................... 441
PDF6.x ......................................................................................................................................................... 442
PDF6.y ......................................................................................................................................................... 442
27 mdm.PDF7 ................................................................................................................................... 443
Constructor .......................................................................................................................................................... 444
mdm.PDF7()
......................................................................................................................................................... 444
Methods .......................................................................................................................................................... 445
PDF7.close()
......................................................................................................................................................... 445
PDF7.firstPage()
......................................................................................................................................................... 445
PDF7.hide()
......................................................................................................................................................... 446
PDF7.lastPage()
......................................................................................................................................................... 446
PDF7.loadFile()
......................................................................................................................................................... 447
PDF7.nextPage()
......................................................................................................................................................... 447
PDF7.print()
......................................................................................................................................................... 448
PDF7.printWithDialog()
......................................................................................................................................................... 448
PDF7.printAll()
......................................................................................................................................................... 448
XVIII
XIX ZINC™ v2.5 Help Manual
PDF7.printPages()
......................................................................................................................................................... 449
PDF7.previousPage()
......................................................................................................................................................... 449
PDF7.setCurrentPage()
......................................................................................................................................................... 450
PDF7.show()
......................................................................................................................................................... 450
Properties .......................................................................................................................................................... 451
PDF7.height
......................................................................................................................................................... 451
PDF7.scrollbars
......................................................................................................................................................... 451
PDF7.toolbar
......................................................................................................................................................... 452
PDF7.visible
......................................................................................................................................................... 452
PDF7.width
......................................................................................................................................................... 453
PDF7.x ......................................................................................................................................................... 453
PDF7.y ......................................................................................................................................................... 454
28 mdm.Process
................................................................................................................................... 454
Methods .......................................................................................................................................................... 455
Process.close()
......................................................................................................................................................... 455
Process.create()
......................................................................................................................................................... 455
Process.kill()
......................................................................................................................................................... 456
Process.killById()
......................................................................................................................................................... 457
Properties .......................................................................................................................................................... 457
Process.isOpen
......................................................................................................................................................... 457
Process.lastId
......................................................................................................................................................... 457
29 mdm.QuickTime
................................................................................................................................... 458
Constructor .......................................................................................................................................................... 459
mdm.QuickTime()
......................................................................................................................................................... 459
Methods .......................................................................................................................................................... 460
QuickTime.close()
......................................................................................................................................................... 460
QuickTime.hide()
......................................................................................................................................................... 460
QuickTime.hideControl()
......................................................................................................................................................... 461
QuickTime.mute()
......................................................................................................................................................... 461
QuickTime.play()
......................................................................................................................................................... 461
QuickTime.show()
......................................................................................................................................................... 462
QuickTime.showControl()
......................................................................................................................................................... 462
QuickTime.stop()
......................................................................................................................................................... 463
Properties .......................................................................................................................................................... 463
QuickTime.duration
......................................................................................................................................................... 463
QuickTime.height
......................................................................................................................................................... 464
QuickTime.isInstalled
......................................................................................................................................................... 464
QuickTime.position
......................................................................................................................................................... 465
QuickTime.visible
......................................................................................................................................................... 465
QuickTime.width
......................................................................................................................................................... 466
QuickTime.x
......................................................................................................................................................... 466
QuickTime.y
......................................................................................................................................................... 467
30 mdm.RealMedia
................................................................................................................................... 467
Constructor .......................................................................................................................................................... 468
mdm.RealMedia()
......................................................................................................................................................... 468
Methods .......................................................................................................................................................... 469
RealMedia.close()
......................................................................................................................................................... 469
RealMedia.hide()
......................................................................................................................................................... 469
RealMedia.fullscreen()
......................................................................................................................................................... 470
RealMedia.mute()
......................................................................................................................................................... 470
RealMedia.normalSize()
......................................................................................................................................................... 471
RealMedia.play()
......................................................................................................................................................... 471
RealMedia.pause()
......................................................................................................................................................... 472
RealMedia.show()
......................................................................................................................................................... 472
RealMedia.stop()
......................................................................................................................................................... 473
Properties .......................................................................................................................................................... 473
RealMedia.duration
......................................................................................................................................................... 473
RealMedia.height
......................................................................................................................................................... 473
RealMedia.isInstalled
......................................................................................................................................................... 474
RealMedia.position
......................................................................................................................................................... 474
RealMedia.visible
......................................................................................................................................................... 475
RealMedia.width
......................................................................................................................................................... 475
RealMedia.x
......................................................................................................................................................... 476
RealMedia.y
......................................................................................................................................................... 476
31 mdm.Shockwave
................................................................................................................................... 477
Constructor .......................................................................................................................................................... 478
mdm.Shockwave()
......................................................................................................................................................... 478
Methods .......................................................................................................................................................... 479
Shockwave.close()
......................................................................................................................................................... 479
Shockwave.evaluateScript()
......................................................................................................................................................... 479
Shockwave.goToFrame()
......................................................................................................................................................... 480
Shockwave.goToMovie()
......................................................................................................................................................... 481
Shockwave.play()
......................................................................................................................................................... 481
Shockwave.rewind()
......................................................................................................................................................... 481
Shockwave.stop()
......................................................................................................................................................... 482
Shockwave.swBackColor()
......................................................................................................................................................... 482
Shockwave.swBanner()
......................................................................................................................................................... 483
Shockwave.swColor()
......................................................................................................................................................... 483
Shockwave.swForeColor()
......................................................................................................................................................... 484
Shockwave.swFrame()
......................................................................................................................................................... 484
Shockwave.swAudio()
......................................................................................................................................................... 485
Shockwave.swList()
......................................................................................................................................................... 485
Shockwave.swName()
......................................................................................................................................................... 486
Shockwave.swPassword()
......................................................................................................................................................... 486
Shockwave.swPreLoadTime()
......................................................................................................................................................... 486
Shockwave.swSound()
......................................................................................................................................................... 487
Shockwave.swText()
......................................................................................................................................................... 487
Shockwave.swVolume()
......................................................................................................................................................... 488
Properties .......................................................................................................................................................... 488
Shockwave.bgcolor
......................................................................................................................................................... 488
Shockwave.currentFrame
......................................................................................................................................................... 489
Shockwave.height
......................................................................................................................................................... 489
Shockwave.visible
......................................................................................................................................................... 489
Shockwave.width
......................................................................................................................................................... 490
Shockwave.x
......................................................................................................................................................... 490
Shockwave.y
......................................................................................................................................................... 491
32 mdm.String................................................................................................................................... 491
Methods .......................................................................................................................................................... 492
String.position()
......................................................................................................................................................... 492
String.replace()
......................................................................................................................................................... 492
33 mdm.System
................................................................................................................................... 493
Objects .......................................................................................................................................................... 495
System.DirectX
......................................................................................................................................................... 495
Methods ......................................................................................................................................... 495
System.DirectX.enable()
................................................................................................................................... 495
System.DirectX.disable()
................................................................................................................................... 496
XX
XXI ZINC™ v2.5 Help Manual
System.JScript
......................................................................................................................................................... 496
Methods ......................................................................................................................................... 496
System.JScript.execute()
................................................................................................................................... 496
System.Paths
......................................................................................................................................................... 497
Properties ......................................................................................................................................... 498
System.Paths.allUsersAppData
................................................................................................................................... 498
System.Paths.allUsersPrograms
................................................................................................................................... 498
System.Paths.allUsersStartMenu
................................................................................................................................... 499
System.Paths.allUsersStartup
................................................................................................................................... 499
System.Paths.commonAdminTools
................................................................................................................................... 500
System.Paths.commonAppData
................................................................................................................................... 500
System.Paths.commonPrograms
................................................................................................................................... 500
System.Paths.commonStartMenu
................................................................................................................................... 501
System.Paths.commonStartup
................................................................................................................................... 501
System.Paths.appData ................................................................................................................................... 502
System.Paths.cookies ................................................................................................................................... 502
System.Paths.desktop ................................................................................................................................... 502
System.Paths.favorites................................................................................................................................... 503
System.Paths.fonts ................................................................................................................................... 503
System.Paths.history ................................................................................................................................... 504
System.Paths.network ................................................................................................................................... 504
System.Paths.personal ................................................................................................................................... 504
System.Paths.programs ................................................................................................................................... 505
System.Paths.programFiles
................................................................................................................................... 505
System.Paths.recent ................................................................................................................................... 506
System.Paths.startup ................................................................................................................................... 506
System.Paths.startMenu................................................................................................................................... 506
System.Paths.system ................................................................................................................................... 507
System.Paths.temp ................................................................................................................................... 507
System.Paths.windows ................................................................................................................................... 508
System.Registry
......................................................................................................................................................... 508
Methods ......................................................................................................................................... 509
System.Registry.createKey()
................................................................................................................................... 509
System.Registry.deleteKey()
................................................................................................................................... 509
System.Registry.deleteValue()
................................................................................................................................... 510
System.Registry.getKeyNames()
................................................................................................................................... 510
System.Registry.getValueNames()
................................................................................................................................... 511
System.Registry.hasSubKeys()
................................................................................................................................... 512
System.Registry.keyExists()
................................................................................................................................... 512
System.Registry.load()................................................................................................................................... 513
System.Registry.loadBoolean()
................................................................................................................................... 513
System.Registry.loadInteger()
................................................................................................................................... 514
System.Registry.loadString()
................................................................................................................................... 515
System.Registry.loadMultiSz()
................................................................................................................................... 515
System.Registry.save()................................................................................................................................... 516
System.Registry.saveBoolean()
................................................................................................................................... 517
System.Registry.saveInteger()
................................................................................................................................... 517
System.Registry.saveString()
................................................................................................................................... 518
System.Registry.saveMultiSz()
................................................................................................................................... 519
System.VBScript
......................................................................................................................................................... 519
Methods ......................................................................................................................................... 520
System.VBScript.execute()
................................................................................................................................... 520
Methods .......................................................................................................................................................... 520
System.closeCDTray()
......................................................................................................................................................... 520
System.exec()
......................................................................................................................................................... 521
System.execStdOut()
......................................................................................................................................................... 521
System.execUnicode()
......................................................................................................................................................... 522
System.getDisplayModes()
......................................................................................................................................................... 522
System.getFreeSpace()
......................................................................................................................................................... 523
System.getHDSerial()
......................................................................................................................................................... 523
System.getMasterVolume()
......................................................................................................................................................... 524
System.getNumberOfVolumes()
......................................................................................................................................................... 524
System.getVolumeName()
......................................................................................................................................................... 525
System.getWaveBalance()
......................................................................................................................................................... 525
System.getWaveVolume()
......................................................................................................................................................... 526
System.getWindowList()
......................................................................................................................................................... 526
System.getResolution()
......................................................................................................................................................... 527
System.getTotalSpace()
......................................................................................................................................................... 527
System.hibernate()
......................................................................................................................................................... 528
System.hideTaskBar()
......................................................................................................................................................... 528
System.logOff()
......................................................................................................................................................... 529
System.openCDTray()
......................................................................................................................................................... 529
System.postMessage()
......................................................................................................................................................... 530
System.powerOff()
......................................................................................................................................................... 531
System.restart()
......................................................................................................................................................... 532
System.sendMessage()
......................................................................................................................................................... 532
System.setMasterVolume()
......................................................................................................................................................... 534
System.setResolution()
......................................................................................................................................................... 534
System.setWindowFocus()
......................................................................................................................................................... 535
System.setWaveVolume()
......................................................................................................................................................... 535
System.setWaveVolumeAdv()
......................................................................................................................................................... 536
System.setWaveBalance()
......................................................................................................................................................... 536
System.setWallpaper()
......................................................................................................................................................... 537
System.setWallpaperAlt()
......................................................................................................................................................... 537
System.showTaskBar()
......................................................................................................................................................... 538
System.shutDown()
......................................................................................................................................................... 538
System.suspend()
......................................................................................................................................................... 539
System.taskBarBlink()
......................................................................................................................................................... 539
Properties .......................................................................................................................................................... 540
System.computerCompany
......................................................................................................................................................... 540
System.computerName
......................................................................................................................................................... 540
System.computerOwner
......................................................................................................................................................... 541
System.CPUSpeed
......................................................................................................................................................... 541
System.CDDrive
......................................................................................................................................................... 541
System.isAdmin
......................................................................................................................................................... 542
System.localTime
......................................................................................................................................................... 542
System.language
......................................................................................................................................................... 543
System.macVerString
......................................................................................................................................................... 543
System.RAMSize
......................................................................................................................................................... 543
System.screenHeight
......................................................................................................................................................... 544
System.screenWidth
......................................................................................................................................................... 544
System.servicePack
......................................................................................................................................................... 545
System.winVerString
......................................................................................................................................................... 545
System.winVerStringDetail
......................................................................................................................................................... 545
XXII
XXIII ZINC™ v2.5 Help Manual
Index 0
1 Introduction
1.1 Welcome
Zinc™ v2.5 is the ultimate Rapid Application Development Tool for Adobe Flash® - Create Desktop Applications for Windows,
Mac OSX*, Pocket PC* and even Linux* from the Adobe Flash® SWF File Format.
Zinc™ v2.5 empowers your Adobe Flash Files with unrivaled functionality and flexibility. Create Powerful Desktop Application
with over 800 new and extremely powerful commands for your Flash Projects.
Zinc™ v2.5 can completely customize every aspect of your Application from size, style, border and icon, and it's powerful
scripting support allows unrivaled functionality. Manipulate files and folders, negotiate HTTP and FTP connections.
*Additional Components required for Mac OSX, Pocket PC and/or Linux Export
To successfully install and run Zinc™ v2.5, the following System Requirements are necessary:
SWF Movies must be authored in dedicated SWF creation software. We recommend using Adobe Flash MX or higher,
although Zinc™ v2.5 will work with SWF's generated from any of the following software titles: Adobe Flash 5, MX, MX2004, 8,
Adobe LiveMotion 1 and 2, Swish 2 and MAX.
Other SWF Authoring tools are also compatible, but they may not support the input of Actionscript.
Zinc™ v2.5 is more than just an upgrade... it's an evolution. The new features in Zinc™ v2.5 provide even greater productivity,
power and possibilities to your Flash based Application Development. New 2.5 Features:
· {mdm}Script™ 2.0
Following the success of {mdm}Script™, Zinc™ v2.5 now features an all new {mdm}Script™ 2.0 Scripting Engine!
{mdm}Script™ 2.0 provides a true Object Orientated Approach to Programming and is integrated directly with ActionScript
1.0 and 2.0 - Using {mdm}Script™ 2.0 is as simple and straightforward as using ActionScript. In addition, {mdm}Script™ 2.0
is available in your Project without the need to initialize it first.
· Projector Transitions
Build applications which morph, blend, fade and scroll onto your desktop! Projector transitions are unique to Zinc™ v2 and
add incredible creative functionality to your desktop applications.
· Extendable Architecture
Zinc™ v2 has been built upon an extendable architecture. Virtually every aspect of Zinc™ v2 can be extended through
official MDM Plug-in's or 3rd Party Extensions. Users can even develop their own range of extensions in C++ or VBScript.
· Improved GUI
The Zinc™ v2 workspace has been greatly improved whilst retaining the ease of use from the original version. Zinc™ v2
builds upon the popular tab system of the original and provides a larger workspace to house the additional features. In
addition, the GUI can also be maximized to full screen if required.
Zinc™ v2.5 is extremely powerful, offering the functionality and possibilities provided by popular Application Development
Environments such as C++, Visual Basic and Delphi. However, Zinc™ v2.5 offers unrivaled ease of use which means that
even novice users can begin to create real Desktop Applications within minutes!
This Quickstart guide is aimed at users who are completely new to the concept of SWF2EXE applications. It requires the end
user to have a basic understanding of Flash Actionscripting, but otherwise, no previous experience is required!
Follow the Quickstart Steps to create and build your first Zinc™ v2.5 Projector, complete with a custom {mdm}Script
Command!
NOTE: Although there are many ways to code in Zinc™ v2.5, this Quickstart Tutorial demonstrates the usage of
{mdm}Script™ 2.0 as it is the most recent and most powerful Scripting Engine for Zinc™. We recommend that you adopt
{mdm}Script™ 2.0 in all of your future projects.
Create a new button or select a pre-made one from the Flash Button Library. Add this button anywhere on your Canvas.
Continue to Step 2
With the button selected, expand the Actionscript Syntax Window and enter the following ActionScript:
on(release){
We can now insert the appropriate {mdm}Script™ 2.0 Command within the on(release) event. In this case, we want to
execute a simple Prompt Dialog. Enter the Syntax as shown in the Movie below:
on(release){
mdm.Dialogs.prompt("Hello World");
}
Continue to Step 3
From your SWF Authoring Tool, export your project as a SWF. The screenshot below is taken from Adobe Flash MX 2004:
Continue to Step 4
Launch Zinc™ v2.5 and start a new project. Select the SWF you created in Step 3 from the Input Source:
The Output File will automatically populate once you select an Input Source. You can change the Output Filename and Path if
you wish.
Continue to Step 5
You can click on each Tab in Zinc™ v2.5 and customize the appearance of your Projector, or you can simply click on Build to
compile your Projector with default settings.
The Build button is always in view in the lower right hand corner (You can also press F12 on Windows to Build):
Continue to Step 6
Once you have clicked on Build, you will be prompted when the Projector is compiled. To launch the Projector, simply click on
OK, or alternatively, click Cancel and then navigate to the compiled Projector and double click on it.
Once the Projector launches, click on the button you created in Step 2 and the mdm.Dialogs.prompt() Command
should execute a simple Prompt Dialog with the custom message "Hello World":
Congratulations, you have compiled your first Zinc™ v2.5 Projector complete with {mdm}Script™ 2.0 Command!
Related Topics
2.2 Workspace
2.2.1 Workspace Overview
The Zinc™ v2 workspace has been greatly improved whilst retaining the ease of use from the original version. Zinc™ v2 builds
upon the popular tab system of the original and provides a larger workspace to house the additional features.
Common elements are always in view, whilst specific Projector Settings can be accessed via the Toolbar (1) or the Tab
Structure (3).
(1) The Toolbar can be used to cycle through the various Projector Settings
(2) The Forms Window will display any forms created for your Application. Selecting a specific Form will display the
settings for that Form only.
(3) The Main Tab Structure can be used to cycle through the various Projector Settings. All settings and option are
displayed in this middle area.
(4) A Preview of your selected SWF file will be displayed in the Preview Window.
(5) The Library and CD-Rom/Installer File windows are used to pack external Files into the Projector, or create a
CD/Installer Structure.
(6) The Build Button is always located in the lower right hand corner. You can compile your Project at any time by
pressing this button.
(2) Select a SWF file. This can be a local SWF File or a SWF online. Using an online SWF is only recommended for
Advanced Users.
(3) When an Input file is selected, the Output destination is automatically entered. If you wish to change the output
destination, you can do so.
(1) Select a Window Style. Each selected option has it's own unique settings which will be displayed (2). Only one
Window Style can be applied to a Form, but each individual Form can have a different Window Style.
(2) The Options for the selected Window Style will be displayed here.
(3) Window Settings which apply regardless of Window Style are displayed here. The default settings are configured to
standard Windows specification.
(1) Select a Window Size. Each selected option has it's own unique settings which will be displayed (2). The option
"Movie Size" will set th Projector to the SWF Movie Size. The option "Screen Percentage" allows you to set a relative size in %.
(2) The Options for the selected Window Size will be displayed here.
(3) Extra settings and Form Behaviour Options are available here.
Mouse Settings
Keyboard Settings
Joystick Settings
(1) If Joystick is enabled you can select the Emulation Type to use.
Tablet Settings
(1) Specify a Background and Frame color for your SWF Projector. If left empty, default values will be applied from the
Input SWF.
(2) Additional Flash Movie Settings are displayed here. If you select the "Clip Movie at Borders" option, the items outside
of the SWF canvas area will not be shown in your Projector.
(4) This recently added option allows you to select which version of the Flash OCX should be included in your Compiled
Projector
(2) Once selected, Installer options will be displayed here. You can change Installer Images, Messages and Install
Locations by clicking on the sub-Tabs.
Note
Additional Files can be packed into your Installer by adding them to the "CDRom/Installer Files" Window.
(1) Select this option to compile a Screensaver (SCR) instead of an Executable (EXE).
(2) Once selected, you can specify a Preview SWF, Settings BMP and Custom Text here.
(1) Select a Projector Expiration Method to apply to your Projector. In addition, you can create a Password for your
Projector, or supply a list of valid serials to "unlock" the Trial mode. By default, Projectors do not have Trial Limitations
imposed.
(2) The Options for the selected Projector Expiration Method are displayed here. The Expiration Code must be unique
for each new Trial Build. Zinc™ v2 will automatically create a new random code each time a Projector Expiration Method is
applied.
(2) The Options for the selected Splash Screen Option are displayed here. The Splash can be any size, but must be in
BMP format.
(3) If the option "Enable Splash Sound" (2) is enabled, you can specify a sound here. The sound file must be in WAV
format.
(4) If the selected Splash Screen Option is "Standard with Transition" (1) you can select a Transition Into Style here.
(1) Enter Version Information for your Application. This information will be displayed in your Compiled Projectors
Properties.
Notes
You can also set the default Company Information to use across all Projects in EDIT > PREFERENCES
(1) Select Custom ICO files for your projector. Please note that all ICO files must be 256 colors.
(2) Additional Settings which are applicable to Windows Executable's are displayed here,.
(3) A launch DirectX resolution can be specified here. If selected, the Application will initiate the DirectX resolution
before launching. DirectX must be installed on the users System.
(1) Create variables which you do not want to declare using Actionscript in your SWF movie. These variables will be
available on Frame 1 of your compiled Application.
(2) Secure variables can also be entered. Unlike Global Variables (1), Secure Vars must be requested using
Application.getSecureVar().
(1) Installed Extensions can be enabled or disabled. For each extension that is enabled, the compiled Projector Size will
increase.
Zinc™ v2 has always offered a powerful and extensive list of Commands for developers to make use of in their Desktop Flash
Applications. This list has grown with every new version and build of Zinc™, and occasionally, the manner in which these
commands are executed has also evolved.
FSCommands (Deprecated)
In the beginning, all SWF2EXE applications, including Zinc™, used FSCommands. FSCommands worked, but were
Asynchronous in execution. This means that FSCommands would not execute in order with Native ActionScript, resulting in
developers having to adopt "Coding Tricks" or Frame Loops to achieve the desired results. In addition, FSCommands where
over complicated and clumsy to use.
{mdm}Script™ (Deprecated)
Zinc™ v2 introduced a new Coding API called {mdm}Script™. This new API was the World's First cross platform API for
Windows, Mac OSX and even Pocket PC and featured several advantages over FSComamnd Usage including Callbacks and
far simpler Command Structure. However, {mdm}Script™ was still Asynchronous in execution and required the occasional
"Coding Trick" to maximize it's potential.
{mdm}Script™ 2.0
Zinc™ v2.5 introduces an all new API for Flash Application Development, called {mdm}Script™ 2.0; {mdm}Script™ 2.0
provides a True Object Orientated Approach to Programming and is integrated directly with ActionScript 1.0 and 2.0. In
addition, {mdm}Script™ 2.0 is now completely Synchronous which means that it works as if it were native to the standard Flash
API!
NOTE: FSCommand and {mdm}Script™ 1.0 Usage is now deprecated. They are both still available in Zinc™ v2.5 to provide
backwards compatibility but should not be exclusively used for new projects. The FSCommand and {mdm}Script™ 1.0
chapters are included as a point of reference on their Implementation. All new Zinc™ v2.5 Projects should be scripted with
{mdm}Script™ 2.0.
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
A FSCommand is a function in Adobe Flash that provides communication with a SWF movie's host application. A host
application is anything that contains the actual SWF movie, ranging from the actual Adobe Flash Player, to a 3rd party
developed player (often referred to as a "wrapper").
FSCommands have certain rules and procedures which must be followed for correct usage with Adobe Actionscript. These
requirements and limitations are listed below:
· FSCommands in Loops
FSCommands will not work in standard actionscript loops such as IF, FOR and WHILE. This is due to the point mentioned
above. Instead of Loop statements, you must use either Frame-by-Frame looping methods, or the SetInterval Statement.
Whilst FSCommands have always (and still do) provide the basis of Communication between a SWF and it's host, the
limitations described above have rendered them clumsy to use and awkward to script with.
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
This section will demonstrate the correct way to use the Zinc™ v2 FSCommands. Zinc™ v2 FSCommands are unique as they
allow you to send multiple parameters in just one command, unlike the standard Adobe Flash FSCommands which only allow
one parameter per FSCommand. Please note that the standard Adobe Flash FSCommands do NOT work in Zinc™ v2
Projectors.
Create a New File in Adobe Flash 5, MX or MX 2004 and go to the frame/button you wish to insert your FSCommand. Select
fscommand from the Actionscript Reference or press 'Esc+fs' to insert it as shown below:
A FSCommand is very simple to script as it only requires the command name, and the command parameter(s). In the syntax
window, your new FSCommand should like this:
Continue to Step 2
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
You can now type your command directly into the Flash Actionscript Syntax Window. The command name is entered first,
followed by the command parameter(s). The command name and parameters must be placed within the brackets, as shown
below:
In the example above, we have used the FSCommand "mdm.prompt" which is used to display a Prompt Dialog with a custom
message. This FSCommand only has one parameter which is the custom message for the dialog to display.
Notice that our custom message ("Hello World") has the characters \" before and after it. This is required as Zinc™ v2
FSCommands can support multiple parameters, whilst standard Flash FSCommands cannot. The \" characters are used to
"escape" the quotations in Adobe Flash so that multiple parameters can be parsed correctly.
Continue to Step 3
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
FSCommands can be used using "literal" parameters or "variables". A literal entry is where the parameters are entered directly
into the FSCommand like the example in Step 2. When using literal parameters you cannot change the values during runtime.
Using variables instead of literal values offers more functionality. To use variables, you simply declare a variable first, and then
execute the FSCommand in the same manner:
In the example above, the custom message is declared in the variable msg. Notice that the FSCommand Parameter is now
referenced to the variable name, and not the literal value.
Also, note that when using variables, you do not need to use the \" characters before and after the FSCommand Parameter(s).
Conclusion
Using either method, export a SWF and compile using Zinc™ v2. When you launch your Projector, the FSCommand will
execute a Prompt Dialog.
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
In the previous Topic, we used a simple FSCommand which only requires one parameter. Many Zinc™ v2 FSCommands
require multiple parameters, which must be entered in the correct order.
Example (Literal)
When using multiple literal parameters, care must be taken to add the characters \" before and after each parameter, and also
to separate each parameter with a comma:
The command used above enables a DirectX resolution on the users system and has 3 parameters: x resolution, y resolution
and the color depth to use. As you can see, using literal values, care must be taken to add \" characters before and after each
parameter and also to separate each parameter with a comma.
Example (Var)
Using variables with multiple parameter FSCommands provides an easier method of code management. The variables are
declared and then referenced in the FSCommand:
Notice that we can enter the variables name without the need for \" characters. Each parameter is separated with a single
comma.
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
{mdm}Script™ 1.0 was introduced in 2004 as a replacement for FSCommands. Just like FSCommands, {mdm}Script™ 1.0 is
coded directly in your Flash Movie (Using Flash MX, Swift MAX, Adobe LiveMotion etc) but with the advantage of callbacks,
result handling and simplified scripting structure. By far the biggest advantage of {mdm}Script™ 1.0 was that it had been
developed as a Cross Platform Scripting language - Whilst FSCommands are exclusive to Windows Projectors only,
{mdm}Script™ 1.0 is compatible on both Windows and Mac OSX Projector Types.
However {mdm}Script™ 1.0 was Asynchnorous in execution (just as FSCommands are) and it still follows some of the basic
rules of FSCommands. A list of Guidelines which should be considered when using {mdm}Script™ is composed below:
· {mdm}Script™ Initialization
{mdm}Script™ must be initialized on the first frame of every SWF used in your Project with the code "mdminit();" (without
the quotes).
· Return Variables
Return Variables in {mdm}Script™ Commands must ALWAYS be encapsulated in quotes. For example, mdm.browsefile
should look like this:
mdm.browsefile("returnVar");
Each return variable in a command must have it's own set of quotes.
· Referencing Variables
Unlike FSCommands, {mdm}Script™ can reference variables from ANY location. You no longer need to declare variables
on the _root.
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
Create a New File in Adobe Flash MX or MX 2004 and select the First Frame of your Movie. Expand the Action Window and
enter the following code:
mdminit();
This code is required on the First Frame of EVERY SWF USED IN YOUR PROJECT. The above code initializes the
{mdm}Script™ and makes the scripting architecture possible. If this is NOT included, then the commands will not function.
Continue to Step 2
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
You can now type your command directly into the Flash Actionscript Syntax Window at any point you require. {mdm}Script™
Syntax resembles standard Adobe Flash Functions; the Command Name, followed by it's parameters:
mdm.prompt("Hello World");
As you can see, the syntax is much shorter and far less complicated than using FSCommands! The Above code would
execute a simple Prompt Dialog with the message "Hello World"
Continue to Step 3
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
{mdm}Script™ , just like FSCommands, can be used using "literal" parameters or "variables". A literal entry is where the
parameters are entered directly into the syntax like the example in Step 2. When using literal parameters you cannot change
the values during runtime.
Using variables instead of literal values offers more functionality. To use variables, you simply declare a variable first, and then
execute the command in the same manner:
As you can see, the parameter does not require quotes as we are now referencing a variable (in this case, the variable is
called message).
Conclusion
Using either method, export a SWF and compile using Zinc™ v2. When you launch your Projector, the {mdm}Script™
Command will execute a Prompt Dialog.
NOTE: FSCommand Usage is now deprecated. It is still available in Zinc™ v2.5 to provide backwards compatibility but should
not be exclusively used for new projects. This chapter is included as a point of reference on FSCommand Implementation. All
new Zinc™ v2.5 Projects should be scripted with {mdm}Script™ 2.0.
{mdm}Script™ also incorporates a unique callback system which allows commands with return variables to trigger simple or
complex functions. Below is a simple example of how to use a callback function:
Step 1
Create a New File in Adobe Flash MX or MX 2004 and select the First Frame of your Movie. Expand the Action Window and
enter the following code:
mdminit();
function myCallBackFunction(myValue){
mdm.prompt(myValue);
}
Create a button on the main timeline and add the following code to it:
on (release){
mdm.browsefile(myCallBackFunction)
}
As you can see, instead of entering the return variable, we enter the name of the function to use instead. In this case, the
function is called "myCallBackFunction".
Step 2
When the movie is exported and compiled using Zinc™ v2, press the button to trigger the Browse File Dialog. After selecting a
file and clicking on OK, the result will be sent to the function which will then prompt the value.
This demonstrates a very simple way to execute callback functions, but advanced usage can also be applied. The main point,
however, is that the need to use frame-by-frame loops, or watches is now eliminated and coding becomes far less time
consuming.
Building on the success of {mdm}Script™ 1.0, Zinc™ v2.5 now features an all new {mdm}Script™ 2.0 Scripting Engine! {mdm}
Script™ 2.0 provides a True Object Orientated Approach to Programming and is integrated directly with ActionScript 1.0 and
2.0 - Using {mdm}Script™ 2.0 is as simple and straightforward as using ActionScript! In addition, {mdm}Script™ 2.0 is now
completely Synchronous and available in your Project without the need to initialize it first!
{mdm}Script™ 2.0 provides developers with an all new API which is easier to use than ever before and also provides fantastic
expandability for experienced ActionScript coders!
· Synchronous Execution
{mdm}Script™ 2.0 is 100% Synchronous. This means that commands are executed in order with ActionScript! No more
frame-by-frame loops, callbacks or coding "tricks" required... It just Works!
other objects (or classes) and called from them! {mdm}Script™ 2.0 does away with clumsy parameters and literals, and
introduces Methods, Events and Properties!
· Cross Platform
Zinc v2.5 is the World's First SWF2EXE Application to provide Synchronous Command Execution on both Windows and
Mac OSX! {mdm}Script™ 2.0 provides a flexible and powerful API which works on both Major Platforms!
For a step-by-step guide on how to get started with {mdm}Script™ 2.0, please follow the QuickStart Guide.
{mdm}Script™ 2.0 follows a true Object Oriented Apporach to Programming (OOP) so that it is more closely linked to
ActionScript and familiar to Flash Developers/Designers. The {mdm}Script™ 2.0 API consisits of Classes, Methods, Properties
and Events for each Command Set. Definitions of these categories are provided below:
A way of programming that introduces real world concepts such as objects to programming. This helps the programmer
manage and scale thier code in a much more efficient manner.
An Object
An Object is a collection of methods and properties bundled together in a related fashion. For Example, a Box Object has
properties such as width, depth and height, and methods such as close, open, unpack etc.
A Class
A Class is the definition of an Object. A Class is not an Object itself, but instead it acts as a blueprint for an Object. So in the
case of a Box, when we create a Box, we need to know what kind of box we are making. So a Class for a box is used every
time we are creating a new Box. For example: myBox = new Box();
A Method
Methods can be thought of as verbs, so if you want a Box object to close you tell it to close: Box.close(); Similarily, if you want
to tell the Box object to open: Box.open();
A Property
Properties can be thought of as qualities or single features which can be set or read directly from the object. For example:
Box.width = 100;
An Event
An event is something that occurs, causing a reaction. For example: Box.onOpen() - This is an event for the Box object which
reacts when the Box is opened.
One of the most unique and powerful features of the {mdm}Script™ 2.0 API is it's Synchronous Execution. The easiest way to
understand the benefits of this Synchronous behavior, is to compare the syntax to previous Asynchronous execution:
Let's assume you want to create a simple Application which allows the user to do the following:
Previously, with {mdm}Script™ 1.0, the code required to successfully execute this procedure would be:
mdminit();
function loadFile(fileToLoad){
mdm.loadfromfile(fileToLoad, promptValue);
}
function promptValue(fileContent){
mdm.prompt(fileContent);
}
mdm.browsefile(loadFile);
The above code uses Callbacks to compensate for the Asynchronous Execution. Whilst callbacks do the job, they can become
very cumbersome to use and manage when several actions are required.
With {mdm}Script™ 2.0 the same procedure can be executed like so:
As you can immediately see, the entire process can be executed in a single line of code! By eliminating the need for
Asynchronous Callbacks, code is easier to read, understand and manage. Best of all, updates can be made quickly without
having to refer to functions and callbacks which may reside in other frames or symbols.
2.4 Forms
2.4.1 Forms Overview
Zinc™ v2 embraces a form based visual programming environment, which allows advanced development of applications.
Forms, to date, have been used in RAD applications and more recently in Adobe Flash MX 2004 and Flash 8.
Forms are separate "windows" which make up one entire Application. The basic structure of forms is a Parent (The main SWF
compiled in this case) and the Child Form (any sub Forms which are created under the main Form).
Using Forms allows a team of developers to work on sperate areas of a Project at the same time. For the individual developer,
Forms are a great way to manage and build complex projects.
Zinc™ v2 is the only SWF2EXE tool which offers multiple window applications based upon the Adobe Flash™ Format!
Notes
Please note that Sub-Forms are currently limited to 20 (including the Main Form).
Forms in Zinc™ v2 can be added and removed from the Forms Pane:
Forms do not need to be used in your Project, but they can easily be incorporated as your application grows in size and
complexity. Every entry under your MainForm is referred to as a SubForm. All Forms can be given unique names by clicking on
the Form Name, and then clicking again to edit it. A quick double-click will execute a quick preview of the Form.
Form Properties
Each Form has it's own properties and settings which are independent to the Main Form. For example, the Main Form can be
transparent, but sub-Forms can have standard Windows Styles, or be masked, or be Transparent also.
Sub-Forms can also be "Modal" which means that an action must be completed (either by the user or within the Form) before
other Forms become active again. This can be a great asset when developing your own custom dialogs.
Form Communication
Each Form is created from an individual SWF file. This means that each Form can also execute any available {mdm}Script™
2.0 Command, just as the main SWF does. In addition, Forms have a number of unique commands which can be used to
control other Forms from any location. Using Forms in Zinc™ v2.5 opens up new possibilities in Flash Application
Development!
Form Class
{mdm}Script™ 2.0 also has a Forms class which contains methods and properties specifically for Application Forms. A typical
Forms command would be:
mdm.Forms.MainForm.width = 400;
Notice that the name of the form, MainForm, is referenced in the actual command. If the name of the Form is not known, you
can also use "thisForm":
mdm.Forms.thisForm.width = 400;
2.5 Templates
2.5.1 Templates Overview
Templates are a new addition to Zinc™ v2. A Template is a file with specific Project Settings already set which can be re-used
and re-applied to any new project in Zinc™ v2.
For example, if you are working on many different Applications but each application is part of a "family" of products, you can
create a Template for that family where Size, Position, Skin etc are all pre-defined. This way, the developer can concentrate on
coding and perfecting the internal workings of the SWF.
Templates can also be "locked" which prevents other users from changing certain or all options.
Notes
Templates can only be exported from the Windows Edition of Zinc™ v2.
First you must create a new Project and select your custom options. A good Template is one where all of the important options
have been pre-selected for a specific Application Type. For example, if your Template is part of an internal Project you should
select the same skin, Splash Screen and Styles where appropriate.
Your Template can also contain sub-Forms as the Zinc™ v2 Template will save the sub-Form options selected also.
Once you have selected your Form options, select "FILE > Save as Template..." and the following window will appear:
Here, you can specify a Template Name and also enter Author/Ownership details. You can also select certain options to Lock
so that other developers/users who access the Template cannot change your options.
If you do wish to Lock Form Settings, please remember to lock each sub-Forms option independently by selecting the
appropriate Form the drop down list.
Notes
If you select "Enable Password for Full Open" please be sure to note the password as the Template will be permanently
locked.
Loading a Template is very simple. Either navigate to "FILE > NEW > From Template..." which will open a browse dialog.
Browse to your saved Template to load it.
If the Template has been locked by the Author (ie. If you did not create the Template) then you will be prompted for a
Password. If you don't have a Password you can still apply the Template, but you will be unable to change settings within it.
Double click on a Template to create a New Project with the Template Options applied. The Templates Panel creates a list of
all available Templates which have been saved in the Zinc™ v2 Templates Folder.
With Zinc™ v2, you can burn your final Application and associated files directly to CD or DVD (Windows Version Only) without
the need for external software. To burn a CD or DVD, your system must be equipped with a CD-Writer/Re-Writer or
DVD-Writer/Re-Writer. Zinc™ v2 is compatible with most internal and external CD/DVD Writers.
The first step is to create a CD Structure for your Project. This is done by adding all of your required project files to the CD
Structure Window:
The buttons at the bottom can be used to add and remove files and folders. Please note that when adding a folder, all
sub-folders and content will also be included.
Once you have created a structure, click on the "Burn to CD/DVD" button (The last icon along the bottom):
This will automatically compile your Projector and launch the CD/DVD Burning Screen:
From the CD/DVD Burning Screen, you simply select the device to use (only applicable if you have more than one
CD/DVD-Writer attached) and the speed at which to burn. By default, this value is set to Maximum.
In addition, you can also create an Autorun.inf file which will automatically execute a file on your CD. Enable the "Create
AUTORUN.INF" option and a drop down will appear below it. Select the file you wish to Autorun from the drop down list.
Click on "Burn CD" to begin writing your files to a CD or DVD. If you are using a re-writable CD, you can select "Erase a
Rewritable CD" to clear the CD first.
ICO files are unique image files which are used in Windows Applications. ICO's (also referred to as Icons) are displayed in an
Applications Title Bar, in the Task Bar and in the System Tray (If selected). Icon files are also used in Windows Explorer to
identify specific applications/files.
With Zinc™ v2, you can add a custom ICO resource to your Application to completely brand your end project. ICO files must
be created using an ICO designer and must conform to standard ICO specifications. The ICO sizes supported by Zinc™ v2
are:
With Zinc™ v2 you can provide a single resource ICO or a multi-resource ICO (an ICO which contains multiple sizes & color
depths).
Notes
You can specify a custom ICO resource for your Application under the Application Settings Tab. Simply select a valid ICO file
and Zinc™ v2 will assign it to your Compiled Projector.
If you provide a single resource ICO, Zinc™ v2 will use the available resource to create entries for the other available slots. For
example, if your ICO is a single 32x32 resource, Zinc™ v2 will compile the 16x16 and 48x48 resources automatically.
Notes
a) For best results, provide a multi-resource ICO which has a resource for each ICO type.
b) Please note that your multi-resource ICO should always contain a 16x16 256 Color ICO for use in the Application Caption
Bar. If a 16x16 ICO is not present, the next available Size will be used and scaled down.
2.7.2 ICNS
2.7.2.1 ICNS Overview
ICNS files are unique image files which are used in Mac OSX Applications. ICNS files are displayed in an Applications Title
Bar, on the Desktop and in the Mac OSX Dock. ICNS files are also used in Mac File Explorer to identify specific
applications/files.
With Zinc™ v2, you can add a custom ICNS resource to your Mac OSX Application to completely brand your end project. ICNS
files must be created using an ICNS designer and must conform to standard ICNS specifications. The Free Developer Tools
from Apple include a ICNS Composer.
Notes
You can specify a custom ICNS resource for your Mac OSX Application under the Application Settings Tab. Simply select a
valid ICNS file and Zinc™ v2 will assign it to your Compiled Mac OSX Projector.
2.8 Installers
2.8.1 Overview
Zinc™ v2 allows you to compile a fully functional installer for your Application (Windows Version Only), complete with
customizable setup file and file structure! Zinc™ v2 will automatically compile the setup file which can be activated with a
single option.
Notes
The Zinc™ v2 MDM Installer system uses NSIS (Nullsoft Scriptable Install System) to compile setup files and installers.
To compile an Installer for your Project, be sure you have first selected a SWF file and selected the appropriate style, position
etc options for your Project. Click on the Installer Tab and check the "Build Installer" option:
When checked, you can specify a BMP image to customize your Projector. The correct size for this image is 164 x 314 pixels.
You can specify any sized image but the installer will stretch the image to this requirement.
On the Installer Options tab, you can customize your Projector further:
You may specify a custom Terms and Conditions file which must be a .RTF file (Rich Text Format). In addition, you can also
select a file to launch after an installation. The drop down menu will auto-populate with a list of files that have been added in
the Installer Files Window (see below):
You can add additional files to the Installer by selecting individual files or complete folders.
Finally, you can also select a language from the drop down list. The compiled installer will then have instructions in the
selected language. Please note that only your setup file will be compiled in the selected language. Your Projector will not be
changed.
To build, simply click on Build and the Application and Application Installer will be compiled.
Notes
Please note that if you include over 100mb of additional files, compiling can take a few minutes. Please do not cancel the build
process during this time.
Zinc™ v2 is the World's First SWF2EXE tool that provides export to both Windows PC and Mac OSX* projectors from a single
SWF Source File! Building Desktop Applications for Mac OSX is as easy as building for Windows!
Mac OSX Projectors support over 150 of the Zinc™ v2 commands which means that your Mac OSX projectors can also read,
write and save to files, connect to MySQL Databases, evoke Menu Items and much, much more!
In addition, Mac OSX Projectors are also 100% Standalone which means that they do not require the Flash Plug-In and will
also run on non-admin accounts!
Notes
Please note that the Mac OSX Operating System behaves very different to Windows in certain situations. Also, certain
application properties are only applicable to Windows Projectors and are not available for Mac OSX Projects.
Mac OSX Projectors do not respond to FSCommands, you must use new {mdm}Script™ 2.0 for Mac OSX Projects.
With the optional Mac OSX Plug-In for Zinc™ v2 Windows, it is possible to compile Mac OSX projectors for Mac OSX directly
from your Windows Version of Zinc™ v2!
First, you must start a new Mac OSX Project by selecting "Blank Mac OSX Application" from the FILE > NEW menu:
Projectors for Mac OSX do not have certain Windows based properties and so the options for Mac OSX projects are less
complex than on Windows. In addition, certain features (such as transparency) cannot be applied to Mac OSX Projectors, so
these features are disabled.
Select an Input SWF and then cycle through the Mac OSX Project Tabs and customize the size, locations and properties of
your Projector. Options which are applicable to Windows Only projects are simply deactivated to avoid confusion.
Once you're happy with the option, simply press Build to compile the Mac OSX Projector. The compiled Projector is in the form
of a Mac HQX file. Copy the HQX file to your Mac OSX System and double click to extract the Projector File:
Once you double click the HQX file, the actual Mac OSX Projector will be extracted using Stuff-It:
Once extracted, the Projector File will appear in the same directory as the HQX File. The Projector File can then be executed
by double clicking on it like a standard Application.
Notes
If you are creating a Mac OSX only Projector for distribution on CD, you can burn the Projector File to CD. For Cross Platform
CD's, Projects or any other distribution method, we recommend distributing the HQX File.
The CMD Edition of Zinc™ v2 is a unique version which allows multiple users* to access it on a "host" machine via the
command line. The CMD Edition is available as a separate purchase to the standard Zinc™ v2 Software. Please contact
sales@multidmedia.com for more information on the CMD Edition.
The CMD Edition of Zinc v2 is not intended for use as an IDE (although it is still possible). It is intended to be installed on a
central server location and accessed via command line to produce EXE or HQX* files from pre-defined .zinc or .znct files.
(*Mac OSX Plug-In required for Commercial HQX Output)
This chapter outlines the usage of the CMD Edition and the information contained is ONLY applicable to the CMD Edition of
Zinc™ v2.
Notes
*The number of Multiple Users allowed depends upon the number purchased with your CMD license.
This Quickstart Guide is aimed at users who are already familiar with Zinc v2 and have previous experience with Command
Line Software. If in doubt, please consult your System Administrator.
After installing Zinc v2 CMD Edition, launch the Command Line (Normally accessed via START > RUN and then typing "cmd")
and locate the folder where Zinc v2 CMD Edition is installed. From this point, it is possible to execute Zinc v2 from the
Command Line and specify the optional parameters. To begin, we shall take a look at the options available. Type "zinc -h" as
shown below:
The "-h" switch brings up the Help Information on how to use Zinc v2 from the Command Line. A Text Version of the Help is
provided below:
-s Takes a single swf file as input. Used for simple testing only.
-p Takes a Zinc v2 project file (.zinc) as input. Other than the
output file this parameter does not take any swf files as input files.
-t Takes a Zinc v2 Template files (.znct) previously made in Zinc v2 as input.
You also need to supply a swf file for all defined forms in the template file
after this parameter.
-gvfile Takes a single text file as input for setting Global Variables.
Text file lines must be in the format globalvarname=value
-sgvfile Takes a single text file as input for setting Secure Global
Variables.
Text file lines must be in the format globalsecurevarname=value
-liblistfile Takes a single text file as input for adding library files.
Text file lines must specify the full path of the file to add
and
have a single line per file
Notes:
1) The output file parameter, -o is mandatory. Make sure you specify a valid
output file.
2) The output file parameter, has to be specified last, check examples for
syntax.
3) Upon successful compilation the compiler will generate a log file called:
zinccc.log.
4) Compiling a hqx file directly from a swf file is NOT supported. Only exe
files
can be created using the -s option.
Examples:
To compile a single swf to an exe with global vars in external text file:
zinc -c -s myswf.swf -gvfile C:\globalvars.txt -o myswf.exe
To compile a single swf to an exe with secure vars in external text file:
zinc -c -s myswf.swf -sgvfile C:\secureglobalvars.txt -o myswf.exe
To compile a single swf to an exe with global vars & secure vars in external
text file:
zinc -c -s myswf.swf -gvfile C:\globalvars.txt -sgvfile C:\secureglobalvars.txt
-o myswf.exe
To compile a single swf to an exe with global vars & secure vars & library files
in external text file:
zinc -c -s myswf.swf -gvfile C:\globalvars.txt -sgvfile C:\secureglobalvars.txt
-liblistfile c:\liblist.txt -o myswf.exe
The CMD Edition of Zinc v2 is not intended for use as an IDE (although it is still possible). It is intended to be installed on a
central server location and accessed via command line to produce EXE or HQX* files from pre-defined .zinc or .znct files.
(*Mac OSX Plug-In required for Commercial HQX Output)
The most flexible way to compile using the Command line is to use pre-designed Zinc v2 Template Files (.znct). Zinc v2
Templates are files which contain generic data on the size, position, platform etc of how the compiled projector should look and
behave on the users system. Zinc v2 CMD Edition used .znct files to create the physical EXE file based upon pre-populated
selections. From the Command Line, you can then specify a .znct Template to use, and still specify a unique SWF file to
compile, resulting in completely new Projectors with the same pre-designed look, feel and behavior!
The best way to allow multiple users to access Zinc™ v2 CMD Edition from a network "host" system, is to Map the Install
Folder as a network Drive. The instructions below demonstrate how to do this:
Step 1
With Zinc™ v2 CMD Edition installed on your main network host (ie. your server machine), navigate to the installation folder
and Right Click on it and select "Properties" from the menu:
Click on the "Sharing" Tab and check the "Share this folder on the network" box. In the share name, enter a unique name to
identify the folder on your network. We recommend using a simple name with no spaces. Click "Apply" and then "OK" to close
the window.
Step 2
Launch Windows Explorer on a different system which is connected to your network. In the Address bar, enter the ip address
of your server as shown below:
This will list all shared folders on your network server (This may take a few minutes). Of the folders listed, one should be the
"CMD" folder we created in Step 1. Right Click on the Folder and select "Map Network Drive" from the menu:
Select a Drive from the drop down menu (In this case, we have opted for Z: to identify it as the "Zinc Drive"). This creates a
new Z: Drive on your system which is linked to the Zinc™ v2 CMD Edition Installation Folder on your server. From this point on,
you can access the Server Folder as if it was a Local Folder on your system anytime you are connected to the network.
Step 3
Launch the Command Line (Normally accessed via START > RUN and then typing "cmd") and simply type "Z:" to switch drives
to the newly created Zinc Drive. From this point, you can access Zinc™ v2 directly via the command line! For example, try
typing "zinc -h" which will display the Zinc™ v2 Command Line Help.
Notes
a) This guide demonstrates how to Map a Network Drive with Windows XP. For other Windows Versions, please consult your
System Administrator.
b) Even when using Mapped Drives, you must still provide absolute paths to .swf, .zinc and .znct files which are located on
your local system. For example, to compile a local .zinc project file on your C: drive, your CMD syntax would be:
This will access Zinc™ v2 from the server and compile the .zinc file on your local C:\ drive and output the .exe to your local C:\
also.
Developing commercial Flash Based Desktop Applications is an exciting and inspirational prospect for both the developer and
the end user. Until now, Desktop Applications had to be coded in conventional programming languages such as Java or C++.
Rapid Application Development software, such as Delphi and Visual Basic, help to streamline the process of developing
applications, but they still require an enormous contribution of time and effort to learn and put into practice. Also, many
Designers and Developers who are not strictly from a programming background tend to shy away from the magnitude and
enormity of such developing environments.
Adobe Director brought designers and developers closer together with an application that could be used to deliver exciting
CD-ROM's and Desktop Applications, fused with animation and various Media Elements. However, as Adobe Flash® began to
exceed Director in popularity and ease of use, it was no surprise that many New Media Designers began to opt for Adobe
Flash® when considering their CD-ROM Projects.
However, Flash has never been intended for the desktop and was primarily designed as an Online Streaming Media Format.
For this reason, Flash Projectors (Standalone EXE versions compiled from within Flash) have always been very basic and lack
the functionality of it's Big Brother, Director, to really be considered a viable option for creating Desktop Applications...
... which is exactly where Zinc™ v2.5 comes in. Zinc™ v2.5 bridges the gap between New Media Design Tool and Rapid
Application Development Coding Environment! The exciting vector based animation and simple ActionScript architecture of the
SWF format fused with the power and flexibility of C++, VB and Delphi combine to create endless possibilities! Now, as a Flash
Designer/Developer, you REALLY can develop fully fledged Desktop Applications which rival those built with conventional
coding practices. In addition, because your applications are based upon the Adobe SWF format, you can easily integrate video,
sound, animation, graphics and much more which would take hours, if not weeks, to code in development languages!
Whilst previous tools allowed customization of Projector files, and the odd additional command, Zinc™ v2.5 has been the first
SWF2EXE application to bring unrivaled functionality and features to your Flash Application Projects and promote Rapid
Application Development for Flash! Zinc™ v2.5 has pioneered the introduction of Direct Database Communication, System
Manipulation, Hardware Access and Control and Socket Communication - all features which have never previously been
associated, or even thought possible, with Adobe Flash®!
And best of all, there is virtually zero investment of time learning a new language or software as Zinc™ v2.5 commands
integrate with existing ActionScript! One line of code, one additional command and you can save a file, delete a folder, connect
to a database and much, much more!
The following chapters have been put together to help you make the progression from the Web to the Desktop with the SWF
format!
3.2 Considerations
When developing Applications for the Desktop (using any coding environment) there are some differences to the way Projects
should be structured and planned when compared to Web based Projects. For the most part, Web based use of the SWF
format does not involve communicating or manipulating system information on the end users PC. All of the functions called are
usually internal to the SWF and therefore coding can be quite straightforward with the same results from any browser, or any
system.
However, when developing for the desktop, there are a number of factors which must be considered, particularly for more
complicated application development. For example, when trying to retrieve information from the Users System (such as
System Paths, File & Folder Names etc) the speed at which the result is returned can be dependent on a number of factors
unique to the system, including CPU speed, available RAM and speed of Hard Drive. Whilst the differences are most likely a
matter of milliseconds, it can still be important to account for this to ensure maximum compatibility of your Application.
This is just one of the considerations that ANY Application Developer must take regardless of which coding environment they
have opted to use. Whilst Zinc™ v2 requires zero investment of time to learn and integrate the 800+ Commands, a small
investment of time is required to understand the intrinsic differences between coding for the web, and coding for the Desktop.
We have compiled a list of considerations below which are often overlooked by first time Desktop Developers:
therefore doesn't "know" what it's current location is and, more importantly, doesn't know what is relative to it. For this
reason, all paths should be appended with the property mdm.Application.path which contains the current location of
the EXE File.
Flex Builder 2
Flex Builder 2 provides an Eclipse-based environment in which developers can easily create richer, more expressive Flex
applications. As with most integrated development environments, Flex Builder has three functional areas: coding, interface
design, and debugging.
Flex Builder significantly accelerates coding through code hints (for both ActionScript and MXML), code navigation that helps
you quickly find the definition of a method or class, built-in error reporting, context-sensitive help, integration with source control
systems (such as CVS), and build tools (such as Ant) for easier team development.
The Design view lets you quickly assemble a basic user interface, apply styles to customize the look and feel of your interface
elements, and preview the behavior of your application controls. The Design view is also very accessible to creative
professionals, allowing non-coders to create interface assets directly in Flex Builder. Flex Builder also features a
constraint-based layout model that provides the control of absolute positioning while still retaining enough flexibility to respond
smoothly to resizing.
Flex Builder also has an integrated ActionScript debugger that features a rich perspective to enable you to set breakpoints,
step through your code, inspect variables, change variable values, set watches, and monitor console messages. You can also
debug Flex and Java applications side-by-side if you are using Flex Builder together with Eclipse's Java tools
ActionScript 3
ActionScript is the scripting language within Flash and is very similar to JavaScript (both follow the ECMAScript standard).
ActionScript 3.0 follows the ECMAScript 4 proposal, which means that it is a safer, simpler, and better-performing than
previous versions of ActionScript or JavaScript. It also supports type safety so that developers can write unambiguous, easily
maintainable code. ActionScript 3.0 consists of two parts: the core language and the Flash Player API. The core language
defines the basic programming building blocks: statements, expressions, conditions, loops, and types. The Flash Player API is
made up of classes that represent and provide access to Flash Player-specific functionality.
Flash Player 9 also includes a new ActionScript Virtual Machine, which is the engine that executes any ActionScript code sent
to the Flash Player. The new ActionScript Virtual Machine (known as AVM2—the old version is known as AVM1) has been built
from scratch to support the development of rich Internet applications with significantly better performance (up to ten times
faster compared to legacy ActionScript code running on AVM1). Both versions of the AVM are included in Flash Player 9 so
that Flash Player 9 can run the latest rich Internet applications quickly and efficiently while maintaining backward compatibility
with older Flash content.
Zinc 2.5 (Build 2.5.0.17 and higher) is the first SWF2EXE that provides full Flash Player 9, Flex 2 and ActionScript 3 support in
one package! To use ActionScript 3 with {mdm}Script 2.0 in your Flex Projects you must follow the instructions below:
2. Right click on the project in the Navigator ( the top left pane )
4. A properties wizard kind of dialog will be displayed. In the left pane, click ActionScript Build Path
5. In the right pane, a tabbed view will be presented. Click the right tab, Library path
6. A window with currently bound swcs will be shown. Click Add SWC...
10. Add "import mdm.*;" to the source files that need access to the mdm runtime
11. Write code and call {mdm}Script 2.0 objects as you would with Flash 8
Flex coders need to add the code mdm.Application.init(this) as their first line in an initialization function for use
with Zinc Windows & Mac OSX. For example:
function initApp()
{
mdm.Application.init(this);
}
Note
For regular AS3 Projects (ie. Projects which use Flex via Command Line) a callback is also required to be passed as a second
parameter. This will be called when the application has initialized. For example:
5 Tutorials
5.1 Command Line Parameters
5.1.1 Introduction
Introduction
Using the Command Line feature, you can execute your Applications from the command line and pass any arguments to the
projector using custom defined parameters. The application can then be programmed to run any number of tasks based upon
the passed arguments. Command Line Parameters can be used to initiate triggers within your Application, or set options for
the end user. They provide a very powerful method of communication from the Command Line for advanced applications.
Notes
This Tutorial uses {mdm}Script™ 2.0 which is only available from Zinc™ 2.5
5.1.2 Step 1
Step 1
Create a new file in Adobe Flash (or your preferred SWF Authoring tool) and add a button with the following code:
on (release) {
cmdParam1 = mdm.Application.getCMDParams(1)
mdm.Dialogs.prompt(cmdParam1)
}
This code has two parts: The first command retrieves the first command line parameter (which is always assigned the id "1")
and returns it to the variable cmdParam1. The second part of the code executes a prompt to display the value of cmdParam1.
Export your SWF and then compile a Projector using Zinc™ v2.5.
Continue to Step 2
5.1.3 Step 2
Step 2
To execute a projector with command line parameters, you must launch the projector from the command line. Click on the
Windows Start button and then select Run. Enter "cmd" (as shown below) in the Run dialog box:
Continue to Step 3
5.1.4 Step 3
Step 3
In the Command Line Window, you can now execute your projector with up to 5 additional parameters of your choice. These
values can be anything from a single word to a string of numbers. Separate each parameter with a single space:
In the example above, we have the application name followed by 3 additional parameters with the values: cmdvalue1,
cmdvalue2 and cmdvalue3
Once the Projector is launched and we press the button created in Step 1, the first {mdm}Script™ Command will retrieve the
value of the first parameter (in this case, "cmdvalue1") and assign it to the variable cmdParam1.
The prompt command will then prompt the value of cmdParam1, which will be "cmdvalue1"
Introduction
Extensions are a fantastic new feature to Zinc™ v2.5 which provide unlimited expandability to Zinc™ v2.5 projectors.
Developers can now create their own custom commands for {mdm}Script™ 2.0 based upon existing or custom DLL files.
The Zinc™ v2.5 Extension Creator provides an interface to your DLL which can then run internal functions via custom named
{mdm}Script™ Commands. Extensions can be saved and shared with other developers to extend the {mdm}Script™ 2.0 API.
Notes
In this Tutorial we shall create an extension from a function found in the Windows kernel32.dll - the functions available in the
kernel32.dll are documented in the Win32 Programmer's Reference which is available at the MDM File Exchange.
The Zinc Extension Creator SDK is also available at the MDM File Exchange
5.2.2 Step 1
Step 1
The kernel32.dll is a Shared Library which is available in all Windows Systems. This DLL allows access to the entire Windows
API through a series of functions. To understand and use the available functions, we can check the Win32 Programmer's
Reference:
The Win32 Programmer's Reference contains detailed usage guides on each function contained in the kernel32.dll. Click on
Index and type the word "beep" in the search box at the top. The Chapter on the Beep Command should be highlighted as
shown below:
With the Beep Chapter selected, click on "Display" to view the usage references shown below:
The Beep function within the kernel32.dll is a simple command which executes a System Beep Tone. The reference for the
Beep function shows that this function has just 2 parameters:
To create a custom {mdm}Script™ Command based upon this DLL Function, it is important that we know how many
parameters are required so good DLL documentation is extremely important.
Continue to Step 2
5.2.3 Step 2
Step 2
Launch Zinc™ v2.5 and select "Extension Creator" from the Tools menu as shown below:
The first step is to select a DLL file. Click on the browse button at the bottom of the screen to select a DLL file. The kernel32.dll
file is located in the Windows System32 Folder as shown below:
Select the kernel32.dll and click on Open. The Extension Creator will then ask you to select an Extension Class name. The
Extension Creator will automatically select the prefix "kERNEL32" for you. For the purpose of this Tutorial, we shall leave the
prefix to this value:
Click OK to accept the prefix. A second prompt will then be displayed as shown below:
If you are connecting to a custom DLL, it is best to select "No" at this prompt so that the DLL is packed into your final extension
file. As we are using a standard Windows DLL, we can select "Yes" at this prompt so that the DLL is not included in the
extension. Instead, the extension will search in the appropriate system32 folder once it is installed.
Once you click on "Yes" the DLL Functions will be populated in the Extension Creator Command List. This can take anything
from 10 - 45 seconds based upon the speed of your processor.
Continue to Step 3
5.2.4 Step 3
Step 3
Scroll through the list of functions in the Command List and select the kernel32.Beep function. In Step 1, we opened the Win32
Programmer's Reference to the Beep Command Usage Guide.
Click on the "Extension Definition" Tab and enter the details as shown below:
The Extension Creator allows you to specify up to 12 parameters for each DLL Function. From the reference in Step 1, we
know that only 2 parameters are required for the Beep Function. Set Parameter 1 and 2 to "integer" from the drop down box
and complete the Description and Sample Value for each. For the purpose of this example, set the value for each parameter to
1000.
You can also specify a return value at the bottom which, although not required, can help assist in debugging your custom
command. In this case, we know from the DLL Function documentation that the return value should be a Boolean.
With the parameters set and sample values provided, we can now proceed to testing our command. Upon first test, you need
to Load the Library by clicking on the "Load Library" button at the bottom. Once loaded, click on the "Execute" button to test.
When clicked, you should here a System Beep which lasts for approximately 1 second.
The exact syntax as it should be entered in your Actionscript is also generated in the Code Pane. The value "true" should also
be visible in the Result Pane. If your test failed to play the beep sound, then the value "false" should be visible in the Result
Pane which would mean that communication was made but a parameter or multiple parameters were incorrectly specified.
Once you are happy that your new Custom Command is working correctly in the Command Tester, click on FILE and Create
Extension:
This will allow you to specify an extension name and path to save to. The extension file format is .zincx - this is the file that you
can distribute and share with other users.
Once you have created your Extension file, exit the Extension Creator.
Continue to Step 4
5.2.5 Step 4
Step 4
Create a new file in Adobe Flash (or your preferred SWF Authoring tool) and add a button with the following code which has
been copied from the Command Tester:
on (release) {
myResult = mdm.Extensions.KERNEL32.Beep("1000","1000");
}
All Custom Commands created with the Extension Creator always follow this format:
mdm.Extensions.CUSTOMCLASS.DLLFUNCTION()
In this case, the CUSTOMCLASS name is "KERNEL32" and the DLLFUNCTION name is "Beep". Please Note that these items
are case sensitive, so be sure to enter the command exactly as it is shown in the Extension Creator.
Create a Dynamic Text box on the canvas and label it "myResult" and export your SWF movie.
Continue to Step 5
5.2.6 Step 5
Step 5
Launch Zinc™ v2.5 (if it's not still open already) and exit the Extension Creator. Select the SWF file you created in the previous
as the input and then click on the "Extensions" Tab. Click on the "Install Extensions" button at the bottom and select the .zincx
created in Step 3. A summary screen will be displayed which shows the information contained within the .zincx file. To install
the extension, click on "Install".
Once installed, your extension will be listed in the Extensions Window. Ensure that you select the new extension before
compiling your projector:
With the new extension selected, compile a Projector. When the Projector runs, click on the button created in Step 4 and the
custom {mdm}Script™ Command will execute a System Beep. In addition, a return value will be sent to the dynamic text box
"myResult".
This tutorial is a very simple example of how to create a simple custom {mdm}Script™command but very complicated
procedures and functions can also be executed.
Creating extensions can increase the {mdm}Script™2.0 API by hundreds and can also be shared with other users. Extensions
can also be submitted to the MDM Exchange at http://www.multidmedia.com/exchange
Introduction
With Zinc™ v2.5, you can build your own custom File Menus, Tray Icon Menus and Right Click Menus. Creating dynamic
menus are done at runtime using {mdm}Script™ which means that you can change menu structure at any point in your
Projector!
Notes
a) This tutorial will guide you through creating a File Menu but the same methodology is applied to Context and Tray Menus.
b) This Tutorial uses {mdm}Script™ 2.0 which is only available from Zinc™ 2.5
5.3.2 Step 1
Step 1
Create a new file in Adobe Flash (or your preferred SWF Authoring tool) and select the first frame of the timeline. Expand the
Actionscript window and add the following code:
mdm.Menu.Main.menuType = "frame";
When creating custom File Menus, there are three methods which can be used to handle a selected item. These methods can
be either "function", "frame" or "variable".
When "function" is set, you can use the System Event onMenuClick_* to execute a function directly when the user clicks on a
Menu Item.
When "variable" is set, the File menu Item(s) will set a variable of the same name (with the prefix "menu_") to "false" as
default, and "true" when clicked. For example, the menu item "Open" would set the variable "menu_Open" to "true".
When "frame" is set, the File menu Item(s) will move the playhead to a frame label of the same name within your movie.
In this example, we have the set the method to use to "frame" which means that when a menu item is selected by the user, the
SWF Movie Playhead will move to a frame of the same name.
Continue to Step 2
5.3.3 Step 2
Step 2
We will now add the {mdm}Script™ Commands to create the actual File Menu structure. This is the basic structure that all File
Menu's adhere to:
The above example is a screenshot of the File Menu from Notepad. The entries across the top are referred to as "File Menu
Headers", and the sub-entries are "File Menu Items". These are the terms used within {mdm}Script™ to construct Custom File
Menus.
mdm.Menu.Main.insertHeader("File");
mdm.Menu.Main.insertItem("File", "Menu Item Here");
mdm.Menu.Main.insertItem("File", "Another Menu Item");
stop();
The first Command creates a new File Header entry called FILE. The next 2 Commands assign sub entries (File Menu Items)
to the FILE Header. We have also placed a stop action at the end to stop the playhead at Frame 1.
Continue to Step 3
5.3.4 Step 3
Step 3
Create a new keyframe anywhere on your movie timeline (Press F6 in Adobe Flash to create a new keyframe). Once created,
label the frame as: "Menu Item Here" - Please take care to enter the label EXACTLY the same as the code in Step 2. Flash is
case sensitive:
On the selected keyframe, draw a shape on the canvas or write a custom message. This can be anything you want so long as
it indicates that the playhead is now on the frame labeled "Menu Item Here".
Create a new keyframe somewhere else in your movie, and repeat the above steps but label the frame "Another Menu Item".
Continue to Step 4
5.3.5 Step 4
Step 4
Export your movie and compile a Projector with Zinc™ v2. As soon as the Projector launches, it will construct the File Menu
which should look like this:
When you click on one of the File Menu Items, your projector should navigate to the associated frame (ie. the Frame which has
the same name Label).
That's it! You can add as many File Headers and File Items as required, and also include Item dividers to group certain
options.
Introduction
Zinc™ v2.5 can connect to Microsoft Access* and MySQL Databases, and with added ADO support, you can practically
connect to any Database Type! Zinc™ v2.5 supports SQL statements which means that you can execute all INSERT,
UPDATE, DELETE and SELECT commands on your database connections. There's no need for server side scripts such as
PHP, ASP or CGI as Zinc™ v2.5 creates a direct connection with the Database.
*Microsoft Access Databases can only be connected offline. To connect to an online Access Database, you would still need to
use ASP.
Notes
a) This Tutorial will go through the steps of connecting to a local Microsoft Access Database. The same methodology can be
applied to MySQL Databases.
c) This Tutorial uses {mdm}Script™ 2.0 which is only available from Zinc™ 2.5
5.4.2 Step 1
Step 1
Create a new file in Adobe Flash (or your preferred SWF Authoring tool). The first step is to make a connection with our
database which we shall assume has the name "myDatabase.mdb". Select Frame 1, expand the Actionscript Window and
enter the following code:
mdm.Database.MSAccess.connect("myDatabase.mdb", "myPassword");
This assumes that the MDB file is in the same directory as your Projector. You can also connect to a Database over a network,
or using an absolute path to a fixed location.
Nothing else is required. If your database is password protected, you can include the password as a second parameter:
mdm.Database.MSAccess.connect("myDatabase.mdb", "myPassword");
Continue to Step 2
5.4.3 Step 2
Step 2
To read data from a database we have to use a SQL statement which will read data from a database table. To do this we have
to make a statement that contains the SQL SELECT command.
Please note that Zinc™ v2.5 will execute the SELECT statement, then store the data into a result set. The data will remain
there, waiting to be accessed until another SELECT statement is executed. The following command will NOT actually place the
data in your Projector, but it will prepare it for access.
An easy SQL SELECT statement (assuming that the database has a table that is called "mytable") would be: "SELECT *
FROM mytable":
The above command (inserted on Frame 1 after the connection command) would select all of the data from the table "mytable"
and store it in a record set for access.
Continue to Step 3
5.4.4 Step 3
Step 3
Zinc™ v2 provides several ways of accessing the data in a result set. The first two methods, are both a "dump" of the result set
contents. The only difference between the two is the format of the data. You can dump the data in a simple HTML 1.0 format or
a simple XML format.
An alternative method is to target a specific field and row within the record set and obtain the result for that entry only.
On your main movie canvas, create two buttons. Underneath the buttons, create a Dynamic Text Box and label the var
"dbResult":
Select the first button, expand the Actionscript window and enter the following code:
on (release) {
dbResult = mdm.Database.MSAccess.getHTML();
}
Select the second button and enter the following code in the Actionscript window:
on (release) {
dbResult = mdm.Database.MSAccess.getField(1, 1);
In the above code, the first parameter is the Row Index within your Database table, and the second parameter is the Column
Index.
Continue to Step 4
5.4.5 Step 4
Step 4
Export your movie and compile a Projector with Zinc™ v2.5. As soon as your projector runs, it will connect to your Database
and run the SELECT statement. If you click on the first button, the dynamic text box should be populated with the results of the
record set in simple HTML. Pressing the second button will return just a single entry of the value at the specified row and
column index.
Database connectivity is an extremely powerful feature, yet very simple to use. In addition to simply reading values, you can
also perform INSERT, UPDATE and DELETE Statements on your database using standard SQL formatting.
Introduction
Zinc™ v2.5 allows you to create an organic shaped projector during build time. You can also change the shape of your
projector at runtime using just a single {mdm}Script™ Command. Masking projectors requires a BMP file in a specific format
which "masks" certain areas of the projector (ie. makes them invisible). Using this technique, you can create projectors of all
shapes and sizes which are compatible with all Windows Operation Systems (from Windows 98 and upwards) and also Mac
OSX!
Notes
This Tutorial uses {mdm}Script™ 2.0 which is only available from Zinc™ 2.5
5.5.2 Step 1
Step 1
Open up your favorite image creation software (MS Paint is fine if you don't have anything else available) and create a new
image, 300 x 300 pixels.
Using just the colors white (#FFFFFF) and black (#000000) create a mask for your movie. This can be any shape or design but
keep in mind that all of the areas which are black (#000000) will be made transparent on your final Projector. An example is
shown below:
In this example, we want our final Projector to look like a speech bubble. Once you are happy with your image, save it as a
BMP file. For the purpose of this tutorial, name your file mask.bmp, although any name is acceptable.
Please note that your BMP file should be 24bit True Color.
Continue to Step 2
5.5.3 Step 2
Step 2
Create a new file in Adobe Flash (or your preferred SWF Authoring tool) and add a button with the following code:
on (release) {
mask = "mask.bmp";
mdm.Forms.MainForm.showMask("myMask.bmp");
}
This Command is used to initiate the mask and create the organic shaped projector. It applies the Mask to the Form specified
in the Command Structure (in this case, "MainForm"). Please note that when using external mask files (BMP's) they must be in
the location specified. The example above assumes that the mask.bmp is in the same folder as your Projector.
Continue to Step 3
5.5.4 Step 3
Step 3
Export your movie and compile a Projector with Zinc™ v2.5. Once your Projector has opened, click on the button and the
Projector will apply the mask and change shape!
Masks can be used to create any shape Projector and add to the impact created with your final project. With Zinc™ v2.5 you
can easily use multiple masks during runtime.
Introduction
Packing additional files into your main Executable is an excellent method of keeping your entire application to just 1 file. Using
this method ensures that all required files are always present and available for use when needed.
Packed Files must first be extracted before they can be used. Packed Files can be extracted to any location on the users
system, but the Temp directory is recommended. This tutorial will go through the steps to pack additional files and then extract
them.
Notes
This Tutorial uses {mdm}Script™ 2.0 which is only available from Zinc™ 2.5
5.6.2 Step 1
Step 1
Create a new file in Adobe Flash (or your preferred SWF Authoring tool) and create a new button on the canvas. With the
button selected, expand the Actions Window and enter the following code:
on(release){
packedFile = "myFile.txt";
extractedFile = mdm.System.Paths.desktop+"myFile.txt";
mdm.Application.Library.extractToFile(packedFile, extractedFile);
}
on(release){
packedFile = "myPic.txt";
extractedFile = mdm.System.Paths.temp+"myPic.tif";
mdm.Application.Library.extractToFile(packedFile, extractedFile);
Each of these two buttons extracts a different packed file to a different location. The first is extracting a TXT file to the
DESKTOP whilst the second button is going to extract a TIF file to the users TEMP directory. Notice that we use the
{mdm}Script™ 2.0 Properties to retrieve the Desktop and Temp Paths.
Continue to Step 2
5.6.3 Step 2
Step 2
Export your SWF movie and launch Zinc™ v2.5. Select your SWF as the Input File.
To Pack Files in your Zinc™ v2.5 Projector, we use the new Library Window as shown below:
Click on the lower buttons to add and remove files to your Projector. Notice that our Files have the same names used in the
Extract Commands in the previous step. You can use your own filenames, but you must be sure to change the references in
the Flash Movie and re-export before compiling the projector.
Once you have added the appropriate files, click on Build to compile your Application.
Continue to Step 3
5.6.4 Step 3
Step 3
Launch the Projector and click on the first button we created in Step 1. This will extract the "myFile.txt" file to the System
Desktop - you can check that the file has been extracted correctly in Windows Explorer or by checking your System Desktop.
(Please note that it may take a second or two to show up, depending on the size of your file).
Click on the second button and the file "myPic.tif" will be extracted to the system Temp Directory. Again, use Windows Explorer
to check that the file has been extracted correctly.
Once files are extracted, you can proceed to use them as needed by your application!
Introduction
Zinc™ v2.5 provides a way to send and receive information to and from ANY computer by using the UDP protocol. This form of
communication is based on the Datagram transfer of information through a TCP/IP network. This means that a packet
containing the message and the destination IP address and port is constructed every time communication is required and then
sent over the network. The packet will be sent to the destination by "hopping" though the various network points.
The message is text that is either literal or in a variable, or combined literals and variables. A text can contain, theocratically,
ANY data. This could be useful if you wanted a Zinc™ v2.5 Projector to send information to a third party application. However,
to send data to another Zinc™ v2.5 projector, the text has to be formatted in a certain way.
Notes
This Tutorial uses {mdm}Script™ 2.0 which is only available from Zinc™ 2.5
5.7.2 Step 1
Step 1
Create a new file in Adobe Flash (or your preferred SWF Authoring tool) and select Frame 1. Expand the Actions window and
enter the following code:
mdm.Network.UDP.Socket.startServer(4000);
This Command is required to enable the socket server; It has only one parameter which is the port that the projector is
instructed to listen to. In this case, we have set the port to "4000".
Select the TEXT tool and create a dynamic text box anywhere on the movie. Label this box "cMessage".
After creating your text box, export your Movie as a SWF called "Client.swf".
Continue to Step 2
5.7.3 Step 2
Step 2
Create a new file and create a new button or select a pre-made one from the Button Library. Place this button anywhere on
your movie and copy the following syntax onto the button:
on (release) {
sMessage = "Hello World";
mdm.Network.UDP.Socket.send("127.0.0.1", 4000,
"cMessage@eq@"+sMessage);
}
If we break this command down, we are instructing the Projector to send a message to IP 127.0.0.1 on Port 4000. We are then
setting the variable cMessage in the client Projector to the value of sMessage (Which has been set to "Hello World").
Export this movie to a SWF called "server.swf" and then compile both SWF files to Projectors using Zinc™ v2.5.
Continue to Step 3
5.7.4 Step 3
Step 3
Run both Projectors, and then press the button on the "Server" to send the message to the "Client" Projector. The message
"Hello World" will be displayed in the Client Projector.
The Command in Step 2 sends the contents of the variable sMessage to the IP address specified (in this case 127.0.0.1
because we are testing it on a local server) and on the specified port number (in this case 4000).
It is important that the client projector is also "listening" to the correct port. If we had set the listen port in Step 1 to 4001, the
communication would have failed, unless we sent the message to port 4001.
Introduction
Zinc™ v2.5 expands upon video integration by introducing multiple video instances. This means that you can now load multiple
instances of AVI, MPG, QuickTime, ASF and Real Media Video Files and control them independently!
Notes
a) Please note that for each video type, the appropriate codec or Plug-In is required on the end users system. For example,
using Windows Media Player 9 Commands would require the end user to have Windows Media Player 9 Installed.
b) This Tutorial uses {mdm}Script™ 2.0 which is only available from Zinc™ 2.5
5.8.2 Step 1
Step 1
Create a new file in Adobe Flash (or your preferred SWF Authoring tool) and set the canvas size to 640x480. Select Frame 1,
expand the Actions window and enter the following code:
To load a video file into a custom size and position requires just one {mdm}Script™ constructor which has 5 parameters; X
Position, Y Position, Width, Height and File. With {mdm}Script™, using constructors like the one above means you can create
several instances and refer to them quickly and easily by their object name. In the example above, the name is "myVideo".
The above code assumes that there is a video file called "myClip.mpg" in the same folder as your projector. You can also
specify an absolute path in the "file" parameter.
We have set the position to 0,0 which is the X,Y location from the Top Left hand corner of our movie. The Width and Height
have been set to 320x240.
Continue to Step 2
5.8.3 Step 2
Step 2
Create a new keyframe on Frame 10, expand the Actionscript window and enter the following code:
The above code creates a new video instance and loads the same file next to the previous instance. Notice that the X Position
has been set to 320 which places it right next to our previous instance.
In this example, we have used the same video clip, but you can specify another file if you have one in the same folder.
Continue to Step 3
5.8.4 Step 3
Step 3
On your main movie canvas, create two buttons at the very bottom. Select the first button, expand the Actionscript window and
enter the following code:
on(release({
myVideo.stop()
}
on(release({
myVideo.play()
}
The two buttons have been set up to act as Play and Stop buttons for the first video instance (myVideo). If you wish, repeat the
process by creating two additional buttons for the second video instance. Remember to change the instance name to
myVideo2 on these buttons.
Continue to Step 4
5.8.5 Step 4
Step 4
Export your movie and compile a Projector with Zinc™ v2.5. As soon as your projector runs, the first video instance should
load up at the size and position we set in Step 1. A few seconds later, the second instance will load next to it.
The code for the second frame was placed on Frame 10, but this was just to demonstrate that video can be loaded at different
points in the timeline. If you wanted, you could have created two (or more) instances at the same time, on the same frame.
Press the buttons you created in the previous step to control the video instances independently.
Introduction
Zinc™ v2.5 provides a method to declare variables without using Actionscript. You can specify variables and their values in the
Zinc™ v2.5 Compiler and these will be available from Frame 1 onwards in your Application.
In addition, Secure variables can also be declared which are not available until requested. These provide even greater levels of
security and are ideal for keeping Passwords and other Sensitive Data safe.
Notes
This Tutorial uses {mdm}Script™ 2.0 which is only available from Zinc™ 2.5
5.9.2 Step 1
Step 1
Create a new file in Adobe Flash (or your preferred SWF Authoring tool) and select Frame 1. Create two dynamic text boxes
and label one "VarValue" and the other "SecureVarValue". Create a new button on the canvas, and with the button selected,
expand the Actions window and enter the following code:
on (release){
SecureVarValue = mdm.Application.getSecureVar("mySecureVar");
varValue = mdm.GlobalVariables.myVar;
}
Continue to Step 2
5.9.3 Step 2
Step 2
Export your SWF Movie. Launch Zinc™ v2.5 and select the SWF. Cycle through to the "Global/Secure Vars" Tab and enter a
Global Variable and a Secure Variable as shown below:
Continue to Step 3
5.9.4 Step 3
Step 3
Compile the Projector with Zinc™ v2.5. If the Variables were entered correctly, once you click the button we created in the
previous step, the secure variable and global varibale will be requested and populate the appropriate text boxes.
Using Secure variables are an excellent way to keep sensitive data in the Projector Wrapper until required. Extremely useful for
Database and FTP passwords.
Availability
mdm.ActiveX
Constructor Description
Inserts an activeX/OLE object using the specified
mdm.ActiveX()
parameters.
Method Description
ActiveX.addMethodParam() Will populate the argument list with Values and Types.
ActiveX.close() Closes a previously created ActiveX Instance.
ActiveX.saveObject() Saves the status of the current ActiveX Object for later use.
Property Description
Integer specifying the Height of the ActiveX Instance in
ActiveX.height
Pixels.
ActiveX.visible Boolean which shows or hides the ActiveX Instance.
6.1.1 Constructor
6.1.1.1 mdm.ActiveX()
Availability
Windows
Constructor
Parameters
x:Number X position
y:Number Y Position
Returns
Nothing
Description
Inserts an activeX/OLE object using the specified parameters. Multiple Instances can be created.
Notes
a) Please ensure the ActiveX/OLE object you intend to use is registered on the system or you will get a "Class not Found"
error.
b) To view which objects are registered on your system (and ActiveX/OLE names) visit the Microsoft Website and use the
OLE/COM Object Viewer to find the versionindependentprogID.
word.document
mediaplayer.mediaplayer
wmplayer.ocx
shockwaveflash.shockwaveflash.1
Example
// t = top
// b = bottom
// l = left
// r = right
// c = center
6.1.2 Methods
6.1.2.1 ActiveX.addMethodParam()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Will populate the argument list with values and types, for later use with activeX.runmethod
Notes
There can be a maximum of 10 parameters. Once declared, you can use activeX.runmethod in order to run the function
Example
We instantiate an ActiveX Instance which contains a method to be executed. This method has 2 parameters, a String and an
Integer. To assign the Method Parameters, the command must be executed twice:
6.1.2.2 ActiveX.close()
Availability
Windows
Usage
ActiveXinstance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
It is recommended that unused ActiveX Instances are closed to preserve memory. It is also recommended that all ActiveX
Instances be closed before Exiting an Application.
Example
myActiveX.close()
6.1.2.3 ActiveX.doVerbCustom()
Availability
Windows
Usage
ActiveXinstance.doVerbCustom(verbID:Number):Void
Parameters
Returns
Nothing
Description
Executes a custom or non-standard verb on the ActiveX object, specified by an integer ID.
Notes
Example
myActiveX.doVerbCustom(10)
6.1.2.4 ActiveX.doVerbDiscardUndoState()
Availability
Windows
Usage
ActiveXinstance.doVerbDiscardUndoState():Void
Parameters
None
Returns
Nothing
Description
Executes a DISCARDUNDOSTAT verb on the ActiveX Object. Used to tell objects to discard any undo state that they may be
maintaining without deactivating the Object.
Notes
Example
myActiveX.doVerbDiscardUndoState()
6.1.2.5 ActiveX.doVerbHide()
Availability
Windows
Usage
ActiveXinstance.doVerbHide():Void
Parameters
None
Returns
Nothing
Description
Executes a HIDE verb on the ActiveX Object. This causes an Object to remove it's User Interface from view. Only applies to
Objects that are activated In-Place.
Notes
Example
myActiveX.doVerbHide()
6.1.2.6 ActiveX.doVerbInPlaceActivate()
Availability
Windows
Usage
ActiveXinstance.doVerbInPlaceActivate():Void
Parameters
None
Returns
Nothing
Description
Executes an INPLACEACTIVATE verb on the ActiveX Object. Activates an object in place without displaying tools, such as
menus and toolbars, that end users need to change the behavior or appearance of the object. Single-clicking such an object
causes it to negotiate the display of its user-interface tools with its container. If the container refuses, the object remains active
but without its tools displayed.
Notes
Example
myActiveX.doVerbInPlaceActivate()
6.1.2.7 ActiveX.doVerbPrimary()
Availability
Windows
Usage
ActiveXinstance.doVerbPrimary():Void
Parameters
None
Returns
Nothing
Description
Executes a PRIMARY verb on the ActiveX Object. Specifies the action that occurs when an end user double-clicks the object
in its container. The object, not the container, determines this action. If the object supports in-place activation, the primary verb
usually activates the object in place.
Notes
Example
myActiveX.doVerbPrimary()
6.1.2.8 ActiveX.doVerbOpen()
Availability
Windows
Usage
ActiveXinstance.doVerbOpen():Void
Parameters
None
Returns
Nothing
Description
Executes an OPEN verb on the ActiveX Object. Instructs an object, including one that otherwise supports in-place activation, to
open itself for editing in a window separate from that of its container. If the object does not support in-place activation, this verb
has the same semantics as OLEIVERB_SHOW.
Notes
Example
myActiveX.doVerbOpen()
6.1.2.9 ActiveX.doVerbShow()
Availability
Windows
Usage
ActiveXinstance.doVerbShow():Void
Parameters
None
Returns
Nothing
Description
Executes a SHOW verb on the ActiveX Object. Instructs an object to show itself for editing or viewing. Called to display newly
inserted objects for initial editing and to show link sources. Usually an alias for some other object-defined verb.
Notes
Example
myActiveX.doVerbShow()
6.1.2.10 ActiveX.doVerbUIActivate()
Availability
Windows
Usage
ActiveXinstance.doVerbUIActivate():Void
Parameters
None
Returns
Nothing
Description
Executes a UIACTIVATE verb on the ActiveX Object. Activates an object in place, along with its full set of user-interface tools,
including menus, toolbars, and its name in the title bar of the container window.
Notes
Example
myActiveX.doVerbUIActivate()
6.1.2.11 ActiveX.getProperty()
Availability
Windows
Usage
ActiveXinstance.getProperty(propertyName:String):String
Parameters
Returns
A String
Description
Notes
Regardless of the property type, the returned value will always be a string.
Example
To receive the value of a property called Movie, in an ActiveX Object referenced as myActiveX :
6.1.2.12 ActiveX.hide()
Availability
Windows
Usage
ActiveXinstance.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
Example
myActiveX.hide()
6.1.2.13 ActiveX.loadObject()
Availability
Windows
Usage
ActiveXinstance.loadObject(fileName:String):Void
Parameters
Returns
Nothing
Description
Notes
For use after an ActiveX Object has been instantiated. Loads a File which was previously saved using
mdm.ActiveX.saveObject()
Example
ActiveXinstance.loadObject("myFile.dat")
6.1.2.14 ActiveX.runMethod()
Availability
Windows
Usage
ActiveXinstance.runMethod(methodName:String, numArguments:String):Void
Parameters
Returns
Nothing
Description
Notes
If your method has arguments, the you MUST set up the parameters first before you can run this command. See
ActiveX.addMethodParam()
You must specify the number of arguments that the method has. If it has none, then give it a value of "0".
Example
We instantiate an ActiveX Instance, myActiveX, which contains a method called myMethod. This method has 2 parameters
which must be declared first, before we can run the method:
myActiveX.runMethod("myMethod", 2)
In the next example below, the same Method does not have any Parameters. In this case, the correct code would be:
myActiveX.runMethod("myMethod", 0)
6.1.2.15 ActiveX.runMethodRet()
Availability
Windows
Usage
ActiveXinstance.runMethodRet(methodName:String, numArguments:Number):Void
Parameters
Returns
A String
Description
Will run the specified method on the ActiveX/OLE Object. This command is the same as ActiveX.runMethod() except
that it has a return variable.
Notes
If your method has arguments, the you MUST set up the parameters first before you can run this command. See
ActiveX.addMethodParam()
You must specify the number of arguments that the method has. If it has none, then give it a value of "0".
Example
We instantiate an ActiveX Instance, myActiveX, which contains a method called myMethod. This method has 2 parameters
which must be declared first, before we can run the method:
In the next example below, the same Method does not have any Parameters. In this case, the correct code would be:
6.1.2.16 ActiveX.saveDoc()
Availability
Windows
Usage
ActiveXinstance.saveDoc(fileName:String):Void
Parameters
Returns
Nothing
Description
Notes
For use after an ActiveX Object has been instantiated. Only applicable to Objects that support this function.
For loading a file into the object you have to use the OPEN verb first, and instruct the user to load the desired document, and
then "update" in order to get the information into the embedded object. Alternatively you could use the objects own methods (if
they exist) for loading and saving files.
Example
If a "Word.Document" Object was loaded (as myActiveX ), then by specifying the filename "C:\\myFile.doc" a word document
would be saved to the hard disk, containing the contents of the document in the object:
myActiveX.saveDoc("C:\\myFile.doc")
6.1.2.17 ActiveX.saveObject()
Availability
Windows
Usage
ActiveXinstance.saveObject(fileName:String):Void
Parameters
Returns
Nothing
Description
Saves the status of the current ActiveX/OLE Object to a File for later use.
Notes
This command is only applicable to ActiveX objects which support this feature. For use after an ActiveX Object has been
instantiated.
Example
ActiveXinstance.saveObject("myFile.dat")
6.1.2.18 ActiveX.setProperty()
Availability
Windows
Usage
ActiveXinstance.setProperty(propertyName:String, propertyType:String,
newValue:String):Void
Parameters
Returns
Nothing
Description
Will set the ActiveX/OLE Object's property value to the parameters specified.
Notes
The correct Property Type must be passed for this command to function correctly.
Example
We have a Shockwave Flash Object loaded in the instance myActiveX and we want to set the movie property:
6.1.2.19 ActiveX.show()
Availability
Windows
Usage
ActiveXinstance.show():Void
Parameters
None
Returns
Nothing
Description
Notes
Example
myActiveX.show()
6.1.3 Properties
6.1.3.1 ActiveX.height
Availability
Windows
Usage
ActiveXinstance.height:Number
Description
Notes
None
Example
The following code sets the Height of the myActiveX object to 500 pixels:
myActiveX.height = 500;
6.1.3.2 ActiveX.visible
Availability
Windows
Usage
ActiveXinstance.visible:Boolean
Description
Notes
None
Example
myActiveX.visible = false;
6.1.3.3 ActiveX.width
Availability
Windows
Usage
ActiveXinstance.width:Number
Description
Notes
None
Example
The following code sets the Width of the myActiveX object to 500 pixels:
myActiveX.width = 500;
6.1.3.4 ActiveX.x
Availability
Windows
Usage
ActiveXinstance.x:Number
Description
Gets or Sets the pixel X position as an integer of the referenced ActiveX instance
Notes
None
Example
The following code sets the X position of the myActiveX object to 100 pixels:
myActiveX.x = 100;
6.1.3.5 ActiveX.y
Availability
Windows
Usage
ActiveXinstance.y:Number
Description
Gets or Sets the pixel Y position as an integer of the referenced ActiveX instance
Notes
None
Example
The following code sets the Y position of the myActiveX object to 100 pixels:
myActiveX.y = 100;
6.2 mdm.Application
Availability
mdm.Application
Object Description
Library Library Object
Screensaver Screensaver Object
Method Description
Application.bringToFront() Restores the application to topmost standard mode.
Application.delay() Pauses all execution in the form it is called from.
Property Description
Application.filename Contains the Application File Name.
Application.filenameUnicode Contains the Application File Name. Unicode Compliant.
Application.pathUnix Contains the Application Path in Unix Format for Mac OSX.
Application.title Sets the Application Title.
Event Description
6.2.1 Objects
6.2.1.1 Application.Library
Availability
mdm.Application.Library
Method Description
Application.Library.extractAllToDir(
Extracts all packed files to the specified directory.
)
Application.Library.extractAllToExec Extracts all packed files to the same directory as the
Path() Projector.
6.2.1.1.1 Methods
6.2.1.1.1.1 Application.Library.extractAllToDir()
Availability
Usage
mdm.Application.Library.extractAllToDir(extractDir:String):Void
Parameters
Returns
Nothing
Description
Example
mdm.Application.Library.extractAllToDir("c:\\");
6.2.1.1.1.2 Application.Library.extractAllToExecPath()
Availability
Usage
mdm.Application.Library.extractAllToExecPath():Void
Parameters
None
Returns
Nothing
Description
Example
mdm.Application.Library.extractAllToExecPath();
6.2.1.1.1.3 Application.Library.extractToExecPath()
Availability
Usage
mdm.Application.Library.extractToExecPath(packedFile:String, extractedFile:String
):Void
Parameters
Returns
Nothing
Description
Notes
The extractedFile parameter must NOT include a path as it will always extract to the Projector Directory.
Example
mdm.Application.Library.extractToExecPath("myFile.txt", "myFile.txt");
6.2.1.1.1.4 Application.Library.extractToFile()
Availability
Usage
mdm.Application.Library.extractToFile(packedFile:String, extractedFilePath:String)
:Void
Parameters
extractedFilePath:String Reference to target file path (file path where file is to be created)
Returns
Nothing
Description
Notes
Example
mdm.Application.Library.extractToFile("myFile.txt", "c:\\myFile.txt");
6.2.1.1.1.5 Application.Library.extractToVar()
Availability
Usage
mdm.Application.Library.extractToVar(packedFile:String):String
Parameters
Returns
A String
Description
Notes
Example
6.2.1.2 Application.Screensaver
Availability
mdm.Application.Screensaver
Method Description
Application.Screensaver.mouseMoveExit Enables or disables the Screensaver exiting upon Mouse
s() Movement.
Application.Screensaver.keyPressExits Enables or disables the Screensaver exiting upon a Key
() Press.
6.2.1.2.1 Methods
6.2.1.2.1.1 Application.Screensaver.mouseMoveExits()
Availability
Windows
Usage
mdm.Application.Screensaver.mouseMoveExits(Exits:Boolean):Void
Parameters
Returns
Nothing
Description
Enables or disables the Screensaver exiting upon Mouse Movement. If this command is not specified in your compiled
Screensaver project, it will automatically default to a "true" initialization.
Example
mdm.Application.Screensaver.mouseMoveExits(true);
6.2.1.2.1.2 Application.Screensaver.keyPressExits()
Availability
Windows
Usage
mdm.Application.Screensaver.keyPressExits(Exits:Boolean):Void
Parameters
Returns
Nothing
Description
Enables or disables the Screensaver exiting upon a Key Press. If this command is not specified in your compiled Screensaver
project, it will automatically default to a "false" initialization.
Example
mdm.Application.Screensaver.keyPressExits(true);
6.2.1.3 Application.Timer
Availability
mdm.Application.Timer
Method Description
Application.Timer.start() Enables a Global Projector Timer.
Application.Timer.stop() Disables the Specified Projector Timer.
Method Description
onTimer Executes a function during a Timer Interval.
6.2.1.3.1 Methods
6.2.1.3.1.1 Application.Timer.start()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Enables a Global Projector Timer which executes the System Event Function onTimer at the interval specified.
Notes
You can set upto 10 seperate Timers. The value for interval is in milliseconds. If cycle is set to "false", the time will only run
once; if set to "true", the timer will run indefinately.
Example
var id = 0;
var interval = 1000;
var cycle = true;
mdm.Application.Timer.start(id, interval, cycle);
or:
6.2.1.3.1.2 Application.Timer.stop()
Availability
Windows
Usage
mdm.Application.Timer.stop(id:Number):Void
Parameters
Returns
Nothing
Description
Example
var id = 0;
mdm.Application.Timer.stop(id);
or:
mdm.Application.Timer.stop(0);
6.2.1.3.1.3 Application.Timer.stopAll()
Availability
Windows
Usage
mdm.Application.Timer.stopAll():Void
Parameters
None
Returns
Nothing
Description
Example
mdm.Application.Timer.stopAll();
6.2.1.3.2 Events
6.2.1.3.2.1 onTimerX
Availability
Windows
Usage
mdm.Application.Timer.onTimerX:Function
Parameters
None
Description
Executes a function when a Timer Interval Occurs. Replace 'X' with the Timer id.
Notes
Example
mdm.Application.Timer.onTimer1 = function(){
mdm.Dialogs.Prompt("Timer 1 Interval")
}
6.2.1.4 Application.Trial
Availability
mdm.Application.Trial
Method Description
Will activate a valid serial and remove the Projector Trial
Application.Trial.activate()
Protection.
Application.Trial.evaluate() Will validate a specified serial.
Method Description
Contains the Number of Days left in a Trial Limited
Application.Trial.daysLeft
Projector.
Application.Trial.expired Returns "true" or "false" based upon the Expiration of a
Trial Projector.
Returns "true" or "false" based upon whether a Trial
Application.Trial.tampered
Projector has been tampered.
Contains the Number of Uses left in a Trial Limited
Application.Trial.usesLeft
Projector.
6.2.1.4.1 Methods
6.2.1.4.1.1 Application.Trial.activate()
Availability
Windows
Usage
mdm.Application.Trial.activate(serial:String):Boolean
Parameters
Returns
A Boolean
Description
Will activate a valid serial and remove the Projector Trial Protection.
Notes
A true or false value will be returned based upon the success of the command.
Example
Simple Usage:
Result = mdm.Application.Trial.activate("ABC1234HB67N");
if (mdm.Application.Trial.activate("ABC1234HB67N") == true){
mdm.Dialogs.prompt("Your Software has been Activated")
}
6.2.1.4.1.2 Application.Trial.evaluate()
Availability
Windows
Usage
mdm.Application.Trial.evaluate(serial:String):Boolean
Parameters
Returns
A Boolean
Description
Notes
Example
Simple Usage:
Result = mdm.Application.Trial.evaluate("ABC1234HB67N");
if (mdm.Application.Trial.evaluate("ABC1234HB67N") == false){
mdm.Dialogs.prompt("Your Serial is Invalid")
}
6.2.1.4.1.3 Application.Trial.resetTimer()
Availability
Windows
Usage
mdm.Application.Trial.resetTimer():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Application.Trial.resetTimer()
6.2.1.4.2 Properties
6.2.1.4.2.1 Application.Trial.daysLeft
Availability
Windows
Usage
mdm.Application.Trial.daysLeft:Number
Description
Notes
None
Example
6.2.1.4.2.2 Application.Trial.expired
Availability
Windows
Usage
mdm.Application.Trial.expired:Boolean
Description
Notes
None
Example
6.2.1.4.2.3 Application.Trial.tampered
Availability
Windows
Usage
mdm.Application.Trial.tampered:Boolean
Description
Returns "true" or "false" based upon whether a Trial Projector has been tampered.
Notes
None
Example
6.2.1.4.2.4 Application.Trial.usesLeft
Availability
Windows
Usage
mdm.Application.Trial.usesLeft:Number
Description
Notes
None
Example
6.2.2 Methods
6.2.2.1 Application.bringToFront()
Availability
Windows
Usage
mdm.Application.bringToFront():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Application.bringToFront()
6.2.2.2 Application.delay()
Availability
Windows
Usage
mdm.Application.delay(delay:Number):Void
Parameters
Returns
Nothing
Description
This command pauses all execution in the form it is called from, for the specified time in miliseconds (plus the time it takes for
system events to clear the system message queue, allowing drawing and other system events to occur).
Notes
None
Example
mdm.Application.delay(10)
6.2.2.3 Application.doEvents()
Availability
Windows
Usage
mdm.Application.doEvents():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Application.doEvents()
6.2.2.4 Application.enableExitHandler()
Availability
Usage
mdm.Application.enableExitHandler():Void
Parameters
None
Returns
nothing
Description
When executed, this command will catch an external exit command (ie. When a user clicks on the corner close button of the
projector) and execute System Event Function "onAppExit". The projector can then handle any exit request that is generated
outside the movie, and process a custom response/action before exit.
Notes
None
Example
mdm.Application.enableExitHandler()
6.2.2.5 Application.exit()
Availability
Usage
mdm.Application.exit():Void
or
mdm.Application.exit(opt:String, message:String):Void
Parameters
Returns
Nothing
Description
Notes
This command has 2 optional parameters which can be used if you would prefer to Prompt the User prior to closing the
Projector. Please see the examples below.
Example
mdm.Application.exit()
6.2.2.6 Application.exitWithCode()
Availability
Windows
Usage
mdm.Application.exitWithCode(exitCode:Number):Void
Parameters
Returns
Nothing
Description
Exits the Projector and sets the System Exit Code to the value defined in exitCode
Notes
This command should only be used by experienced developers who need to set a System Exit Code when their Projector
Exits.
Example
mdm.Application.exitWithCode(25)
6.2.2.7 Application.exitWithModalResult()
Availability
Windows
Usage
mdm.Application.exitWithModalResult(modalResult:String):Void
Parameters
Returns
Nothing
Description
Closes a previously launched modal form and returns the modalResult to the Parent Form. Valid modalResult values are:
none
ok
cancel
abort
retry
ignore
yes
no
all
notoall
yestoall
Notes
The Parent Form is the form which initiated the Modal Form. This can be any Form in your application, including the main
Application Form.
Example
The Main Form initiates a Modal Form. To Exit the Modal Form and return an "ok" message back to the Main Form:
mdm.Application.exitWithModalResult("ok")
6.2.2.8 Application.getCMDParams()
Availability
Windows
Usage
mdm.Application.getCMDParams(cmdID:Number):String
Parameters
Returns
A String
Description
Retrieves the command line parameter set when the Projector has been executed from the command line. Command line
parameters are assigned an "id" in the order they appear in the command line.
Notes
None
Example
cmdParam1 = mdm.Application.getCMDParams(1)
cmdParam2 = mdm.Application.getCMDParams(2)
cmdParam3 = mdm.Application.getCMDParams(3)
cmdParam4 = mdm.Application.getCMDParams(4)
cmdParam5 = mdm.Application.getCMDParams(5)
6.2.2.9 Application.getEnvVar()
Availability
Windows
Usage
mdm.Application.getEnvVar(varName:String):String
Parameters
Returns
A String
Description
Notes
For use after mdm.Application.setEnvVar() - This command is available for advanced users, and certain software
protection packages.
Example
Result = mdm.Application.getEnvVar("myEnvVar");
6.2.2.10 Application.getSecureVar()
Availability
Windows
Usage
mdm.Application.getSecureVar(varName:String):String
Parameters
Returns
A String
Description
Will return the value of the specified secure variable from the Application Wrapper.
Notes
If no value is found, the string "mdm_notfound" will be returned. Secure variables are set in the Main Zinc IDE.
Example
Result = mdm.Application.getSecureVar("mySecureVar");
6.2.2.11 Application.maximize()
Availability
Usage
mdm.Application.maximize():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Application.maximize()
6.2.2.12 Application.minimize()
Availability
Usage
mdm.Application.minimize():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Application.minimize()
6.2.2.13 Application.minimizeToTray()
Availability
Windows
Usage
mdm.Application.minimizeToTray(enable:Boolean):Void
Parameters
Returns
Nothing
Description
Will minimize the application to the tray based upon the value of minimize
Notes
This command will not actually minimize the Projector to the tray, but set the "minimize to tray" flag to "true" so that when a
Application.minimize() command is executed, the application will minimize to the Tray Icon and not the Taskbar.
When using this option the developer must provide a means of restoring the projector, either in a timed manner, or by making
that option available as a Tray Menu Item.
Example
mdm.Application.minimizeToTray(true)
Followed by:
mdm.Application.minimize()
6.2.2.14 Application.printVar()
Availability
Windows
Usage
mdm.Application.printVar(varToPrint:String, showPrintDialog:Boolean):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
To print the contents of a Variable called mainBody and SHOW the Print Dialog Window:
mdm.Application.printVar(mainBody, true)
To print a literal value and NOT show the Print Dialog Window:
6.2.2.15 Application.restore()
Availability
Usage
mdm.Application.restore():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Application.restore()
6.2.2.16 Application.say()
Availability
Usage
mdm.Application.say(text2speech:String):Void
Parameters
Returns
Nothing
Description
Uses the system text2speech capabilities to read back the String in text2speech.
Notes
Windows 2000, XP and Mac OSX Only. To use this command with Win98 machines, you must download and install the
Microsoft Speech SDK at http://www.microsoft.com/speech/download/sdk51
Example
Simple usage:
mdm.Application.say("Zinc is amazing")
6.2.2.17 Application.sendToBack()
Availability
Windows
Usage
mdm.Application.sendToBack():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Application.sendToBack()
6.2.2.18 Application.setEnvVar()
Availability
Windows
Usage
mdm.Application.setEnvVar(varName:String, varValue:String):Void
Parameters
Returns
Nothing
Description
Will set (or create if not declared), a LOCAL environment variable to the specified value.
Notes
This command will NOT set a global variable. ie. It CANNOT change the global PATH variable even if you specify its name.
Any changes apply to the applications running shell ONLY. This command is available for advanced users, and certain
software protection packages.
Example
mdm.Application.setEnvVar("myEnvVar", "Zinc")
6.2.2.19 Application.shake()
Availability
Usage
mdm.Application.shake(shakeTime:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
Simple usage:
mdm.Application.shake(10)
6.2.2.20 Application.showTips()
Availability
Windows
Usage
mdm.Application.showTips(tips:String[, tip:String]):Boolean
Parameters
Returns
A Boolean
Description
Loads a Tips Window from your projector populated with data from the variable tips.
Notes
Your Tips must be delimited with a semicolon ";" character and you must NOT use commas "," in your your Tip Descriptions.
The checked status of the "Show Tips on Startup" will be returned to the variable return as a true or false statement. This will
NOT automatically make an entry and remember the status. The Coder must handle this return based upon the needs of your
Project.
Example
To display the same Window, but with a result to the checked status of "Show Tips on Startup":
6.2.2.21 Application.textAreaEnhance()
Availability
Windows
Usage
mdm.Application.textAreaEnhance(enhance:Boolean):Void
Parameters
Returns
Nothing
Description
When enabled, this command will enhance copying and pasting from within text boxes. However, double clicking to select all
text within a text box will be disabled.
Notes
None
Example
mdm.Application.textAreaEnhance(true);
6.2.3 Properties
6.2.3.1 Application.filename
Availability
Usage
mdm.Application.filename:String
Description
Notes
Mac OSX returns the full Path and File Name. Read Only.
Example
Simple Usage:
mdm.Dialogs.prompt(mdm.Application.filename);
6.2.3.2 Application.filenameUnicode
Availability
Windows
Usage
mdm.Application.filenameUnicode:String
Description
Notes
Example
Simple Usage:
mdm.Dialogs.prompt(mdm.Application.filenameUnicode);
6.2.3.3 Application.filenameUnix
Availability
Mac OSX
Usage
mdm.Application.filenameUnix:String
Description
Notes
Example
Simple Usage:
mdm.Dialogs.prompt(mdm.Application.filenameUnix);
6.2.3.4 Application.isMinimized
Availability
Windows
Usage
mdm.Application.isMinimized():Boolean
Description
Returns a Boolean value indicating whether the Application is minimized (true) or not (false).
Notes
None
Example
Simple Return:
Result = mdm.Application.isMinimized()
if (mdm.Application.isMinimized() == true){
mdm.Dialogs.prompt("Application is Minimized");
}
6.2.3.5 Application.path
Availability
Usage
mdm.Application.path:String
Description
Notes
Read Only.
Example
Simple Usage:
6.2.3.6 Application.pathUnicode
Availability
Windows
Usage
mdm.Application.pathUnicode:String
Description
Notes
Example
Simple Usage:
6.2.3.7 Application.pathUnix
Availability
Mac OSX
Usage
mdm.Application.pathUnix:String
Description
Notes
Example
Simple Usage:
6.2.3.8 Application.title
Availability
Windows
Usage
mdm.Application.title:String
Description
Notes
Write Only.
Example
6.2.4 Events
6.2.4.1 onAppChangeFocus
Availability
Windows
Usage
mdm.Application.onAppChangeFocus:Function
Parameters
None
Description
Example
The following code displays a prompt when the Application Focus changes:
mdm.Application.onAppChangeFocus = function(){
mdm.Dialogs.prompt("Focus Changed")
}
6.2.4.2 onAppExit
Availability
Usage
mdm.Application.onAppExit:Function
Parameters
None
Description
Notes
Example
The following code displays a prompt when the User tries to Exit:
mdm.Application.onAppExit = function(){
mdm.Dialogs.prompt("Not so Fast!")
}
6.2.4.3 onAppMinimize
Availability
Windows
Usage
mdm.Application.onAppMinimize:Function
Parameters
None
Description
Notes
Example
mdm.Application.onAppMinimize = function(){
mdm.Dialogs.prompt("Application Minimized")
}
6.2.4.4 onAppRestore
Availability
Windows
Usage
mdm.Application.onAppRestore:Function
Parameters
None
Description
Notes
Example
mdm.Application.onAppRestore = function(){
mdm.Dialogs.prompt("Application restored")
}
6.2.4.5 onArrowKeyPress
Availability
Windows
Usage
mdm.Application.onArrowKeyPress:Function
Parameters
Description
Executes when the user presses a UP, DOWN, LEFT or RIGHT Arrow Key. Possible return values are:
leftUp
rightUp
upUp
downUp
leftDown
rightDown
upDown
downDown
Notes
Example
Simple Usage:
function onArrowKeyPress(status){
mdm.Dialogs.prompt(status)
}
Advanced Usage:
mdm.Application.onArrowKeyPress = function(myObject){
mdm.Dialogs.prompt(myObject.status)
}
6.2.4.6 onBottomHit
Availability
Windows
Usage
mdm.Application.onBottomHit:Function
Parameters
None
Description
Executes when the specific Form touches the Bottom side of the Desktop Area.
Notes
Example
The following code displays a prompt when bottom hit has occurred:
mdm.Application.onBottomHit = function(){
mdm.Dialogs.prompt("Bottom hit!")
}
6.2.4.7 onDragDrop
Availability
Usage
mdm.Application.onDragDrop:Function
Parameters
Description
Executes when the user drags and drops a file or files onto the Projector.
Notes
Example
The following code displays a prompt when a file is dropped onto the Projector:
mdm.Application.onDragDrop= function(myObject){
mdm.Dialogs.prompt(myObject.files[0])
}
6.2.4.8 onFormChangeFocus
Availability
Usage
mdm.Application.onFormChangeFocus:Function
Parameters
Description
Notes
None
Example
mdm.Application.onFormChangeFocus = function(myObject){
if (myObject.status == true){
mdm.Dialogs.prompt("Form is Focused!")
}
}
6.2.4.9 onFormClose
Availability
Windows
Usage
mdm.Application.onFormClose:Function
Parameters
None
Description
Notes
This Event is only applicable to Sub-Forms. However, to enable this event, you must enable
mdm.Application.enableExitHandler() on the specific Sub-Form.
Example
mdm.Application.onFormClose = function(){
mdm.Dialogs.prompt("Form Attempting to Close")
}
6.2.4.10 onFormMaximize
Availability
Windows
Usage
mdm.Application.onFormMaximize:Function
Parameters
Description
Notes
None
Example
mdm.Application.onFormMaximize = function(myObject){
mdm.Dialogs.prompt(myObject.width)
mdm.Dialogs.prompt(myObject.height)
}
6.2.4.11 onFormMinimize
Availability
Windows
Usage
mdm.Application.onFormMinimize:Function
Parameters
Description
Notes
None
Example
mdm.Application.onFormMinimize = function(myObject){
mdm.Dialogs.prompt(myObject.width)
mdm.Dialogs.prompt(myObject.height)
}
6.2.4.12 onFormReposition
Availability
Usage
mdm.Application.onFormReposition:Function
Parameters
Description
Notes
None
Example
mdm.Application.onFormReposition = function(myObject){
var xPos = myObject.x
var yPos = myObject.y
}
6.2.4.13 onFormResize
Availability
Usage
mdm.Application.onFormResize:Function
Parameters
Description
Notes
None
Example
mdm.Application.onFormResize = function(myObject){
mdm.Dialogs.prompt(myObject.width)
mdm.Dialogs.prompt(myObject.height)
}
6.2.4.14 onFormRestore
Availability
Windows
Usage
mdm.Application.onFormRestore:Function
Parameters
Description
Notes
None
Example
mdm.Application.onFormRestore = function(myObject){
mdm.Dialogs.prompt(myObject.width)
mdm.Dialogs.prompt(myObject.height)
}
6.2.4.15 onLeftHit
Availability
Windows
Usage
mdm.Application.onLeftHit:Function
Parameters
None
Description
Executes when the specific Form touches the Left side of the Desktop Area.
Notes
Example
The following code displays a prompt when left hit has occurred:
mdm.Application.onLeftHit = function(){
mdm.Dialogs.prompt("Left hit!")
}
6.2.4.16 onMDMScriptException
Availability
Windows
Usage
mdm.Application.onMDMScriptException:Function
Parameters
Description
Example
mdm.Application.onMDMScriptException = function(myObject){
mdm.Dialogs.prompt("An error has occured on Frame " + myObject.frameNumber)
mdm.Dialogs.prompt(myObject.command)
mdm.Dialogs.prompt(myObject.message)
// ...and so on
}
6.2.4.17 onMDMScriptExceptionOSX
Availability
Mac OSX
Usage
mdm.Application.onMDMScriptExceptionOSX:Function
Parameters
Description
Example
mdm.Application.onMDMScriptExceptionOSX = function(myObject){
mdm.Dialogs.prompt(myObject.command)
mdm.Dialogs.prompt(myObject.param1)
mdm.Dialogs.prompt(myObject.param2)
// ...and so on
}
6.2.4.18 onRightHit
Availability
Windows
Usage
mdm.Application.onRightHit:Function
Parameters
None
Description
Executes when the specific Form touches the Right side of the Desktop Area.
Notes
Example
The following code displays a prompt when right hit has occurred:
mdm.Application.onRightHit = function(){
mdm.Dialogs.prompt("Right hit!")
}
6.2.4.19 onSplashClosed
Availability
Windows
Usage
mdm.Application.onSplashClosed:Function
Parameters
None
Description
Example
mdm.Application.onSplashClosed = function(){
mdm.Dialogs.prompt("Splash Closed... Starting Application...")
}
6.2.4.20 onTopHit
Availability
Windows
Usage
mdm.Application.onTopHit:Function
Parameters
None
Description
Executes when the specific Form touches the Top side of the Desktop Area.
Notes
Example
The following code displays a prompt when top hit has occurred:
mdm.Application.onTopHit = function(){
mdm.Dialogs.prompt("Bottom hit!")
}
6.3 mdm.AppleScript
Availability
mdm.AppleScript
Method Description
AppleScript.compileScript() Compiles a previously defined AppleScript.
AppleScript.getCompilationError() Returns error details if a compilation error occured.
6.3.1 Methods
6.3.1.1 AppleScript.compileScript()
Availability
Mac OSX
Usage
mdm.AppleScript.compileScript():Boolean
Parameters
None
Returns
A Boolean
Description
Compiles a previously defined AppleScript and returns true if the Script Compiled without Errors, or false is the Script Compiled
with Errors.
Notes
Example
6.3.1.2 AppleScript.getCompilationError()
Availability
Mac OSX
Usage
mdm.AppleScript.getCompilationError():String
Parameters
None
Returns
String
Description
If a compilation error is found, you can use this command to return the exact details of the error
Notes
Example
mdm.Dialogs.prompt(mdm.AppleScript.getCompilationError())
6.3.1.3 AppleScript.getLastError()
Availability
Mac OSX
Usage
mdm.AppleScript.getLastError():String
Parameters
None
Returns
String
Description
If a runtime error is found, you can use this command to return the exact details of the error.
Notes
Example
mdm.Dialogs.prompt(mdm.AppleScript.getLastError());
6.3.1.4 AppleScript.getProperty()
Availability
Mac OSX
Usage
mdm.AppleScript.getProperty(propertyName:String):String
Parameters
Returns
A String
Description
Notes
Example
mdm.Dialogs.prompt(mdm.AppleScript.getProperty("myProperty"));
6.3.1.5 AppleScript.getResult()
Availability
Mac OSX
Usage
mdm.AppleScript.getResult():String
Parameters
None
Returns
A String
Description
Notes
Example
6.3.1.6 AppleScript.run()
Availability
Mac OSX
Usage
mdm.AppleScript.run():Boolean
Parameters
None
Returns
A Boolean
Description
Will run the previously set and compiled AppleScript. Returns true if the Script Executed without Errors, or false is the Script
Executed with Errors.
Notes
If a return value is exepcted, use mdm.AppleScript.getResult() to retrieve it. If an error occured during execution, use
mdm.AppleScript.getLastError() to the return the last Error Message.
Example
mdm.AppleScript.run()
if (mdm.AppleScript.run() == false){
mdm.Dialogs.prompt(mdm.AppleScript.getLastError())
}
6.3.1.7 AppleScript.runEvent()
Availability
Mac OSX
Usage
mdm.AppleScript.runEvent(eventName:String[param1:String[,param2:String[,...]]])
:String
Parameters
param:String Reference to an optional Event Parameter. Upto 8 Parameters can be passed (Param1, Param2 etc).
Returns
A String
Description
This command will execute an Event (a Function that resides inside a AppleScript).
Notes
None
Example
on showDialog (message)
display dialog message
end showDialog
As you can see, the event (function) is called showDialog and it has 1 parameter, message. To run this event, our script would
be:
To run the same AppleScript, but check for a return (if applicable):
6.3.1.8 AppleScript.setProperty()
Availability
Mac OSX
Usage
mdm.AppleScript.setProperty(propertyName:String, propertyValue:String):String
Parameters
Returns
A String
Description
Notes
Example
6.3.1.9 AppleScript.setScript()
Availability
Mac OSX
Usage
mdm.AppleScript.setScript(script:String):Void
Parameters
Returns
Nothing
Description
Notes
This command will NOT actually execute the script, it will only declare it. You must compile and run the AppleScript to execute
it.
Example
6.4 mdm.Audio
Availability
mdm.Audio
Method Description
Will return "true" or "false" based upon the audio recording
Audio.isRecording()
state.
Audio.startRecording() Will Capture Audio using a Microphone or Line In.
6.4.1 Methods
6.4.1.1 Audio.isRecording()
Availability
Windows
Usage
mdm.Audio.isRecording():Boolean
Parameters
None
Returns
A Boolean
Description
Returns "true" or "false" based upon the the current audio recording state.
Notes
None
Example
Simple Usage:
mdm.Dialogs.prompt(mdm.Audio.isRecording());
6.4.1.2 Audio.startRecording()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
This command will use the system sound capture capabilities to record audio from a Microphone or any Line In.
Notes
The Parameter sampleRate must have a value of either 44100, 22050 or 11025. The Parameter recordingMode must have
either value 1 for mono or 2 for stereo.
Example
mdm.Audio.startRecording("C:\\myFile.wav",44100,2)
6.4.1.3 Audio.startRecordingWithAutoOff()
Availability
Windows
Usage
mdm.Audio.startRecordingWithAutoOff(filename:String, sampleRate:Number,
recordingMode:Number, silenceThreshold:Number, silenceDuration:Number):Void
Parameters
Returns
Nothing
Description
This command will use the system sound capture capabilities to record audio from a Microphone or any Line In. This command
will also automatically end the recording session based upon the values set in silenceThreshold and silenceDuration
Notes
The Parameter sampleRate must have a value of either 44100, 22050 or 11025. The Parameter recordingMode must have
either value 1 for mono or 2 for stereo. The Parameter silenceThreshold is a value from 1-100 and silenceDuration is any value
starting from 1.
Example
mdm.Audio.startRecordingWithAutoOff("C:\\myFile.wav",44100,2,20,5)
6.4.1.4 Audio.stopRecording()
Availability
Windows
Usage
mdm.Audio.stopRecording():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Audio.stopRecording()
6.5 mdm.Browser
Availability
mdm.Browser
Constructor Description
Inserts an Internet Explorer Browser Instance using the
mdm.Browser()
specified parameters.
Method Description
Launches the standard IE "Add to Favorites" dialog box
Browser.addFavorite() with the url and name parameters set at the values url and
name
Browser.back() Loads the previous page in the Browser history.
Browser.forward() Loads the next page in the Browser history (if one exists).
Instructs the specified Browser Instance to go to the
Browser.goto()
specific URL.
Instructs the specified Browser Instance to go to the
Browser.gotoTarget()
specific URL in a specific Frame Target.
Browser.hide() Will hide the specified Browser Instance.
Property Description
Returns a current list of stored links in the System
Browser.favorites
Favorites folder.
Browser.height Integer value of pixel height of browser instance.
Event Description
Executes when a Browser Instance has finished loading its
onDocumentComplete
URL.
6.5.1 Constructor
6.5.1.1 mdm.Browser()
Availability
Constructor
Parameters
x:Number X position
y:Number Y Position
Returns
Nothing
Description
Inserts an Internet Explorer Browser Instance using the specified parameters. Multiple Instances can be created (Windows
Only)
Notes
Internet Explorer 5 or higher must be installed on the Windows User system for this command to function correctly. IE5 is
installed by default on all Win98SE systems and up.
Safari must be installed on the Mac OSX User System for this command to function correctly. Safari is installed by default on
all Mac OS 10.3.x systems and up.
Multiple Browser Instances and Relative Positioning is NOT available on Mac OSX Projectors.
Example
Create a new Instance called myBrowser with relative positioning (Windows Only):
// t = top
// b = bottom
// l = left
// r = right
// c = center
6.5.2 Methods
6.5.2.1 Browser.addFavorite()
Availability
Windows
Usage
browserInstance.addFavorite(url:String, description:String):Void
Parameters
Returns
Nothing
Description
Launches the standard IE "Add to Favorites" dialog box with the url and name parameters set at the values url and name.
Notes
None
Example
6.5.2.2 Browser.back()
Availability
Usage
browserInstance.back():Void
Parameters
None
Returns
Nothing
Description
Loads the previous page in the Browser history (if one exists) in the specified Browser Instance.
Notes
None
Example
backButton.onRelease = function(){
myBrowser.back();
}
6.5.2.3 Browser.close()
Availability
Usage
browserInstance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
closeButton.onRelease = function(){
myBrowser.close();
}
6.5.2.4 Browser.forward()
Availability
Usage
browserInstance.forward():Void
Parameters
None
Returns
Nothing
Description
Loads the next page in the Browser history (if one exists).
Notes
None
Example
forwardButton.onRelease = function(){
myBrowser.forward();
}
6.5.2.5 Browser.goto()
Availability
Usage
browserInstance.goto(url:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
visitHomePageButton.onRelease = function(){
myBrowser.goto("http://www.multidmedia.com");
}
6.5.2.6 Browser.gotoTarget()
Availability
Windows
Usage
browserInstance.gotoTarget(url:String, target:String):Void
Parameters
Returns
Nothing
Description
Instructs the specified Browser instance to go to the specific domain or webpage in a specific Frame or Window.
Notes
None
Example
visitHomePageButton.onRelease = function(){
myBrowser.gotoTarget("http://www.multidmedia.com", "mainFrame");
}
6.5.2.7 Browser.hide()
Availability
Usage
browserInstance.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
hideBrowserButton.onRelease = function(){
myBrowser.hide();
}
6.5.2.8 Browser.print()
Availability
Windows
Usage
browserInstance.print(showPrompt:Boolean):Void
Parameters
showPrompt:Boolean parameter to either show or hide the default print dialog box
Returns
Nothing
Description
Prints the contents of the specified Browser Instance. The parameter showPrompt must be a true or false value to either show
or hide the default print dialog box.
Notes
None
Example
printCurrentPageButton.onRelease = function(){
myBrowser.print(false);
}
6.5.2.9 Browser.printCopies()
Availability
Windows
Usage
browserInstance.printCopies(copies:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
browserInstance.printCopies(3)
6.5.2.10 Browser.printFooter()
Availability
Windows
Usage
browserInstance.printFooter(footerText:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
printCurrentPageButton.onRelease = function(){
var footerText = "my footer";
myBrowser.printFooter(footerText);
myBrowser.print(false);
}
6.5.2.11 Browser.printHeader()
Availability
Windows
Usage
browserInstance.printHeader(headerText:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
printCurrentPageButton.onRelease = function(){
var headerText = "my header";
myBrowser.printHeader(headerText);
myBrowser.print(false);
6.5.2.12 Browser.printHTMLHeader()
Availability
Windows
Usage
browserInstance.printHTMLHeader(htmlText:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
printCurrentPageButton.onRelease = function(){
var htmlText = "<b>This is my bold text</b>";
myBrowser.printHTMLHeader(htmlText);
myBrowser.print(false);
}
6.5.2.13 Browser.printMargins()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Sets the page margins of the Browser Print Job. Values are in Inches.
Notes
None
Example
printCurrentPageButton.onRelease = function(){
myBrowser.printMargins(1, 1, 1, 1);
myBrowser.print(false);
}
6.5.2.14 Browser.printOrientation()
Availability
Windows
Usage
browserInstance.printOrientation(orientation:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
browserInstance.printOrientation("landscape")
6.5.2.15 Browser.printPreview()
Availability
Windows
Usage
browserInstance.printPreview():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
previewPrintPageButton.onRelease = function(){
myBrowser.printPreview();
}
6.5.2.16 Browser.refresh()
Availability
Windows
Usage
browserInstance.refresh():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
refreshPageButton.onRelease = function(){
myBrowser.refresh();
}
6.5.2.17 Browser.setSourceInTarget()
Availability
Windows
Usage
browserInstance.setSourceInTarget(content:String, target:String):Void
Parameters
Returns
Nothing
Description
Sets the HTML content of a specific Frame in the specified browser Instance.
Notes
None
Example
setPageButton.onRelease = function(){
var myContent = "<html><b>This is my HTML</b></html>";
var myTarget = "MainFrame";
myBrowser.setSourceInTarget(myContent, myTarget);
}
6.5.2.18 Browser.show()
Availability
Usage
browserInstance.show():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
showPageButton.onRelease = function(){
myBrowser.show();
myBrowser.refresh();
}
6.5.2.19 Browser.stop()
Availability
Windows
Usage
browserInstance.stop():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
stopButton.onRelease = function(){
myBrowser.stop();
}
6.5.3 Properties
6.5.3.1 Browser.favorites
Availability
Windows
Usage
browserInstance.favorites:Array
Description
Returns the Stored Favorites to a 2 dimensional Array. The First Dimension contains the Array Entry ID and the Second
Dimension contains the Favorite Link Details.
Example
6.5.3.2 Browser.height
Availability
Usage
browserInstance.height:Number
Description
Example
Simple Usage:
myBrowser.height = 200;
resizeBrowserButton.onRelase = function(){
myBrowser.height = 400;
myBrowser.width = 400;
}
mdm.Dialogs.prompt(myBrowser.height);
6.5.3.3 Browser.isBusy
Availability
Windows
Usage
browserInstance.isBusy:Boolean
Description
Property which contains current state of activity of the browser instance. Read only.
Example
Simple Usage:
Advanced Usage:
function checkBrowserActivity() {
clearInterval(myInterval);
if (myBrowser.isBusy) {
setInterval(checkBrowserActivity, 500);
} else {
myProgressBar._visible = false;
myBrowser.show();
}
}
myBrowser.hide();
myProgressBar._visible = true;
var myInterval = setInterval(checkBrowserActivity, 500);
mdm.Dialogs.prompt(myBrowser.isBusy);
6.5.3.4 Browser.source
Availability
Usage
browserInstance.source:String
Description
Property which contains loaded page content (as plain or formatted text)..
Example
Simple Usage:
// get data
var myBrowserData = myBrowser.source;
// set data
myBrowser.source = "<b>Hello World!</b>";
mdm.Dialogs.prompt(myBrowser.source);
6.5.3.5 Browser.title
Availability
Windows
Usage
browserInstance.title:String
Description
Text property with current title of the page in the specified Browser Instance. Read only.
Example
Simple Usage:
mdm.Dialogs.prompt(myBrowser.title);
6.5.3.6 Browser.url
Availability
Usage
browserInstance.url:String
Description
Text property with current path to page loaded into browser instance.
Example
Simple Usage:
// set property
myBrowsere.url = "http://www.multidmedia.com";
// get property
var myBrowserURL = myBrowser.url;
mdm.Dialogs.prompt(myBrowser.url);
6.5.3.7 Browser.userAgent
Availability
Windows
Usage
browserInstance.userAgent():String
Description
This commands Sets the User Agent to the specified value. This allows the Browser Instance to identify itself to the remote
server as any Browser other than IE.
Notes
Example
6.5.3.8 Browser.visible
Availability
Windows
Usage
browserInstance.visible:Boolean
Description
Example
Simple Usage:
// get property
var isVisible = myBrowser.visible;
// set property
myBrowser.visible = true;
mdm.Dialogs.prompt(myBrowser.visible);
6.5.3.9 Browser.width
Availability
Usage
browserInstance.width:Number
Description
Example
Simple Usage:
myBrowser.width = 200;
resizeBrowserButton.onRelase = function(){
browserInstance.height = 400;
browserInstance.width = 400;
}
mdm.Dialogs.prompt(myBrowser.width);
6.5.3.10 Browser.x
Availability
Usage
browserInstance.x:Number
Description
Example
Simple Usage:
// get property
var myBrowserLeftEdge = myBrowser.x;
// set property
myBrowser.x = 150;
mdm.Dialogs.prompt(myBrowser.x);
6.5.3.11 Browser.y
Availability
Usage
browserInstance.y:Number
Description
Example
Simple Usage:
// get property
var myBrowserTopEdge = myBrowser.y;
// set property
myBrowser.y = 130;
mdm.Dialogs.prompt(myBrowser.y);
6.5.4 Events
6.5.4.1 onDocumentComplete
Availability
Usage
browserInstance.onDocumentComplete:Function
Parameters
Description
Executes when a Browser Instance has finished loading its content. This event only fires after a mdm.Browser.goto()
command has executed.
Example
myBrowser.onDocumentComplete = function(myObject){
mdm.Dialogs.Prompt(myObject.url + " Loaded")
}
6.6 mdm.Clipboard
Availability
mdm.Clipboard
Method Description
Clipboard.clear() Will clear the selected item(s) from the Clipboard.
Clipboard.copy() Will copy the selected item(s) to the Clipboard.
6.6.1 Methods
6.6.1.1 Clipboard.clear()
Availability
Windows
Usage
mdm.Clipboard.clear():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Clipboard.clear()
6.6.1.2 Clipboard.copy()
Availability
Windows
Usage
mdm.Clipboard.copy():Void
Parameters
None
Returns
Nothing
Description
Notes
When using this command, you must first use the setFocus actionscript to give focus to the element you wish to apply this
action to.
eg.
on (release) {
Selection.setFocus(_root.mytextfield); //where mytextfield is the var name of
the text field
mdm.Clipboard.copy()
}
Example
mdm.Clipboard.copy()
6.6.1.3 Clipboard.copyString()
Availability
Windows
Usage
mdm.Clipboard.copyString(value:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Clipboard.copyString("This is my Content")
6.6.1.4 Clipboard.cut()
Availability
Windows
Usage
mdm.Clipboard.cut():Void
Parameters
None
Returns
Nothing
Description
Notes
When using this command, you must first use the setFocus actionscript to give focus to the element you wish to apply this
action to.
eg.
on (release) {
selection.setfocus('mytextfield'); //where mytextfield is the instance name
of the text field
mdm.Clipboard.cut()
}
Example
mdm.Clipboard.cut()
6.6.1.5 Clipboard.paste()
Availability
Windows
Usage
mdm.Clipboard.paste():Void
Parameters
None
Returns
Nothing
Description
Will paste the item(s) from the Clipboard to the selected input box.
Notes
When using this command, you must first use the setFocus actionscript to give focus to the element you wish to apply this
action to.
eg.
on (release) {
selection.setfocus('mytextfield'); //where mytextfield is the instance name
of the text field
mdm.Clipboard.paste()
}
Example
mdm.Clipboard.paste()
6.7 mdm.COMPort
Availability
mdm.COMPort
Method Description
COMPort.close() Closes the comport.
COMPort.open() This command opens the serial port for communication.
Property Description
COMPort.initialDTR The variable contains Initialdtrstate (DTR)
COMPort.initialRTS The variable contains Initialdtrstate (RTS)
Event Description
onCOMPortCTSChanged Executes when the CTS line changes status.
onCOMPortDSRChanged Executes when the DSR line changes status.
onCOMPortSendProgress Returns the number of bytes sent. Intended for large data.
6.7.1 Methods
6.7.1.1 COMPort.close()
Availability
Windows
Usage
mdm.COMPort.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.COMPort.close();
6.7.1.2 COMPort.open()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
This command opens the Serial Port for communication with the specified settings.
Notes
The event onCOMPortSendProgress can be used to return the number of bytes sent.
Example
6.7.1.3 COMPort.send()
Availability
Windows
Usage
mdm.COMPort.send(value:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.COMPort.send("This is my Content");
6.7.1.4 COMPort.sendFileContents()
Availability
Windows
Usage
mdm.COMPort.sendFileContents(fileName:String):Void
Parameters
fileName:String Value with path to file which contents is to be send through comport.
Returns
Nothing
Description
Notes
None
Example
mdm.COMPort.sendFileContents(mdm.Application.path+"myFile.txt");
6.7.1.5 COMPort.sendHEXData()
Availability
Windows
Usage
mdm.COMPort.sendHEXData(hexdata:String):Void
Parameters
hexdata:String Data to save to a file in HEX format or a pipe delimited list of bytes(decimal).
Returns
Nothing
Description
Notes
None
Example
Hex Data:
mdm.COMPort.sendHEXData("FF0067EA349F");
mdm.COMPort.sendHEXData("255|0|103|234|52|159");
6.7.1.6 COMPort.setBreak()
Availability
Windows
Usage
mdm.COMPort.setBreak():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.COMPort.setBreak();
6.7.1.7 COMPort.setDTR()
Availability
Windows
Usage
mdm.COMPort.setDTR():Void
Parameters
None
Returns
Nothing
Description
Sets the DTR state to high (on) after the comport has opened.
Notes
None
Example
mdm.COMPort.setDTR();
6.7.1.8 COMPort.setEcho()
Availability
Windows
Usage
mdm.COMPort.setEcho(enable:Boolean):Void
Parameters
Returns
Nothing
Description
Enables echo. Any data sent to the Projector will automatically be sent back to the remote end.
Notes
When using linemode or threshold, the echo happens only when the received event fires.
Example
mdm.COMPort.setEcho(true);
6.7.1.9 COMPort.setRTS()
Availability
Windows
Usage
mdm.COMPort.setRTS():Void
Parameters
None
Returns
Nothing
Description
Sets the RTS state to high (on) after the comport has opened.
Notes
None
Example
mdm.COMPort.setRTS();
6.7.1.10 COMPort.setXON()
Availability
Windows
Usage
mdm.COMPort.setXON():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.COMPort.setXON();
6.7.1.11 COMPort.setXOFF()
Availability
Windows
Usage
mdm.COMPort.setXOFF():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.COMPort.setXOFF();
6.7.1.12 COMPort.unsetBreak()
Availability
Windows
Usage
mdm.COMPort.unsetBreak():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.COMPort.unsetBreak();
6.7.1.13 COMPort.unsetDTR()
Availability
Windows
Usage
mdm.COMPort.unsetDTR():Void
Parameters
None
Returns
Nothing
Description
Unsets the DTR state to low (off) after the comport has opened.
Notes
None
Example
mdm.COMPort.unsetDTR();
6.7.1.14 COMPort.unsetRTS()
Availability
Windows
Usage
mdm.COMPort.unsetRTS():Void
Parameters
None
Returns
Nothing
Description
Unsets the RTS state to low (off) after the comport has opened.
Notes
None
Example
mdm.COMPort.unsetRTS();
6.7.1.15 COMPort.useLineMode()
Availability
Windows
Usage
mdm.COMPort.useLineMode(enable:Boolean, lineStr:String):Void
Parameters
Returns
Nothing
Description
When enabled, the component will fire the receive event only when the LineEnd characters are received.
Notes
None
Example
If you will be reading lines typed in by the remote user, then you might want to trigger the received event. In this case you will
need to use the following command to enable this function
mdm.COMPort.useLineMode(true,"#13#10");
If you will be reading a command sent by the remote end, terminated by a semicolon character, then you might want to trigger
the received event. In this case you will need to use the following command to enable this function:
mdm.COMPort.useLineMode(true,";");
6.7.1.16 COMPort.useThreshold()
Availability
Windows
Usage
mdm.COMPort.useThreshold(enable:Boolean, threshold:Number):Void
Parameters
Returns
Nothing
Description
When enabled, the component will fire the receive event only if the certain amount of bytes (or more) is arrived in the Rx
buffer.
Notes
None
Example
If you know that you will be receiving 10 bytes at a time, your corresponding syntax would be:
mdm.COMPort.useThreshold(true,"10");
6.7.2 Properties
6.7.2.1 COMPort.initialDTR
Availability
Windows
Usage
mdm.COMPort.initialDTR:String
Description
The variable contains Initialdtrstate (DTR) which can be: disable, enable or handshake.
Notes
None
Example
Simple Usage:
mdm.Dialogs.prompt(mdm.COMPort.initialDTR);
6.7.2.2 COMPort.initialRTS
Availability
Windows
Usage
mdm.COMPort.initialRTS:String
Description
The variable contains Initialdtrstate (RTS) which can be: disable, enable, handshake or toggle
Notes
None
Example
Simple Usage:
mdm.Dialogs.prompt(mdm.COMPort.initialRTS);
6.7.2.3 COMPort.ports
Availability
Windows
Usage
mdm.COMPort.ports:String
Description
The variable contains delimited list by comma "," containing all the com ports that are found on the system.
Notes
None
Example
Simple Usage:
mdm.Dialogs.prompt(mdm.COMPort.ports);
6.7.2.4 COMPort.rxBuffer
Availability
Windows
Usage
mdm.COMPort.rxBuffer:Number
Description
Number of bytes to use for receiving data. The default value if not set is 8192 bytes
Notes
None
Example
mdm.COMPort.rxBuffer = 7950;
6.7.2.5 COMPort.txBuffer
Availability
Windows
Usage
mdm.COMPort.txBuffer:Number
Description
Number of bytes to use for sending data. The default value if not set is 8192 bytes
Notes
None
Example
mdm.COMPort.txBuffer = 7950;
6.7.3 Events
6.7.3.1 onCOMPortCTSChanged
Availability
Windows
Usage
mdm.COMPort.onCOMPortCTSChanged:Function
Parameters
Description
Executes when the CTS line changes status. A "true" or "false" value is returned to the state parameter.
Example
Simple Usage:
Advanced Usage:
mdm.COMPort.onCOMPortCTSChanged = function(myObject){
mdm.Dialogs.Prompt(myObject.timeCode)
mdm.Dialogs.Prompt(myObject.state)
}
6.7.3.2 onCOMPortDSRChanged
Availability
Windows
Usage
mdm.COMPort.onCOMPortDSRChanged:Function
Parameters
Description
Executes when the DSR line changes status. A "true" or "false" value is returned to the state parameter.
Example
Simple Usage:
Advanced Usage:
mdm.COMPort.onCOMPortDSRChanged = function(myObject){
mdm.Dialogs.Prompt(myObject.timeCode)
mdm.Dialogs.Prompt(myObject.state)
}
6.7.3.3 onCOMPortData
Availability
Windows
Usage
mdm.COMPort.onCOMPortData:Function
Parameters
Description
Example
mdm.COMPort.onCOMPortData = function(myObject){
mdm.Dialogs.Prompt("Unix Time : "+myObject.timeCode+" data received : " +
myObject.data);
}
6.7.3.4 onCOMPortHEXData
Availability
Windows
Usage
mdm.COMPort.onCOMPortHEXData:Function
Parameters
Description
Example
mdm.COMPort.onCOMPortHEXData = function(myObject){
mdm.Dialogs.Prompt("Data Received: " + myObject.hexData);
}
6.7.3.5 onCOMPortDataSent
Availability
Windows
Usage
mdm.COMPort.onCOMPortDataSent:Function
Parameters
Description
Executes when sending has completed and the buffers emptied. For large data transfers, this is the place to start another
send.
Example
Simple Usage:
function onCOMPortDataSent(timeCode){
mdm.Dialogs.Prompt("Data Sent at: " + timeCode);
}
Advanced Usage:
mdm.COMPort.onCOMPortDataSent = function(myObject){
mdm.Dialogs.Prompt("Data Sent at: " + myObject.timeCode);
}
6.7.3.6 onCOMPortError
Availability
Windows
Usage
mdm.COMPort.onCOMPortError:Function
Parameters
Description
Executes when an error occurs. The error code returned will be one of he following:
Example
Simple Usage:
Advanced Usage:
mdm.COMPort.onCOMPortError = function(myObject){
mdm.Dialogs.Prompt(myObject.timeCode)
mdm.Dialogs.Prompt(myObject.error)
}
6.7.3.7 onCOMPortSendProgress
Availability
Windows
Usage
mdm.COMPort.onCOMPortSendProgress:Function
Parameters
Description
Example
Simple Usage:
function onCOMPortSendProgress(timeCode,bytes){
mdm.Dialogs.Prompt(timeCode)
mdm.Dialogs.Prompt(bytes)
}
Advanced Usage:
mdm.COMPort.onCOMPortSendProgress = function(myObject){
mdm.Dialogs.Prompt(myObject.timeCode)
mdm.Dialogs.Prompt(myObject.bytes)
}
6.8 mdm.Database
Availability
mdm.Database
Object Description
ADO ADO Database Object
MSAccess MSAccess Database Object
6.8.1 Objects
6.8.1.1 Database.ADO
Availability
mdm.Applciation.ADO
Method Description
Database.ADO.close() Closes the database connection.
Database.ADO.connect() Establishes a connection with any ADO Database
6.8.1.1.1 Methods
6.8.1.1.1.1 Database.ADO.close()
Availability
Windows
Usage
mdm.Database.ADO.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Database.ADO.close();
6.8.1.1.1.2 Database.ADO.connect()
Availability
Windows
Usage
mdm.Database.ADO.connect(adoString:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
Simple Usage:
6.8.1.1.1.3 Database.ADO.error()
Availability
Windows
Usage
mdm.Database.ADO.error():Boolean
Parameters
None
Returns
A Boolean
Description
Returns a True or False statement based upon a database error. Will return true if an error occurred in the previous query, or
false if no error occurred.
Notes
None
Example
6.8.1.1.1.4 Database.ADO.errorDetails()
Availability
Windows
Usage
mdm.Database.ADO.errorDetails():String
Parameters
None
Returns
A String
Description
Will return the error details of the last query, delimited by a pipe symbol. The format of this string will be:
"dataSource|errorDescription|SQLstateInteger" returned by the ADO connection. If no error has occurred it will return the string
"No errors".
Notes
None
Example
if(mdm.Database.ADO.error() == false){
var myDetails = mdm.Database.ADO.errorDetails();
mdm.Dialogs.prompt("error details: "+myDetails);
}
6.8.1.1.1.5 Database.ADO.getBlob()
Availability
Windows
Usage
mdm.Database.ADO.getBlob(fieldName:String,fieldRow:Number,fileName:String):Void
Parameters
fieldRow:Number Integer which denotes the row containing blob field in the recordset.
Returns
Nothing
Description
Saves the contents of a BLOB or OLE Variant field to the fileName specified. The fileName can then be loaded into an
appropriate container or processed as if it were a normal binary file. The file extension used to save to should be the same as
the OLE object. For example, Image files would be .jpg, .bmp, .gif etc.
Notes
None
Example
mdm.Database.ADO.getBlob("image_fld", 0, mdm.Application.path+"image.jpg");
6.8.1.1.1.6 Database.ADO.getData()
Availability
Windows
Usage
mdm.Database.ADO.getData():Array
Parameters
None
Returns
An Array
Description
Returns the Full Query Data to a 2 Dimensional Array. The First Dimension contains the Row Number and the Second
Dimension contains the Field Number.
Notes
Example
Simple Usage:
mdm.Dialogs.prompt(dataSet[0][3])
Advanced Usage:
6.8.1.1.1.7 Database.ADO.getField()
Availability
Windows
Usage
mdm.Database.ADO.getField(rowIndex:Number, columnIndex:Number):String
Parameters
Returns
A String
Description
Retrieves data from a Database from the specified Row and Field Index.
Notes
None
Example
Availability
Windows
Usage
mdm.Database.ADO.getHTML():String
Parameters
None
Returns
A String
Description
Notes
None
Example
Availability
Windows
Usage
mdm.Database.ADO.getRecordCount():Number
Parameters
None
Returns
An Integer
Description
Returns the number of rows in a result set after a connection with a Database has been established.
Notes
None
Example
Availability
Windows
Usage
mdm.Database.ADO.getXML():String
Parameters
None
Returns
A String
Description
Notes
None
Example
Availability
Windows
Usage
mdm.Database.ADO.runQuery(query:String):Void
Parameters
query:String Correct SQL string with INSERT, UPDATE or DELETE statement to be executed.
Returns
Nothing
Description
Notes
Example
Availability
Windows
Usage
mdm.Database.ADO.select(query:String):Void
Parameters
Returns
Nothing
Description
Notes
This command will ONLY run a SELECT statement. For running INSERT, DELETE or UPDATE queries, use
mdm.ADO.runQuery()
Example
Availability
Windows
Usage
mdm.Database.ADO.success():Boolean
Parameters
None
Returns
A Boolean
Description
Returns a True or False statement based upon the presence of a database connection.
Notes
None
Example
6.8.1.2 Database.MSAccess
Availability
mdm.Database.MSAccess
Method Description
Database.MSAccess.close() Closes the database connection.
Database.MSAccess.compact() Compacts and Repairs the Access Databases.
6.8.1.2.1 Methods
6.8.1.2.1.1 Database.MSAccess.close()
Availability
Windows
Usage
mdm.Database.MSAccess.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Database.MSAccess.close();
6.8.1.2.1.2 Database.MSAccess.compact()
Availability
Windows
Usage
mdm.Database.MSAccess.compact(fileName:String, databaseVersion:String,
databasePassword:String):Void
Parameters
Returns
Nothing
Description
Compacts and Repairs the Access Databases defined. databaseVersion can be "2000" or "97". All Database data is kept
intact. The variable password is an optional parameter.
Notes
Example
mdm.Database.MSAccess.compact(mdm.Application.path+"myDatabase.mdb", "2000",
"myPassword");
6.8.1.2.1.3 Database.MSAccess.connect()
Availability
Windows
Usage
mdm.Database.MSAccess.connect(filename:String, [databasePassword:String]):Void
Parameters
Returns
Nothing
Description
Establishes a connection with the Access Database. The variable password is an optional parameter.
Notes
This command will only connect to .mdb files in the same folder as your Application. If your Database is located elswhere,
please use mdm.Database.MSAccess.connectAbs()
Example
mdm.Database.MSAccess.connect("dbtutor.mdb", "myPassword");
6.8.1.2.1.4 Database.MSAccess.connectAbs()
Availability
Windows
Usage
mdm.Database.MSAccess.connectAbs(filename:String, [databasePassword:String]):Void
Parameters
Returns
Nothing
Description
Establishes a connection with the Access Database at an absolute position or network path. The variable password is a
required parameter even if your Database does not have a password. See Examples below.
Notes
Example
mdm.Database.MSAccess.connectAbs("d:\\dbtutor.mdb", "myPassword");
mdm.Database.MSAccess.connectAbs("d:\\dbtutor.mdb", "");
6.8.1.2.1.5 Database.MSAccess.connectReadOnly()
Availability
Windows
Usage
mdm.Database.MSAccess.connectReadOnly(filename:String, [databasePassword:String])
:Void
Parameters
Returns
Nothing
Description
Establishes a connection with the Access Database in READ ONLY mode. The variable password is an optional parameter.
Notes
None
Example
mdm.Database.MSAccess.connectReadOnly("dbtutor.mdb", "myPassword");
6.8.1.2.1.6 Database.MSAccess.connectReadOnlyAbs()
Availability
Windows
Usage
mdm.Database.MSAccess.connectReadOnlyAbs(filename:String, [databasePassword:String
]):Void
Parameters
Returns
Nothing
Description
Establishes a connection with the Access Database at an absolute position or network path in READ ONLY mode. The
variable password is an optional parameter.
Notes
Example
mdm.Database.MSAccess.connectReadOnlyAbs("d:\\dbtutor.mdb", "myPassword");
6.8.1.2.1.7 Database.MSAccess.error()
Availability
Windows
Usage
mdm.Database.MSAccess.error():Boolean
Parameters
None
Returns
A Boolean
Description
Returns a True or False statement based upon a database error. Will return true if an error occurred in the previous query, or
false if no error occurred.
Notes
None
Example
6.8.1.2.1.8 Database.MSAccess.errorDetails()
Availability
Windows
Usage
mdm.Database.MSAccess.errorDetails():String
Parameters
None
Returns
A String
Description
Will return the error details of the last query, delimited by a pipe symbol. The format of this string will be: "datasource|error
description|SQLstateInteger" returned by the database connection. If no error has occurred it will return the string "No errors".
Notes
None
Example
if(mdm.Database.MSAccess.error() == true){
var myDetails = mdm.Database.MSAccess.errorDetails();
mdm.Dialogs.prompt("error details: "+myDetails);
}
6.8.1.2.1.9 Database.MSAccess.getBlob()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Saves the contents of a BLOB or OLE Variant field to the fileName specified. The fileName can then be loaded into an
appropriate container or processed as if it were a normal binary file. The file extension used to save to should be the same as
the OLE object. For example, Image files would be .jpg, .bmp, .gif etc.
Notes
None
Example
mdm.Database.MSAccess.getBlob("image_fld", 0, mdm.Application.path+"image.jpg");
6.8.1.2.1.10 Database.MSAccess.getData()
Availability
Windows
Usage
mdm.Database.MSAccess.getData():Array
Parameters
None
Returns
An Array
Description
Returns the Full Query Data to a 2 Dimensional Array. The First Dimension contains the Row Number and the Second
Dimension contains the Field Number.
Notes
Example
Simple Usage:
mdm.Dialogs.prompt(dataSet[0][3])
Advanced Usage:
6.8.1.2.1.11 Database.MSAccess.getField()
Availability
Windows
Usage
mdm.Database.MSAccess.getField(rowIndex:Number, columnIndex:Number):String
Parameters
Returns
A String
Description
Retrieves data from a Database from the specified Row and Field Index.
Notes
None
Example
Availability
Windows
Usage
mdm.Database.MSAccess.getHTML():String
Parameters
None
Returns
A String
Description
Notes
None
Example
Availability
Windows
Usage
mdm.Database.MSAccess.getRecordCount():Number
Parameters
None
Returns
An Integer
Description
Returns the number of rows in a result set after a connection with a Database has been established.
Notes
None
Example
Availability
Windows
Usage
mdm.Database.MSAccess.getXML():String
Parameters
None
Returns
A String
Description
Notes
None
Example
Availability
Windows
Usage
mdm.Database.MSAccess.runQuery(query:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
Availability
Windows
Usage
mdm.Database.MSAccess.select(query:String):Void
Parameters
Returns
Nothing
Description
Notes
This command will ONLY run a SELECT statement. For running INSERT, DELETE or UPDATE queries, use
mdm.MSAccess.runQuery()
Example
Availability
Windows
Usage
mdm.Database.MSAccess.success():Boolean
Parameters
None
Returns
A Boolean
Description
Returns a True or False statement based upon the presence of a database connection.
Notes
None
Example
6.8.1.3 Database.MySQL
Availability
mdm.Database.Mysql
Method Description
Database.MySQL.close() Closes the database connection.
Database.MySQL.connect() Open a connection to a MySQL server.
6.8.1.3.1 Methods
6.8.1.3.1.1 Database.MySQL.close()
Availability
Usage
mdm.Database.MySQL.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Database.MySQL.close();
6.8.1.3.1.2 Database.MySQL.connect()
Availability
Usage
Parameters
host:String Name of server where MySQL database is. It can be DNS like "localhost" or IP "127.0.0.1".
port:String Port number on which MySQL listens for connections. If left as empty string (""), this will default to 3306.
Returns
A Boolean
Description
Opens a connection to a MySQL database. Returns a true or false value based upon a successful Connection.
Notes
None
Example
6.8.1.3.1.3 Database.MySQL.getData()
Availability
Usage
mdm.Database.MySQL.getDelimited():Array
Parameters
None
Returns
An Array
Description
Returns the Full Query Data to a 2 Dimensional Array. The First Dimension contains the Row Number and the Second
Dimension contains the Field Number.
Notes
Example
Simple Usage:
mdm.Dialogs.prompt(dataSet[0][3])
Advanced Usage:
6.8.1.3.1.4 Database.MySQL.getField()
Availability
Usage
mdm.Database.MySQL.getField(rowIndex:Number, columnIndex:Number):String
Parameters
Returns
A String
Description
Returns a single result from a MySQL by specifying the row and column.
Notes
None
Example
Availability
Usage
mdm.Database.MySQL.getLastError():String
Parameters
None
Returns
A String
Description
Notes
None
Example
Availability
Usage
mdm.Database.MySQL.getLastInsertedId():Number
Parameters
None
Returns
An Integer
Description
Notes
None
Example
Availability
Usage
mdm.Database.MySQL.getRecordCount():Number
Parameters
None
Returns
An Integer
Description
Returns the number of rows in a MySQL Result Set after a query has been performed.
Notes
None
Example
Availability
Windows
Usage
mdm.Database.MySQL.getStatus():String
Parameters
None
Returns
A String
Description
Notes
None
Example
Availability
Usage
mdm.Database.MySQL.isConnected():Boolean
Parameters
None
Returns
A Boolean
Description
Returns true if the MySQL database is still connected, (ie has not timed out). If the database is connected, the user will have to
reconnect.
Notes
None
Example
Availability
Usage
mdm.Database.MySQL.runQuery(query:String):Boolean
Parameters
query:String Correct SQL string with SELECT, INSERT, UPDATE or DELETE statement to be executed.
Returns
Description
Executes a SQL statement query on a MySQL database. If a successful query has been executed, returns "true", or if an error
occurred, returns "false".
Notes
None
Example
6.9 mdm.Dialogs
Availability
mdm.Dialogs
Object Description
BrowseFile BrowseFile Object
BrowseFileUnicode BrowsFileUnicode Object
Method Description
Executes an Input Box Dialog, which allows the user to type
Dialogs.inputBox()
a string.
Dialogs.prompt() Executes a standard Prompt Dialog displaying the custom
message.
Executes a standard Prompt Dialog displaying the custom
Dialogs.promptUnicode()
message. Unicode Compliant.
Executes an advanced Prompt Dialog displaying the
Dialogs.promptAdv()
custom message.
Executes an advanced Prompt Dialog displaying the
Dialogs.promptAdvUnicode()
custom message. Unicode Compliant.
Executes a Modal Prompt Dialog with the specified
Dialogs.promptModal()
parameters.
Executes a Modal Prompt Dialog with the specified
Dialogs.promptModalUnicode()
parameters. Unicode Complaint.
6.9.1 Objects
6.9.1.1 Dialogs.BrowseFile
Availability
mdm.Dialogs.BrowseFile
Method Description
Property Description
Dialogs.BrowseFile.allowMultiple Enables or Disables Multiple Select.
Dialogs.BrowseFile.buttonText Sets the Initial default button text.
6.9.1.1.1 Methods
6.9.1.1.1.1 Dialogs.BrowseFile.show()
Availability
Usage
mdm.Dialogs.BrowseFile.show():String
Parameters
None
Returns
A String
Description
Allows the user to select any file from their system and returns the path and filename.
Notes
If the user selects "Cancel" the value returned will be the string "false".
This command can return either a string or an array depending on the file(s) selected. For example, if no files are selected or
an array if multiple files are selected.
Example
6.9.1.1.1.2 Dialogs.BrowseFile.showCreatorCode()
Availability
Mac OSX
Usage
mdm.Dialogs.BrowseFile.showCreatorCode():String
Parameters
None
Returns
A String
Description
Allows the user to select any file from their system and returns the path and filename.
Notes
This command lists files by Creator Code and not be File Extensions. See mdm.BrowseFile.showCreatorCode()
Example
6.9.1.1.2 Properties
6.9.1.1.2.1 Dialogs.BrowseFile.allowMultiple
Availability
Usage
mdm.Dialogs.BrowseFile.allowMultiple:Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
Simple Usage:
mdm.Dialogs.BrowseFile.allowMultiple = true;
6.9.1.1.2.2 Dialogs.BrowseFile.buttonText
Availability
Usage
mdm.Dialogs.BrowseFile.buttonText:Void
Parameters
None
Returns
Nothing
Description
Sets the initial default button text for use with the mdm.Dialogs.BrowseFile.show().
Notes
None
Example
Simple Usage:
Availability
Mac OSX
Usage
mdm.Dialogs.BrowseFile.creatorCode:Void
Parameters
None
Returns
Nothing
Description
Filters the Files shown in the mdm.Dialogs.BrowseFile.show() dialog by Creator Code. Multiple Extensions are
delimited by the pipe Character "|".
Notes
None
Example
mdm.Dialogs.BrowseFile.creatorCode = "application/x-mif|application/binhex40";
6.9.1.1.2.4 Dialogs.BrowseFile.defaultDirectory
Availability
Usage
mdm.Dialogs.BrowseFile.defaultDirectory:Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Dialogs.BrowseFile.defaultDirectory = mdm.Application.path;
6.9.1.1.2.5 Dialogs.BrowseFile.defaultExtension
Availability
Windows
Usage
mdm.Dialogs.BrowseFile.defaultExtension:Void
Parameters
None
Returns
Nothing
Description
Sets the default extension of a file to the value specified. For example, a value of "exe" would assign .exe as the extension to
any file selected from a mdm.Dialogs.BrowseFile.show() command. If no extension is specified, then the extension
returned will be the default extension of the file (as specified in the edit box of the dialog).
Notes
None
Example
mdm.Dialogs.BrowseFile.defaultExtension = "exe";
6.9.1.1.2.6 Dialogs.BrowseFile.defaultFilename
Availability
Windows
Usage
mdm.Dialogs.BrowseFile.defaultFilename:Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Dialogs.BrowseFile.defaultFilename = "myFile";
6.9.1.1.2.7 Dialogs.BrowseFile.dialogText
Availability
Mac OSX
Usage
mdm.Dialogs.BrowseFile.dialogText:Void
Parameters
None
Returns
Nothing
Description
Sets the Browse File Dialog Text for use with the mdm.Dialogs.BrowseFile.show().
Notes
None
Example
Availability
Usage
mdm.Dialogs.BrowseFile.filterList:Void
Parameters
None
Returns
Nothing
Description
Filters the Files shown in the mdm.Dialogs.BrowseFile.show() dialog by Filename Extension. Multiple Extensions
are delimited by the pipe Character "|".
Notes
None
Example
Availability
Windows
Usage
mdm.Dialogs.BrowseFile.filterText:Void
Parameters
None
Returns
Nothing
Description
Sets the text label in front of the filter selector in the mdm.Dialogs.BrowseFile dialog.
Notes
None
Example
Availability
Usage
mdm.Dialogs.BrowseFile.title:Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
6.9.1.2 Dialogs.BrowseFileUnicode
Availability
mdm.Dialogs.BrowseFileUnicode
Method Description
Dialogs.BrowseFileUnicode.show() Displays a Browse File Dialog. Unicode Compliant.
Property Description
Dialogs.BrowseFileUnicode.allowMultip
Enables or Disables Multiple Select.
le
Dialogs.BrowseFileUnicode.defaultDire Sets the initial default directory to Browse. Unicode
ctory Compliant.
Dialogs.BrowseFileUnicode.defaultExte
Sets the default extension to Browse. Unicode Compliant.
nsion
Dialogs.BrowseFileUnicode.defaultFile
Sets the default Filename. Unicode Compliant.
name
Dialogs.BrowseFileUnicode.filterList Sets the filter(s) of Browse Dialog. Unicode Compliant.
Dialogs.BrowseFileUnicode.title Sets the Title of the Browse File Dialog. Unicode
Compliant.
6.9.1.2.1 Methods
6.9.1.2.1.1 Dialogs.BrowseFileUnicode.show()
Availability
Windows
Usage
mdm.Dialogs.BrowseFileUnicode.show():String
Parameters
None
Returns
A String
Description
Allows the user to select any file from their system and returns the path and filename.
Notes
Unicode Compliant.
Example
6.9.1.2.2.1 Dialogs.BrowseFileUnicode.allowMultiple
Availability
Windows
Usage
mdm.Dialogs.BrowseFileUnicode.allowMultiple:Void
Parameters
None
Returns
Nothing
Description
Notes
Unicode Compliant.
Example
Simple Usage:
mdm.Dialogs.BrowseFileUnicode.allowMultiple = true;
6.9.1.2.2.2 Dialogs.BrowseFileUnicode.defaultDirectory
Availability
Windows
Usage
mdm.Dialogs.BrowseFileUnicode.defaultDirectory:Void
Parameters
None
Returns
Nothing
Description
Notes
Unicode Compliant.
Example
Simple Usage:
mdm.Dialogs.BrowseFileUnicode.defaultDirectory = mdm.Application.pathUnicode;
6.9.1.2.2.3 Dialogs.BrowseFileUnicode.defaultExtension
Availability
Windows
Usage
mdm.Dialogs.BrowseFileUnicode.defaultExtension:Void
Parameters
None
Returns
Nothing
Description
Sets the default extension of a file to the value specified. For example, a value of "exe" would assign .exe as the extension to
any file selected from a mdm.Dialogs.BrowseFileUnicode.show() command. If no extension is specified, then the
extension returned will be the default extension of the file (as specified in the edit box of the dialog).
Notes
Unicode Compliant.
Example
Simple Usage:
mdm.Dialogs.BrowseFileUnicode.defaultExtension = ".exe";
6.9.1.2.2.4 Dialogs.BrowseFileUnicode.defaultFilename
Availability
Windows
Usage
mdm.Dialogs.BrowseFileUnicode.defaultFilename:Void
Parameters
None
Returns
Nothing
Description
Sets the default extension of a file to the value specified. For example, a value of "exe" would assign .exe as the extension to
any file selected from a mdm.Dialogs.BrowseFileUnicode.show() command. If no extension is specified, then the
extension returned will be the default extension of the file (as specified in the edit box of the dialog).
Notes
Unicode Compliant.
Example
mdm.Dialogs.BrowseFileUnicode.defaultFilename = ".exe";
6.9.1.2.2.5 Dialogs.BrowseFileUnicode.filterList
Availability
Windows
Usage
mdm.Dialogs.BrowseFileUnicode.filterList:Void
Parameters
None
Returns
Nothing
Description
Sets the filter(s) of the mdm.Dialogs.BrowseFile dialog to the specified value(s). Extensions are delimited by the pipe Character
"|", and multiple filters can be assigned also.
Notes
Unicode Compliant.
Example
Simple Usage:
Availability
Windows
Usage
mdm.Dialogs.BrowseFileUnicode.title:Void
Parameters
None
Returns
Nothing
Description
Notes
Unicode Compliant.
Example
Simple Usage:
6.9.1.3 Dialogs.BrowseFileToSave
Availability
mdm.Dialogs.BrowseFileToSave
Method Description
Displays a SAVE file Dialog instead of a BROWSE File
Dialogs.BrowseFileToSave.show()
Dialog.
6.9.1.3.1 Methods
6.9.1.3.1.1 Dialogs.BrowseFileToSave.show()
Availability
Mac OSX
Usage
mdm.Dialogs.BrowseFileToSave.show():String
Parameters
None
Returns
A String
Description
Allows the user to select any file from their system and returns the path and filename. This command displays a SAVE file
Dialog instead of a BROWSE file dialog, although it will not actually save any files.
Notes
Example
6.9.1.4 Dialogs.BrowseFolder
Availability
mdm.Dialogs.BrowseFolder
Method Description
Dialogs.BrowseFolder.show() Allows the user to select any folder from their system.
Property Description
Sets the initial default directory of the Browse Folder
Dialogs.BrowseFolder.defaultDirectory
Dialog.
Dialogs.BrowseFolder.title Sets the Title of the Browse Folder Dialog.
6.9.1.4.1 Methods
6.9.1.4.1.1 Dialogs.BrowseFolder.show()
Availability
Usage
mdm.Dialogs.BrowseFolder.show():String
Parameters
None
Returns
A String
Description
Allows the user to select any folder from their system and returns the path and folder name to the variable folder.
Notes
Unicode compliant.
Example
6.9.1.4.2 Properties
6.9.1.4.2.1 Dialogs.BrowseFolder.defaultDirectory
Availability
Usage
mdm.Dialogs.BrowseFolder.defaultDirectory:Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Dialogs.BrowseFolder.defaultDirectory = mdm.Application.path;
6.9.1.4.2.2 Dialogs.BrowseFolder.title
Availability
Usage
mdm.Dialogs.BrowseFolder.title:Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
6.9.2 Methods
Enter topic text here.
6.9.2.1 Dialogs.inputBox()
Availability
Windows
Usage
mdm.Dialogs.inputBox(caption:String, defaultText:String):String
Parameters
Returns
A String
Description
Executes an Input Box Dialog, which allows the user to type a string.
Notes
None
Example
6.9.2.2 Dialogs.prompt()
Availability
Usage
mdm.Dialogs.prompt(message:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Dialogs.prompt("Zinc Rocks!")
6.9.2.3 Dialogs.promptUnicode()
Availability
Windows
Usage
mdm.Dialogs.promptUnicode(message:String):Void
Parameters
Returns
Nothing
Description
Notes
Unicode Compliant.
Example
mdm.Dialogs.promptUnicode("Zinc Rocks!")
6.9.2.4 Dialogs.promptAdv()
Availability
Usage
mdm.Dialogs.promptAdv(message:String, promptStyle:String):Boolean
Parameters
Returns
A Boolean
Description
Executes an advanced Prompt Dialog displaying the custom message. Prompt style can be set by using the following
expressions:
alert
info
confirm
error
empty
Notes
A "true" statement is returned if the user clicks OK, and "false" if the user clicks CANCEL.
Example
6.9.2.5 Dialogs.promptAdvUnicode()
Availability
Windows
Usage
mdm.Dialogs.promptAdvUnicode(message:String, promptStyle:String):Boolean
Parameters
Returns
A Boolean
Description
Executes an advanced Prompt Dialog displaying the custom message. Prompt style can be set by using the following
expressions:
alert
info
confirm
error
empty
Notes
A "true" statement is returned if the user clicks OK, and "false" if the user clicks CANCEL. Unicode Compliant.
Example
6.9.2.6 Dialogs.promptModal()
Availability
Usage
Parameters
Returns
A Boolean
Description
Executes a Modal Prompt Dialog with the specified parameters. The Prompt Type can be:
yesno
okcancel
abortignore
alert
error
info
confirm
empty
Notes
The value returned will be either "true" or "false". For example, if a "yesno" Prompt Type is selected, the value "true" will be
returned if the "yes" button was pressed or "false" if the "no" button was pressed.
Example
6.9.2.7 Dialogs.promptModalUnicode()
Availability
Windows
Usage
mdm.Dialogs.promptModalUnicode(message:String, promptType:String,
promptStyle:String):Boolean
Parameters
Returns
A Boolean
Description
Executes a Modal Prompt Dialog with the specified parameters. The Prompt Type can be:
yesno
okcancel
abortignore
alert
error
info
confirm
empty
Notes
The value returned will be either "true" or "false". For example, if a "yesno" Prompt Type is selected, the value "true" will be
returned if the "yes" button was pressed or "false" if the "no" button was pressed. Unicode Compliant.
Example
6.10 mdm.DLL
Availability
mdm.DLL
Constructor Description
Creates a new DLL Instance and loads the DLL Library
mdm.DLL()
specified.
Method Description
This command will add a parameter to the parameter list
DLL.addParameter()
for the specific DLL.
DLL.call() This command will call a procedure or function by name
This command will clear the parameter list for the specific
DLL.clear()
DLL.
DLL.close() This command will attempt to unload the DLL.
6.10.1 Constructor
6.10.1.1 mdm.DLL()
Availability
Windows
Constructor
mdm.DLL(dll:String):Boolean
Parameters
Returns
A Boolean
Description
Creates a new DLL Instance and loads the DLL Library specified.
Notes
None
Example
6.10.2 Methods
6.10.2.1 DLL.addParameter()
Availability
Windows
Usage
dllInstance.addParameter(parameterType:String, parameterValue:String):Number
Parameters
Returns
A Number
Description
This command will add a parameter to the parameter list for the specific DLL. The parameters should be entered in the order
listed in the DLL documentation. For example, enter the first parameter first, and then the second and so on. The result will
respond with the index of the parameter that has just been entered starting at 0. For example, the first parameter you submit
will return the result 0.
Notes
If you enter a parameter to the list but the response of this command was other than the correct index, you must reset your
parameter list with mdm.DLL.clear().
string
integer
boolean
unsigned char
unsigned char*
signed char
signed char*
unsigned short
unsigned short*
signed short
signed short*
unsigned long
unsigned long*
signed long
signed long*
float
float*
wchar*
Example
6.10.2.2 DLL.call()
Availability
Windows
Usage
dllInstance.call(returnType:String, procedureName:String)
Parameters
Returns
Description
This command will call a procedure or function by name (procedureName) in the specified DLL. If the returnType is other than
"none" then it will return the DLL function return value to the specified result variable.
Notes
Any parameters that need to be supplied with this function or procedure MUST first be declared by using
mdm.DLL.addParameter()
none
string
integer
boolean
unsigned char
unsigned char*
signed char
signed char*
unsigned short
unsigned short*
signed short
signed short*
unsigned long
unsigned long*
signed long
signed long*
float
float*
wchar*
Example
myDLL.call("string", "myProcedure");
6.10.2.3 DLL.clear()
Availability
Windows
Usage
dllInstance.clear():Void
Parameters
None
Returns
Nothing
Description
This command will clear the parameter list for the specified instance.
Notes
This must always be used when you want to call a different function or procedure in the DLL as it clears any parameters
previously loaded.
Example
myDLL.clear();
6.10.2.4 DLL.close()
Availability
Windows
Usage
dllInstance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myDLL.close();
6.11 mdm.Encryption
Availability
mdm.Encryption
Method Description
Encryption.decryptFile() Decrypts a previously encrypted File.
Encryption.decryptString() Decrypts a previously encrypted String
6.11.1 Methods
6.11.1.1 Encryption.decryptFile()
Availability
Usage
Parameters
Returns
Nothing
Description
Decrypts the inputFile using the variable key. The decrypted file is generated to the path and filename specified in outputFile.
Notes
Windows Uses 448bit Blowfish encryption. Mac OSX Uses 128bit AES encryption. An encrypted file on Windows cannot be
decrypted on a Mac and visa versa.
Example
6.11.1.2 Encryption.decryptString()
Availability
Usage
mdm.Encryption.decryptString(key:String, dataToDecrypt:String):String
Parameters
Returns
Decrypted text
Description
Decrypts the content of the variable dataToDecrypt using the key provided.
Notes
Windows Uses 448bit Blowfish encryption. Mac OSX Uses 128bit AES encryption. An encrypted file on Windows cannot be
decrypted on a Mac and visa versa.
Example
6.11.1.3 Encryption.encryptFile()
Availability
Usage
Parameters
Returns
Nothing
Description
Encrypts the inputFile using the variable key. The encrypted file is generated to the path and filename specified in outputFile.
Notes
Windows Uses 448bit Blowfish encryption. Mac OSX Uses 128bit AES encryption. An encrypted file on Windows cannot be
decrypted on a Mac and visa versa.
Example
6.11.1.4 Encryption.encryptString()
Availability
Usage
mdm.Encryption.encryptString(key:String, dataToEncrypt:String):String
Parameters
Returns
A String
Description
Encrypts the content of the variable dataToEncrypt using the key provided.
Notes
Windows Uses 448bit Blowfish encryption. Mac OSX Uses 128bit AES encryption. An encrypted file on Windows cannot be
decrypted on a Mac and visa versa.
Example
6.12 mdm.Exception
Availability
mdm.Exception
Object Description
DebugWindow DebugWindow Object
Method Description
Exception.disableHandler() Disables internal exception handling.
Exception.enableHandler() Enables the internal exception handler.
6.12.1 Objects
6.12.1.1 Exception.DebugWindow
Availability
mdm.Exception.DebugWindow
Method Description
Exception.DebugWindow.hide() Hides the runtime debugging window.
Exception.DebugWindow.show() Enables runtime debugging window.
6.12.1.1.1 Methods
6.12.1.1.1.1 Exception.DebugWindow.hide()
Availability
Windows
Usage
mdm.Exception.DebugWindow.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Exception.DebugWindow.hide()
6.12.1.1.1.2 Exception.DebugWindow.show()
Availability
Windows
Usage
mdm.Exception.DebugWindow.show():Void
Parameters
None
Returns
Nothing
Description
Enables runtime debugging window. The Debug window can be used by developers to stop and play the application and debug
syntax errors.
Notes
None
Example
mdm.Exception.DebugWindow.show()
6.12.1.1.1.3 Exception.DebugWindow.trace()
Availability
Windows
Usage
mdm.Exception.DebugWindow.trace(trace:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Exception.DebugWindow.trace(myVar)
6.12.2 Methods
6.12.2.1 Exception.disableHandler()
Availability
Windows
Usage
mdm.Exception.disableHandler():Void
Parameters
None
Returns
Nothing
Description
Disables internal exception handling and returns control of errors to the projector.
Notes
None
Example
mdm.Exception.disableHandler();
6.12.2.2 Exception.enableHandler()
Availability
Windows
Usage
mdm.Exception.enableHandler():Void
Parameters
None
Returns
Nothing
Description
Enables the internal exception handler. When this option is enabled, the application will not show any error messages but will
set a number of variables in the flash movie with error information. This method should be used by advanced developers who
wish to catch errors and deal with them inside their application without prompting the end user.
The variables set inside the movie when an exception occurs are:
mdm_exception - If an error occurs, the value of this variable will be set to "error"
The rest of the variables will contain specific error information if an error occurs:
mdm_exceptionmessage
mdm_exceptionformtype
mdm_exceptionframenum
mdm_exceptionparamnumber
mdm_exceptionparamvalue
Notes
a) After you have dealt with an exception, you must reset the exception handler by executing the
mdm.Exception.resetHandler() method.
b) This command must be called before the event onMDMScriptException will work.
Example
mdm.Exception.enableHandler();
6.12.2.3 Exception.resetHandler()
Availability
Windows
Usage
mdm.Exception.resetHandler():Void
Parameters
None
Returns
Nothing
Description
Resets the internal exception handler to a clear status. This method must be executed after an error has been reported and
dealt with.
Notes
None
Example
mdm.Exception.resetHandler();
6.12.2.4 Exception.showErrors()
Availability
Windows
Usage
mdm.Exception.showErrors():Void
Parameters
None
Returns
Nothing
Description
Enables error window. The error window will only report syntax errors related to {mdm}script execution.
Notes
None
Example
mdm.Exception.showErrors();
6.12.2.5 Exception.trapErrors()
Availability
Windows
Usage
mdm.Exception.trapErrors():Void
Parameters
None
Returns
Nothing
Description
Disables the error window. The application will not prompt the user on {mdm}script errors.
Notes
None
Example
mdm.Exception.trapErrors();
6.13 mdm.FileExplorer
Availability
mdm.FileExplorer
Object Description
ComboBox ComboBox Object
ListView ListView Object
Method Description
FileExplorer.init() Initializes the FileExplorer components.
Method Description
Executes when a user double clicks an entry in the
onFileListViewDblClick
ListView.
6.13.1 Objects
6.13.1.1 FileExplorer.ComboBox
Availability
mdm.FileExplorer.ComboBox
Method Description
FileExplorer.ComboBox.getPath() Returns the current path/root of the control.
FileExplorer.ComboBox.hide() Hides the loaded control.
6.13.1.1.1 Methods
6.13.1.1.1.1 FileExplorer.ComboBox.getPath()
Availability
Windows
Usage
mdm.FileExplorer.ComboBox.getPath():String
Parameters
None
Returns
A String
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
6.13.1.1.1.2 FileExplorer.ComboBox.hide()
Availability
Windows
Usage
mdm.FileExplorer.ComboBox.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.ComboBox.hide();
6.13.1.1.1.3 FileExplorer.ComboBox.setPath()
Availability
Windows
Usage
mdm.FileExplorer.ComboBox.setPath(basePath:String):Void
Parameters
Returns
Nothing
Description
Changes the root of the loaded control to the specified value or one of the system folder values below:
desktop
cpanel
favorites
network
recyclebin
commondesktop
commonprograms
commonstartmenu
commonstartup
fonts
internet
personal
printers
printhood
programs
recent
sendto
startmenu
templates
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.ComboBox.setPath("c:\\");
6.13.1.1.1.4 FileExplorer.ComboBox.show()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Loads a ComboBox control at the specified position/size and sets the root to the specified path or a predefined location. The
basePath parameter can be either a pathname such as "c:\\" , "c:\\myfiles\\" etc. OR one of the following strings which will set
the root to show a system folder:
desktop
cpanel
favorites
network
recyclebin
commondesktop
commonprograms
commonstartmenu
commonstartup
fonts
internet
personal
printers
printhood
programs
recent
sendto
startmenu
templates
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
6.13.1.2 FileExplorer.ListView
Availability
mdm.FileExplorer.ListView
Method Description
FileExplorer.ListView.dblClickExecute Automatically catch a double click in the File List
s() component.
FileExplorer.ListView.getItems() Returns an array which contains all items in the control.
6.13.1.2.1 Methods
6.13.1.2.1.1 FileExplorer.ListView.dblClickExecutes()
Availability
Windows
Usage
mdm.FileExplorer.ListView.dblClickExecutes(flag:Boolean):Void
Parameters
flag:Boolean
Returns
Nothing
Description
When enabled, will enable the event onFileListViewDbdClick and automatically catch a double click in the File List
component.
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.ListView.dblClickExecutes(true);
6.13.1.2.1.2 FileExplorer.ListView.getItems()
Availability
Windows
Usage
mdm.FileExplorer.TreeView.getItems():Array
Parameters
None
Returns
An Array
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
6.13.1.2.1.3 FileExplorer.ListView.getSelected()
Availability
Windows
Usage
mdm.FileExplorer.ListView.getSelected():String
Parameters
None
Returns
A String
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
Availability
Windows
Usage
mdm.FileExplorer.ListView.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.ListView.hide();
6.13.1.2.1.5 FileExplorer.ListView.hideHiddenFiles()
Availability
Windows
Usage
mdm.FileExplorer.ListView.hideHiddenFiles():Void
Parameters
None
Returns
Nothing
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.ListView.hideHiddenFiles();
6.13.1.2.1.6 FileExplorer.ListView.showHiddenFiles()
Availability
Windows
Usage
mdm.FileExplorer.ListView.showHiddenFiles():Void
Parameters
None
Returns
Nothing
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.ListView.showHiddenFiles();
6.13.1.2.1.7 FileExplorer.ListView.setViewStyle()
Availability
Windows
Usage
mdm.FileExplorer.ListView.setViewStyle(viewType:String):Void
Parameters
Returns
Nothing
Description
Changes the listing method style in the ListView control. The parameter viewType can be either:
icon
smallicon
list
report
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.ListView.setViewStyle("icon");
6.13.1.2.1.8 FileExplorer.ListView.show()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Loads a ListView control at the specified position/size and sets the root to the specified path or a predefined location. The
basePath parameter can be either a pathname such as "c:\\" , "c:\\myfiles\\" etc. OR one of the following strings which will set
the root to show a system folder:
desktop
cpanel
favorites
network
recyclebin
commondesktop
commonprograms
commonstartmenu
commonstartup
fonts
internet
personal
printers
printhood
programs
recent
sendto
startmenu
templates
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
6.13.1.3 FileExplorer.TreeView
Availability
mdm.FileExplorer.TreeView
Method Description
FileExplorer.TreeView.getSelected() Returns the selected item of the control.
FileExplorer.TreeView.hideHiddenFiles
Hides hidden files in the control.
()
Changes the root of the loaded control to the specified
FileExplorer.TreeView.setPath()
value.
FileExplorer.TreeView.show() Loads the Control Instance.
FileExplorer.TreeView.showHiddenFiles
Shows hidden files in the control.
()
6.13.1.3.1 Methods
6.13.1.3.1.1 FileExplorer.TreeView.getSelected()
Availability
Windows
Usage
mdm.FileExplorer.TreeView.getSelected():String
Parameters
None
Returns
A String
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
Availability
Windows
Usage
mdm.FileExplorer.TreeView.getPath():String
Parameters
None
Returns
A String
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
Availability
Windows
Usage
mdm.FileExplorer.TreeView.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.TreeView.hide();
6.13.1.3.1.4 FileExplorer.TreeView.hideHiddenFiles()
Availability
Windows
Usage
mdm.FileExplorer.TreeView.hideHiddenFiles():Void
Parameters
None
Returns
Nothing
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.TreeView.hideHiddenFiles();
6.13.1.3.1.5 FileExplorer.TreeView.setPath()
Availability
Windows
Usage
mdm.FileExplorer.TreeView.setPath(basePath:String):Void
Parameters
Returns
Nothing
Description
Changes the root of the loaded control to the specified value or one of the system folder values below:
desktop
cpanel
favorites
network
recyclebin
commondesktop
commonprograms
commonstartmenu
commonstartup
fonts
internet
personal
printers
printhood
programs
recent
sendto
startmenu
templates
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.TreeView.setPath("c:\\");
6.13.1.3.1.6 FileExplorer.TreeView.show()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Loads a TreeView control at the specified position/size and sets the root to the specified path or a predefined location. The
basePath parameter can be either a pathname such as "c:\\" , "c:\\myfiles\\" etc. OR one of the following strings which will set
the root to show a system folder:
desktop
cpanel
favorites
network
recyclebin
commondesktop
commonprograms
commonstartmenu
commonstartup
fonts
internet
personal
printers
printhood
programs
recent
sendto
startmenu
templates
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
Availability
Windows
Usage
mdm.FileExplorer.TreeView.showHiddenFiles():Void
Parameters
None
Returns
Nothing
Description
Notes
a) Unlike the other embedding commands, the File Explorer controls are single instance only.
b) The ComboBox, ListBox and TreeView controls are inter-related. This means that if you change the root location on one
control, the other two controls will also reflect the change.
c) The mdm.FileExplorer.init() must be executed once before using any File Explorer objects method.
Example
mdm.FileExplorer.TreeView.showHiddenFiles();
6.13.2 Methods
6.13.2.1 FileExplorer.init()
Availability
Windows
Usage
mdm.FileExplorer.init():Void
Parameters
None
Returns
Nothing
Description
Notes
This command must be executed once before using any other FileExplorer objects methods.
Example
mdm.FileExplorer.init();
6.13.3 Events
6.13.3.1 onFileListViewDblClick
Availability
Windows
Usage
mdm.FileExplorer.onFileListViewDblClick:Function
Parameters
Description
Executes when a user double clicks an entry in the FileExplorer ListView control.
Example
Simple Usage:
Advanced Usage:
mdm.FileExplorer.onFileListViewDblClick = function(myObject){
mdm.Dialogs.Prompt(myObject.type)
mdm.Dialogs.Prompt(myObject.name)
mdm.Dialogs.Prompt(myObject.association)
}
6.14 mdm.FileSystem
Availability
mdm.FileSystem
Object Description
Method Description
FileSystem.appendFile() Appends data to a File.
FileSystem.appendFileUnicode() Appends data to a File. Unicode Compliant.
6.14.1 Objects
6.14.1.1 FileSystem.BinaryFile
Availability
mdm.FileSystem.BinaryFile
Method Description
FileSystem.BinaryFile.appendData() Appends the data specified.
FileSystem.BinaryFile.setData() Saves the specified data to the filename provided.
6.14.1.1.1 FileSystem.BinaryFile.appendData()
Availability
Windows
Usage
mdm.BinaryFile.appendData(filePath:String):Void
Parameters
Returns
Nothing
Description
Appends the data specified in the command mdm.FileSystem.BinaryFile.setData() to the file specified in
filePath.
Notes
None
Example
mdm.BinaryFile.appendData("c:\\myData.txt");
6.14.1.1.2 FileSystem.BinaryFile.setData()
Availability
Windows
Usage
mdm.BinaryFile.setData(dataToAppend:String):Void
Parameters
Returns
Nothing
Description
Saves the specified data to the filename provided with the mdm.FileSystem.BinaryFile.writeData() method.
Notes
None
Example
Hex Example:
mdm.BinaryFile.setData("FF0067EA349F");
mdm.BinaryFile.setData("255|0|103|234|52|159");
6.14.1.1.3 FileSystem.BinaryFile.writeData()
Availability
Windows
Usage
mdm.BinaryFile.writeData(filePath:String):Void
Parameters
Returns
Nothing
Description
Writes the data specified in the command mdm.FileSystem.BinaryFile.setData() to the file specified in filePath.
Notes
None
Example
mdm.BinaryFile.writeData("c:\\myData.txt");
6.14.2 Methods
6.14.2.1 FileSystem.appendFile()
Availability
Usage
mdm.FileSystem.appendFile(filePath:String, dataToAdd:String):Void
Parameters
Returns
Nothing
Description
Appends text data to a file. Combinations of literals and variables can be used and any type of file can be created. Please note
that this command does not overwrite the existing data, it will append data to the file.
Notes
None
Example
6.14.2.2 FileSystem.appendFileUnicode()
Availability
Windows
Usage
mdm.FileSystem.appendFileUnicode(filePath:String, dataToAdd:String):Void
Parameters
Returns
Nothing
Description
Appends the value of dataToAdd to the file specified in filePath. Combinations of literals and variables can be used and any
type of file can be created. Please note that this command does not overwrite the existing data, it will append data to the file.
Notes
Unicode compliant
Example
6.14.2.3 FileSystem.copyFile()
Availability
Usage
mdm.FileSystem.copyFile(copyFrom:String, copyTo:String):Void
Parameters
Returns
Nothing
Description
Creates a copy of the file specified in copyFrom to the path and filename specified in .
Notes
None
Example
mdm.FileSystem.copyFile("c:\\myData.txt", "c:\\myDataCopy.txt");
6.14.2.4 FileSystem.copyFileUnicode()
Availability
Windows
Usage
mdm.FileSystem.copyFileUnicode(copyFrom:String, copyTo:String):Void
Parameters
Returns
Nothing
Description
Creates a copy of the file specified in copyFrom to the path and filename specified in .
Notes
Unicode compliant
Example
mdm.FileSystem.copyFileUnicode("c:\\myData.txt", "c:\\myDataCopy.txt");
6.14.2.5 FileSystem.copyFolder()
Availability
Usage
mdm.FileSystem.copyFolder(copyFrom:String, copyTo:String):Void
Parameters
Returns
Nothing
Description
Creates a copy of the folder specified in copyFrom to the path and folder name specified in copyTo.
Notes
None
Example
mdm.FileSystem.copyFolder("c:\\myFolderA", "c:\\myFolderB");
6.14.2.6 FileSystem.createShortcut()
Availability
Windows
Usage
mdm.FileSystem.createShortcut(targetPath:String, startInFolder:String,
description:String, iconFilePath:String, iconID:Number, shorcutLinkPath:String)
:Void
Parameters
Returns
Nothing
Description
Creates a shortcut from the parameters provided. Please note that the icon variable can be a link to an .ICO file, .EXE or .DLL
that contains icon Files. iconID is the number of the resource within the dll or exe file. For example, the value 0 will use the first
resource contained.
Notes
Windows 98 Users MUST switch the icon and iconID values around so that iconID comes BEFORE icon. Also, iconID must be
left at "0".
Example
mdm.FileSystem.createShortcut("c:\\myFile.exe","c:\\","My
Projector","c:\\myFile.exe","0","c:\\myFile.lnk");
6.14.2.7 FileSystem.deleteFile()
Availability
Usage
mdm.FileSystem.deleteFile(pathToFile:String):Void
Parameters
Returns
Nothing
Description
Deletes a file.
Notes
None
Example
mdm.FileSystem.deleteFile("c:\\myTextA.txt");
6.14.2.8 FileSystem.deleteFileUnicode()
Availability
Windows
Usage
mdm.FileSystem.deleteFileUnicode(pathToFile:String):Void
Parameters
Returns
Nothing
Description
Delete the file specified in the variable file or as specified in the literal string.
Notes
Unicode compliant
Example
mdm.FileSystem.deleteFileUnicode("c:\\myTextA.txt");
6.14.2.9 FileSystem.deleteFolder()
Availability
Usage
mdm.FileSystem.deleteFolder(dir:String, prompt:String):Void
Parameters
Returns
Nothing
Description
Deletes a Folder. The Parameter prompt must be either "ask" to prompt the user before a delete, or "noask" to delete without
prompting.
Notes
None
Example
mdm.FileSystem.deleteFolder("c:\\myFolder","ask");
6.14.2.10 FileSystem.deleteFolderUnicode()
Availability
Windows
Usage
mdm.FileSystem.deleteFolderUnicode(dir:String):Void
Parameters
Returns
Nothing
Description
Deletes a Folder. Unlike the Non Unicode version, this command does not have the option of displaying a Warning Prompt.
Notes
Unicode Compliant.
Example
mdm.FileSystem.deleteFolderUnicode("c:\\myFolder");
6.14.2.11 FileSystem.fileExists()
Availability
Usage
mdm.FileSystem.fileExists(filePath:String):Boolean
Parameters
Returns
Description
Returns a true or false statement to the variable return based upon the existence of file.
Notes
None
Example
6.14.2.12 FileSystem.fileExistsUnicode()
Availability
Windows
Usage
mdm.FileSystem.fileExistsUnicode(filePath:String):Boolean
Parameters
Returns
Description
Returns a true or false statement to the variable return based upon the existence of file.
Notes
Unicode compliant
Example
6.14.2.13 FileSystem.findFile()
Availability
Windows
Usage
mdm.FileSystem.findFile(searchCriteria:String):String
Parameters
searchCriteria:String Criteria to be matched make with folder path and extension filter.
Returns
A String
Description
Returns a colon (';') seperated list of files in the specified folder and subdirectories which has the specified extension
Notes
This command can potentially return huge strings. (eg. "C:\*.*") so please be sure to specify as much file and directory
information as possible.
Example
6.14.2.14 FileSystem.folderExists()
Availability
Usage
mdm.FileSystem.folderExists(folder:String):Boolean
Parameters
Returns
A Boolean
Description
Notes
None
Example
6.14.2.15 FileSystem.folderExistsUnicode()
Availability
Windows
Usage
mdm.FileSystem.folderExistsUnicode(folder:String):Boolean
Parameters
Returns
A Boolean
Description
Returns a true or false statement to the variable return based upon the existence of the folder in the variable folder.
Notes
Unicode compliant
Example
6.14.2.16 FileSystem.getAssociation()
Availability
Usage
mdm.FileSystem.getAssociation(extension:String):String
Parameters
Returns
A String
Description
Returns the full path to the system associated executable for loading the specified extension. Great for finding executable
paths. For example. ".html" will return something similar to: C:\Program Files\Internet Explorer\iexplore.exe.
Notes
On Mac OSX, you must specify the full path to a file, and not just the file extension.
Example
6.14.2.17 FileSystem.getCurrentDir()
Availability
Usage
mdm.FileSystem.getCurrentDir():String
Parameters
None
Returns
A String
Description
Notes
None
Example
6.14.2.18 FileSystem.getCurrentDirUnicode()
Availability
Windows
Usage
mdm.FileSystem.getCurrentDirUnicode():String
Parameters
None
Returns
A String
Description
Notes
Unicode Complaint.
Example
6.14.2.19 FileSystem.getFileAttribs()
Availability
Windows
Usage
mdm.FileSystem.getFileAttribs(filePath:String):Array
Parameters
Returns
An Array
Description
Notes
None
Example
// myFileAttribs[0] = isArchive
// myFileAttribs[1] = isHidden
// myFileAttribs[2] = isReadOnly
// myFileAttribs[3] = isSystemFile
6.14.2.20 FileSystem.getFileCreator()
Availability
Mac OSX
Usage
mdm.FileSystem.getFileCreator(filename:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.14.2.21 FileSystem.getFileDate()
Availability
Windows
Usage
mdm.FileSystem.getFileDate(pathToFile:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.14.2.22 FileSystem.getFileSize()
Availability
Windows
Usage
mdm.FileSystem.getFileSize(pathToFile:String):Number
Parameters
Returns
An Integer
Description
Notes
None
Example
6.14.2.23 FileSystem.getFileTime()
Availability
Windows
Usage
mdm.FileSystem.getFileTime(pathToFile:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.14.2.24 FileSystem.getFileType()
Availability
Mac OSX
Usage
mdm.FileSystem.getFileType(filename:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.14.2.25 FileSystem.getFileList()
Availability
Usage
mdm.FileSystem.getFileList(folderPath:String, searchMask:String):Array
Parameters
Returns
An Array
Description
Will perform a search in the folder specified and return an array of files.
Notes
On Mac OSX, the searchMask parameter is ignored, but it must still be added as "" or "*.*"
Example
6.14.2.26 FileSystem.getFolderList()
Availability
Usage
mdm.FileSystem.getFolderList(folderPath:String):Array
Parameters
Returns
An Array
Description
Notes
None
Example
6.14.2.27 FileSystem.getFolderSize()
Availability
Windows
Usage
mdm.FileSystem.getFolderSize(folderPath:String):Number
Parameters
Returns
An Integer
Description
Notes
None
Example
6.14.2.28 FileSystem.getLongPathName()
Availability
Windows
Usage
mdm.FileSystem.getLongPathName(path:String):String
Parameters
Returns
A String
Description
Converts the string to a non 8.3 pathname. ie. c:\documents and settings\temp.
Notes
None
Example
6.14.2.29 FileSystem.getShortPathName()
Availability
Windows
Usage
mdm.FileSystem.getShortPathName(path:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.14.2.30 FileSystem.loadFile()
Availability
Usage
mdm.FileSystem.loadFile(filePath:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.14.2.31 FileSystem.loadFileHEX()
Availability
Windows
Usage
mdm.FileSystem.loadFileHEX(filePath:String):String
Parameters
Returns
A String
Description
Load HEX or a Pipe delimited Decimal string from the specified file.
Notes
None
Example
6.14.2.32 FileSystem.loadFileUnicode()
Availability
Usage
mdm.FileSystem.loadFileUnicode(filePath:String):String
Parameters
Returns
A String
Description
Notes
Unicode compliant
Example
6.14.2.33 FileSystem.makeFolder()
Availability
Usage
mdm.FileSystem.makeFolder(folderPath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.FileSystem.makeFolder("c:\\myFolder");
6.14.2.34 FileSystem.makeFolderUnicode()
Availability
Windows
Usage
mdm.FileSystem.makeFolderUnicode(folderPath:String):Void
Parameters
Returns
Nothing
Description
Notes
Unicode compliant
Example
mdm.FileSystem.makeFolderUnicode("c:\\myFolder");
6.14.2.35 FileSystem.nativePathToUnixPath()
Availability
Mac OSX
Usage
mdm.FileSystem.nativePathToUnixPath(nativePath:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.14.2.36 FileSystem.saveFile()
Availability
Usage
mdm.FileSystem.saveFile(filePath:String, dataToSave:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
6.14.2.37 FileSystem.saveFileHEX()
Availability
Windows
Usage
mdm.FileSystem.saveFileHEX(filePath:String, dataToSave:String):Void
Parameters
dataToSave:String Data to save to a file in HEX format or a pipe delimited list of bytes(decimal).
Returns
Nothing
Description
Notes
None
Example
Hex Data:
mdm.FileSystem.saveFileHEX("c:\\myText.txt", "FF0067EA349F");
mdm.FileSystem.saveFileHEX("c:\\myText.txt", "255|0|103|234|52|159");
6.14.2.38 FileSystem.saveFileUnicode()
Availability
Usage
mdm.FileSystem.saveFileUnicode(filePath:String, dataToSave:String):Void
Parameters
Returns
Nothing
Description
Notes
Unicode compliant
Example
6.14.2.39 FileSystem.setCurrentDir()
Availability
Windows
Usage
mdm.FileSystem.setCurrentDir(newPath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.FileSystem.setCurrentDir("c:\\");
6.14.2.40 FileSystem.setCurrentDirUnicode()
Availability
Windows
Usage
mdm.FileSystem.setCurrentDirUnicode(newPath:String):Void
Parameters
Returns
Nothing
Description
Notes
Unicode Compliant.
Example
mdm.FileSystem.setCurrentDirUnicode("c:\\");
6.14.2.41 FileSystem.setFileAttribs()
Availability
Windows
Usage
mdm.FileSystem.setFileAttribs(filePath:String, attribute:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.FileSystem.setFileAttribs("c:\\myText.txt", "+A");
6.15 mdm.Flash
Availability
mdm.Flash
Method Description
Flash.allowScale() Sets the scale of the SWF during runtime
Flash.baseURL() Sets the Base URL of the SWF file in projector.
6.15.1 Methods
6.15.1.1 Flash.allowScale()
Availability
Windows
Usage
mdm.Flash.allowScale(scaleContent:Boolean, keepAspectRatio:Boolean):Void
Parameters
Returns
Nothing
Description
Sets the scale of the SWF during runtime. A true value in scaleContent will instruct the SWF to scale up to the edges of the
Projector Window. A true value in keepAspectRatio will instruct the SWF to maintain it's aspect ratio.
Notes
None
Example
mdm.Flash.allowScale(true, true);
6.15.1.2 Flash.baseURL()
Availability
Windows
Usage
mdm.Flash.baseURL(baseURLPath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Flash.baseURL("c:\\myFolder");
6.15.1.3 Flash.callFunction()
Availability
Usage
mdm.Flash.callFunction(functionName:String, parametersString:String,
delimiter:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
6.15.1.4 Flash.callFunctionUnicode()
Availability
Windows
Usage
mdm.Flash.callFunctionUnicode(functionName:String, parametersString:String,
delimiter:String):Void
Parameters
Returns
Nothing
Description
Notes
Unicode compliant
Example
6.15.1.5 Flash.getVar()
Availability
Windows
Usage
mdm.Flash.getVar(variableName:String):String
Parameters
Returns
A String
Description
Notes
Example
Simple Usage:
6.15.1.6 Flash.getVarUnicode()
Availability
Windows
Usage
mdm.Flash.getVarUnicode(variableName:String):String
Parameters
Returns
A String
Description
Notes
Unicode compliant
Example
Simple Usage:
6.15.1.7 Flash.loadMovie()
Availability
Windows
Usage
mdm.Flash.loadMovie(targetLevel:Number, moviePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Flash.loadMovie(1, "c:\\myMovie.swf");
6.15.1.8 Flash.setShowAllMode()
Availability
Windows
Usage
mdm.Flash.setShowAllMode():Void
Parameters
None
Returns
Nothing
Description
Expands flash movie to cover the entire spread of the projector window.
Notes
The correct way to use this command is to add it to the first frame of your Movie with your Projector set to "Maximized" - All
other Scale options should be left at default values.
Example
mdm.Flash.setShowAllMode();
6.15.1.9 Flash.setSWFDir()
Availability
Windows
Usage
mdm.Flash.setSWFDir():Void
Parameters
None
Returns
Nothing
Description
Notes
Example
mdm.Flash.setSWFDir();
6.15.1.10 Flash.setSWFDirAdv()
Availability
Windows
Usage
mdm.Flash.setSWFDirAdv(swfDirectory:String):Void
Parameters
Returns
Nothing
Description
Sets the virtual SWF directory to the specified folder. Useful when you wish to install certain files on the users HD and run the
main application from a CD-Rom.
Notes
None
Example
mdm.Flash.setSWFDirAdv("c:\\myFolder");
6.15.1.11 Flash.setVar()
Availability
Usage
mdm.Flash.setVar(variableName:String, variableValue:String):Void
Parameters
Returns
Nothing
Description
Sets or creates a variable in the main timeline (_root) of the SWF to the specified value.
Notes
Example
Simple Usage:
mdm.Flash.setVar("myVariable", "myName");
mdm.Flash.setVar("myVariable", "SubForm1:myName");
6.15.1.12 Flash.setVarUnicode()
Availability
Windows
Usage
mdm.Flash.setVarUnicode(variableName:String, variableValue:String):Void
Parameters
Returns
Nothing
Description
Sets or creates a variable in the main timeline (_root) of the SWF to the specified value.
Notes
Unicode compliant
Example
Simple Usage:
mdm.Flash.setVarUnicode("myVariable", "myName");
mdm.Flash.setVarUnicode("myVariable", "SubForm1:myName");
6.16 mdm.Forms
Availability
mdm.Forms
Method Description
Forms.addMask() Applies a transparency sub-mask to the projector.
Forms.callFunction() Executes a function in the specified form.
Property Description
Forms.alpha Will set the Alpha level of the Specified Form.
Forms.baseURL Will set the Base URL of the specified Form.
6.16.1 Methods
6.16.1.1 Forms.addMask()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Applies a transparency sub-mask to the projector based upon a BMP image. Can only be applied after applying the
mdm.Forms.showMask() method.
Notes
None
Example
6.16.1.2 Forms.callFunction()
Availability
Windows
Usage
mdm.Forms.formName.callFunction(functionName:String, parametersString:String,
delimiter:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
6.16.1.3 Forms.callFunctionUnicode()
Availability
Windows
Usage
mdm.Forms.formName.callFunctionUnicode(functionName:String,
parametersString:String, delimiter:String):Void
Parameters
Returns
Nothing
Description
Notes
Unicode compliant
Example
6.16.1.4 Forms.constraints()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Sets maximum and minimum values that the specified form can be resized to.
Notes
Please note that forms can still be maximized with the mdm.Forms.maximize() method.
Example
6.16.1.5 Forms.dndDisable()
Availability
Usage
mdm.Forms.formName.dndDisable():Void
Parameters
None
Returns
Nothing
Description
Disables Drag and Drop functionality for retrieving file paths and names.
Notes
None
Example
mdm.Forms.MainForm.dndDisable();
6.16.1.6 Forms.dndEnable()
Availability
Usage
mdm.Forms.formName.dndEnable():Void
Parameters
None
Returns
Nothing
Description
Enables Drag and Drop functionality for retrieving file paths and names. Once activated, you can drag any file onto your
projector, and the path and filename will be sent to the event function.
Notes
Example
mdm.Forms.MainForm.dndEnable();
6.16.1.7 Forms.goToFrame()
Availability
Usage
mdm.Forms.formName.goToFrame(frameNumber:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.goToFrame(10);
6.16.1.8 Forms.goToLabel()
Availability
Usage
mdm.Forms.formName.goToLabel(frameLabel:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.goToLabel("intro");
6.16.1.9 Forms.hide()
Availability
Usage
mdm.Forms.formName.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.hide();
6.16.1.10 Forms.hideMask()
Availability
Windows
Usage
mdm.Forms.formName.hideMask():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.hideMask();
6.16.1.11 Forms.hideCaption()
Availability
Windows
Usage
mdm.Forms.formName.hideCaption(flag:Boolean):Void
Parameters
Returns
Nothing
Description
Notes
Example
mdm.Forms.MainForm.hideCaption(true);
6.16.1.12 Forms.hideStatusBar()
Availability
Windows
Usage
mdm.Forms.formName.hideStatusBar():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.hideStatusBar()
6.16.1.13 Forms.maximize()
Availability
Usage
mdm.Forms.formName.maximize():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.maximize();
6.16.1.14 Forms.minimize()
Availability
Usage
mdm.Forms.formName.minimize():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.minimize();
6.16.1.15 Forms.restore()
Availability
Windows
Usage
mdm.Forms.formName.restore():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.restore();
6.16.1.16 Forms.setFocus()
Availability
Windows
Usage
mdm.Forms.formName.setFocus():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.setFocus();
6.16.1.17 Forms.setStatusBarText()
Availability
Windows
Usage
mdm.Forms.formName.setStatusBarText(statusBarText:String):Void
Parameters
Returns
Nothing
Description
Notes
For use after a Status Bar has been created. See Forms.showStatusBar()
Example
mdm.Forms.MainForm.setStatusBarText("This is my text");
6.16.1.18 Forms.shake()
Availability
Usage
mdm.Forms.formName.shake(shakeTime:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.shake(10);
6.16.1.19 Forms.show()
Availability
Usage
mdm.Forms.formName.show():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.show();
6.16.1.20 Forms.showFullScreen()
Availability
Mac OSX
Usage
mdm.Forms.formName.showFullScreen(state:Boolean):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.showFullScreen(true);
6.16.1.21 Forms.showInScreen()
Availability
Windows
Usage
mdm.Forms.formName.showInScreen(screenID:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.showInScreen(1);
6.16.1.22 Forms.showMask()
Availability
Windows
Usage
mdm.Forms.formName.showMask(formName:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.showMask("c:\\myFolder\\myMask.bmp");
6.16.1.23 Forms.showModal()
Availability
Windows
Usage
mdm.Forms.formName.showModal():String
Parameters
None
Returns
String
Description
Will show the specified Form in Modal Mode. The result variable will be set by the mdm.Application.exitWithModalResult
executed in the Modal Form.
Notes
None
Example
6.16.1.24 Forms.showStatusBar()
Availability
Windows
Usage
mdm.Forms.formName.showStatusBar():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.showStatusBar();
6.16.1.25 Forms.startDrag()
Availability
Windows
Usage
mdm.Forms.formName.startDrag():Void
Parameters
None
Returns
Nothing
Description
When activated, LEFT mouse button can be used to drag the form.
Notes
None
Example
mdm.Forms.MainForm.startDrag();
6.16.1.26 Forms.stopDrag()
Availability
Windows
Usage
mdm.Forms.formName.stopDrag():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Forms.MainForm.stopDrag();
6.16.2 Properties
6.16.2.1 Forms.alpha
Availability
Windows
Usage
mdm.Forms.formName.alpha:Number
Returns
An Integer
Description
Notes
None
Example
mdm.Forms.MainForm.alpha = 255;
6.16.2.2 Forms.baseURL
Availability
Windows
Usage
mdm.Forms.formName.baseURL:String
Returns
A String
Description
Notes
None
Example
mdm.Forms.MainForm.baseURL = "http://www.mydomain.com";
6.16.2.3 Forms.bgColor
Availability
Windows
Usage
mdm.Forms.formName.bgColor:Number
Returns
An Integer
Description
Notes
None
Example
mdm.Forms.MainForm.bgColor = "CCCCCC";
6.16.2.4 Forms.height
Availability
Usage
mdm.Forms.formName.height:Number
Returns
An Integer
Description
Notes
None
Example
mdm.Forms.MainForm.height = 200;
6.16.2.5 Forms.isCreated
Availability
Windows
Usage
mdm.Forms.formName.isCreated:Boolean
Returns
A Boolean
Description
Notes
Will return "true" if the form is created, and "undefned" if the form has not been created.
Example
6.16.2.6 Forms.title
Availability
Usage
mdm.Forms.formName.title:String
Returns
A String
Description
Notes
Write only.
Example
mdm.Forms.MainForm.title = "SubForm1";
6.16.2.7 Forms.titleUnicode
Availability
Windows
Usage
mdm.Forms.formName.titleUnicode:String
Returns
A String
Description
Notes
Unicode Compliant. For some foreign characters to be displayed correctly, you must have supplemental language support
installed on your computer.
Example
6.16.2.8 Forms.visible
Availability
Usage
mdm.Forms.formName.visible:Boolean
Returns
A Boolean
Description
Form visibility.
Notes
None
Example
mdm.Forms.MainForm.visible = true;
6.16.2.9 Forms.width
Availability
Usage
mdm.Forms.formName.width:Number
Returns
An Integer
Description
Notes
None
Example
mdm.Forms.MainForm.width = 200;
6.16.2.10 Forms.windowState
Availability
Windows
Usage
mdm.Forms.formName.windowState:String
Returns
A String
Description
Holds the Window state of the specified Form. Returns "max" for Maximized, "min" for minimized and "nor" for Normal.
Notes
None
Example
6.16.2.11 Forms.x
Availability
Usage
mdm.Forms.formName.x:Number
Returns
An Integer
Description
Notes
None
Example
mdm.Forms.MainForm.x = 200;
6.16.2.12 Forms.y
Availability
Usage
mdm.Forms.formName.y:Number
Returns
An Integer
Description
Notes
None
Example
mdm.Forms.MainForm.y = 200;
6.17 mdm.FTP
Availability
mdm.FTP
Constructor Description
Will create a new FTP Instance using the specified
mdm.FTP()
parameters.
Method Description
FTP.abort() Will abort transfer operation for the specified FTP Instance.
FTP.chDir() Sets the current FTP directory to the one specified.
FTP.getDirDateTime() Will return the Date and Time of the specified directory.
FTP.getFileDateTime() Will return the Date and Time of the specified filename.
Property Description
Will set the account name to connect to, for FTP servers
FTP.account
that support it.
FTP.async Enable or Disable FTP Asynchronous Mode.
FTP.loggerData Returns all text from the FTP logger (if available).
Event Description
onAborted Executes when an FTP transfer is aborted.
onBusy Executes when an FTP connection is busy.
6.17.1 Constructor
6.17.1.1 mdm.FTP()
Availability
Windows
Constructor
mdm.FTP(server:String, port:Number):Void
Parameters
Returns
Nothing
Description
Will create a new FTP Instance using the specified parameters. Multiple Instances can be created.
Notes
a) This will NOT login to the server. FTP.login() must be executed after this command to log into the connection.
b) You should to close any open FTP connections before exiting the projector with FTP.close() to prevent memory leaks.
Example
6.17.2 Methods
6.17.2.1 FTP.abort()
Availability
Windows
Usage
ftpInstance.abort():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myFTP.abort();
6.17.2.2 FTP.chDir()
Availability
Windows
Usage
ftpInstance.chDir(dir:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myFTP.chDir("Images");
6.17.2.3 FTP.close()
Availability
Windows
Usage
ftpInstance.close():Void
Parameters
None
Returns
Nothing
Description
Will close the specified FTP Instance and remove it from Memory.
Notes
This command should always be used to close an FTP Instance once it is no longer required. Not doing so can result in
memory leaks and error messages.
Example
myFTP.close();
6.17.2.4 FTP.deleteDir()
Availability
Windows
Usage
ftpInstance.deleteDir(dir:String):Void
Parameters
Returns
Nothing
Description
Notes
To delete multiple directories, delimit directory names with a pipe charcter "|".
Example
myFTP.deleteDir("Images");
myFTP.deleteDir("Images|Users");
6.17.2.5 FTP.deleteFile()
Availability
Windows
Usage
ftpInstance.deleteFile(filename:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
myFTP.deleteFile("myFile.txt");
myFTP.deleteFile("myFile.txt|myImage.jpg|myDatabase.mdb");
6.17.2.6 FTP.dirExists()
Availability
Windows
Usage
ftpInstance.dirExists(dir:String):Boolean
Parameters
Returns
A Boolean
Description
Will return "true" or "false" depending on the existence of the specified directory.
Notes
None
Example
Simple Usage:
Advanced Usage:
if (myFTP.dirExists("Images") == true){
mdm.Dialogs.prompt("The Directory Exists");
}
6.17.2.7 FTP.fileExists()
Availability
Windows
Usage
ftpInstance.fileExists(filename:String):Boolean
Parameters
Returns
A Boolean
Description
Will return "true" or "false" depending on the existence of the specified file.
Notes
If the Directory contains many files, this command can take up to 20 seconds to return a result.
Example
Simple Usage:
Advanced Usage:
if (myFTP.fileExists("myFile.txt") == true){
mdm.Dialogs.prompt("The File Exists");
}
6.17.2.8 FTP.getDirAttribs()
Availability
Windows
Usage
ftpInstance.getDirAttribs(dir:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.17.2.9 FTP.getDirDateTime()
Availability
Windows
Usage
ftpInstance.getDirDateTime(dir:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.17.2.10 FTP.getFile()
Availability
Windows
Usage
ftpInstance.getFile(remoteFile:String, localFile:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
Simple Usage:
myFTP.getFile("myFile.txt", "C:\\myDownloadedFile.txt");
myFTP.getFile("myFileA.txt|myFileB.txt",
"C:\\myDownloadedFileA.txt|C:\\myDownloadedFileB.txt");
6.17.2.11 FTP.getFileList()
Availability
Windows
Usage
ftpInstance.getFileList():Array
Parameters
None
Returns
An Array
Description
Will return a 2 dimensional array which contains all of the files in the current FTP Directory. The First Dimension contains the
Filename ID and the Second Dimension contains the File Details.
Notes
None
Example
Simple Usage:
// myArray[0][0] = filename
// myArray[0][1] = Date & Time
// myArray[0][2] = Size
// myArray[0][3] = Attribs
// myArray[0][4] = Owner
// myArray[0][5] = Group
6.17.2.12 FTP.getFileAttribs()
Availability
Windows
Usage
ftpInstance.getFileAttribs(filename:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.17.2.13 FTP.getFileDateTime()
Availability
Windows
Usage
ftpInstance.getFileDateTime(filename:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.17.2.14 FTP.getFileSize()
Availability
Windows
Usage
ftpInstance.getFileSize(filename:String):Number
Parameters
Returns
An Integer
Description
Notes
None
Example
6.17.2.15 FTP.getFolderList()
Availability
Windows
Usage
ftpInstance.getFolderList():Array
Parameters
None
Returns
An Array
Description
Will return a 2 dimensional array which contains all of the folders in the current FTP Directory. The First Dimension contains
the Folder ID and the Second Dimension contains the File Details.
Notes
None
Example
Simple Usage:
6.17.2.16 FTP.login()
Availability
Windows
Usage
ftpInstance.login(username:String, password:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myFTP.login("myUsername", "myPassword");
6.17.2.17 FTP.makeDir()
Availability
Windows
Usage
ftpInstance.makeDir(dir:String):Void
Parameters
Returns
Nothing
Description
Creates a new Directory with the name specified on the FTP Server.
Notes
To create Multiple Directories, delimit Directory names with a pipe charcter "|".
Example
myFTP.makeDir("MDM");
myFTP.makeDir("User1|User2|User3");
6.17.2.18 FTP.moveFile()
Availability
Windows
Usage
ftpInstance.moveFile(filename:String, dir:String):Void
Parameters
Returns
Nothing
Description
Moves the specified File to the specified Folder on the FTP Server.
Notes
Example
myFTP.moveFile("myFile.txt", "Files");
myFTP.moveFile("myFileA.txt|myFileB.txt", "Files");
6.17.2.19 FTP.refresh()
Availability
Windows
Usage
ftpInstance.refresh():Void
Parameters
None
Returns
Nothing
Description
Will refresh the lists of files and folders in the current FTP folder.
Notes
Useful if other FTP instances are changing/uploading files in the same folder and you need to refresh in order to see the
changes.
Example
myFTP.refresh();
6.17.2.20 FTP.renameFile()
Availability
Windows
Usage
ftpInstance.renameFile(currentFilename:String, newFilename:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
myFTP.renameFile("myFile.txt", "myRenamedFile.txt");
myFTP.renameFile("a.txt|b.txt|c.txt", "1.txt|2.txt|3.txt");
6.17.2.21 FTP.resumePosition()
Availability
Windows
Usage
ftpInstance.resumePosition():Number
Parameters
None
Returns
An Integer
Description
Will return the position in bytes where the transfer started when resuming is supported.
Notes
None
Example
6.17.2.22 FTP.sendCommand()
Availability
Windows
Usage
ftpInstance.sendCommand(command:String):String
Parameters
Returns
A String
Description
Will send a specified command to the FTP server. The command can be any string for use with custom FTP servers, or can be
any FTP command that does not open the data channel, such as NOOP etc.
Notes
None
Example
6.17.2.23 FTP.sendFile()
Availability
Windows
Usage
ftpInstance.sendFile(localFile:String, remoteFile:String):Void
Parameters
Returns
Nothing
Description
Will upload the file specified in localFile and save it to Remote Server with the name specified in remoteFile.
Notes
Example
myFTP.sendFile("C:\\myLocalFile.txt", "myRemoteFile.txt");
myFTP.sendFile("C:\\A.txt|C:\\B.txt", "A.txt|B.txt");
6.17.2.24 FTP.setProxy()
Availability
Windows
Usage
Parameters
proxyPort:Number ???
proxyUsername:String ???
proxyPassword:String ???
Returns
Nothing
Description
Sets the type of FTP connection to use if the connection is behind a proxy server.
Notes
Example
6.17.3 Properties
6.17.3.1 FTP.account
Availability
Windows
Usage
ftpInstance.account:Void
Returns
Nothing
Description
Will set the account name to connect to, for FTP servers that support it.
Notes
None
Example
myFTP.account = "admin";
6.17.3.2 FTP.async
Availability
Windows
Usage
ftpInstance.async:Void
Returns
Nothing
Description
Set mode to "true" to enable or "false" to disable. Asynchronous mode will make the rest of the application more responsive in
certain cases.
Notes
None
Example
myFTP.async = true;
6.17.3.3 FTP.bytesTransferred
Availability
Windows
Usage
ftpInstance.bytesTransferred:Number
Returns
An Integer
Description
Will return the number of bytes transferred since last transfer operation started.
Notes
None
Example
6.17.3.4 FTP.currentDir
Availability
Windows
Usage
ftpInstance.currentDir:Void
Returns
Nothing
Description
Notes
None
Example
myFTP.currentDir = "images";
or
6.17.3.5 FTP.error
Availability
Windows
Usage
ftpInstance.error:String
Returns
A string
Description
This command will return a string describing the last error occurred (If applicable).
Notes
ftpNone
ftpNetworkDown
ftpInvalidAddress
ftpInternalError
ftpGeneralWinsockError
ftpConnAborted
ftpConnReset
ftpConnectTimeOut
ftpOutofSockets
ftpNetworkUnreachable
ftpAddressNotAvailable
ftpIDRefused
ftpProtocolError
ftpCanceled
ftpUnknown
ftpAddressResolutionError
ftpPrematureDisconnect
ftpHostUnreachable
ftpNoServer
ftpNoProxyServer
ftpFileOpen
ftpFileWrite
ftpFileRead
ftpFileNotFound
ftpTimeOut
ftpServerDown
ftpAccessDenied
ftpDataError
ftpResumeFailed
ftpPermissionDenied
ftpBadURL
ftpTransferType
ftpTransferPort
ftpTransferFatalPort
ftpTransferGet
ftpTransferPut
ftpTransferFatalError
ftpTransferResumeFailed
Example
6.17.3.6 FTP.initialDir
Availability
Windows
Usage
ftpInstance.initialDir:Void
Returns
Nothing
Description
Notes
None
Example
myFTP.initialDir = "images";
6.17.3.7 FTP.isBusy
Availability
Windows
Usage
ftpInstance.isBusy:Boolean
Returns
A Boolean
Description
Will return "true" or "false" depending if the FTP connection is busy or not.
Notes
None
Example
6.17.3.8 FTP.isConnected
Availability
Windows
Usage
ftpInstance.isConnected:Boolean
Returns
A Boolean
Description
Will return "true" or "false" depending if the FTP connection is connected or not.
Notes
None
Example
6.17.3.9 FTP.lastReply
Availability
Windows
Usage
ftpInstance.lastReply:String
Returns
A String
Description
Will return a string containing the last response line from the FTP server.
Notes
None
Example
6.17.3.10 FTP.loggerData
Availability
Windows
Usage
ftpInstance.loggerData:String
Returns
A String
Description
Notes
None
Example
6.17.3.11 FTP.NOOP
Availability
Windows
Usage
ftpInstance.NOOP:Void
Returns
Nothing
Description
Setting NOOP to "true" will enable an automatic NOOP command every 30 seconds in order to keep the connection alive.
Setting "false" will disable it.
Notes
None
Example
myFTP.NOOP = true;
6.17.3.12 FTP.passive
Availability
Windows
Usage
ftpInstance.passive:Void
Returns
Nothing
Description
Notes
None
Example
myFTP.passive = true;
6.17.3.13 FTP.serverType
Availability
Windows
Usage
ftpInstance.serverType:Void
Returns
Nothing
Description
Notes
The Server Type must be one of the following values (Case Sensitive):
AutoDetect
UNIX
ULTRIX
Clix
Chameleon
NCSA
QVT
ftpstBSD
ftpstSunOS
VmsMultinet
VmsUcx
MVS
VM
VMVPS
MSFTP
NetTerm
ServU
WFTPD
Netware
NetPresenz
Example
myFTP.serverType = "WFTPD";
6.17.3.14 FTP.success
Availability
Windows
Usage
ftpInstance.success:Boolean
Returns
A Boolean
Description
Notes
None
Example
6.17.3.15 FTP.supportsResume
Availability
Windows
Usage
ftpInstance.supportsResume:Boolean
Returns
A Boolean
Description
Will return "true" or "false" based upon whether the FTP server supports resuming.
Notes
None
Example
6.17.3.16 FTP.timeout
Availability
Windows
Usage
ftpInstance.timeout:Void
Returns
Nothing
Description
Will set the time in seconds that the FTP connection will wait to connect to a socket.
Notes
Example
myFTP.timeout = 30;
6.17.3.17 FTP.transferMode
Availability
Windows
Usage
ftpInstance.timeout:Void
Returns
Nothing
Description
Sets the Transfer mode to "binary" or "ascii". Set mode to "binary" to enable binary mode or "ascii" to enable text mode.
Notes
None
Example
myFTP.transferMode = "binary";
6.17.3.18 FTP.transferTime
Availability
Windows
Usage
ftpInstance.transferTime:Number
Returns
An Integer
Description
Will return the time elapsed since last transfer operation for the specified connection.
Notes
None
Example
6.17.4 Events
6.17.4.1 onAborted
Availability
Windows
Usage
ftpInstance.onAborted:Function
Parameters
None
Description
Notes
None
Example
myFTP.onAborted = function(){
mdm.Dialogs.Prompt("FTP connection aborted");
}
6.17.4.2 onBusy
Availability
Windows
Usage
ftpInstance.onBusy:Function
Parameters
None
Description
Notes
None
Example
myFTP.onBusy = function(){
mdm.Dialogs.Prompt("FTP connection busy");
}
6.17.4.3 onConnected
Availability
Windows
Usage
ftpInstance.onConnected:Function
Parameters
None
Description
Notes
None
Example
myFTP.onConnected = function(){
mdm.Dialogs.Prompt("FTP connection established");
}
6.17.4.4 onDirChanged
Availability
Windows
Usage
ftpInstance.onDirChanged:Function
Parameters
None
Description
Notes
None
Example
myFTP.onDirChanged = function(){
mdm.Dialogs.Prompt("Directory changed");
}
6.17.4.5 onDirCreated
Availability
Windows
Usage
ftpInstance.onDirCreated:Function
Parameters
None
Description
Notes
None
Example
myFTP.onDirCreated = function(){
mdm.Dialogs.Prompt("Directory created");
}
6.17.4.6 onDirDeleted
Availability
Windows
Usage
ftpInstance.onDirDeleted:Function
Parameters
None
Description
Notes
None
Example
myFTP.onDirDeleted = function(){
mdm.Dialogs.Prompt("Directory Deleted");
}
6.17.4.7 onError
Availability
Windows
Usage
ftpInstance.onError:Function
Parameters
None
Description
Notes
None
Example
myFTP.onError = function(){
mdm.Dialogs.Prompt("Error occured");
}
6.17.4.8 onFileDeleted
Availability
Windows
Usage
ftpInstance.onFileDeleted:Function
Parameters
None
Description
Notes
None
Example
myFTP.onFileDeleted = function(){
mdm.Dialogs.Prompt("File deleted");
}
6.17.4.9 onFileReceived
Availability
Windows
Usage
ftpInstance.onFileReceived:Function
Parameters
None
Description
Notes
None
Example
myFTP.onFileReceived = function(){
mdm.Dialogs.Prompt("File received");
}
6.17.4.10 onFileRenamed
Availability
Windows
Usage
ftpInstance.onFileRenamed:Function
Parameters
None
Description
Notes
None
Example
myFTP.onFileRenamed = function(){
mdm.Dialogs.Prompt("File renamed");
}
6.17.4.11 onFileSent
Availability
Windows
Usage
ftpInstance.onFileSent:Function
Parameters
None
Description
Notes
None
Example
myFTP.onFileSent = function(){
mdm.Dialogs.Prompt("File sent");
}
6.17.4.12 onFileTransferred
Availability
Windows
Usage
ftpInstance.onFileTransferred:Function
Parameters
None
Description
Notes
None
Example
myFTP.onFileTransferred = function(){
mdm.Dialogs.Prompt("File Transferred");
}
6.17.4.13 onIndexFileReceived
Availability
Windows
Usage
ftpInstance.onIndexFileReceived:Function
Parameters
None
Description
Notes
None
Example
myFTP.onIndexFileReceived = function(){
mdm.Dialogs.Prompt("Index File Received");
}
6.17.4.14 onListingDone
Availability
Windows
Usage
ftpInstance.onListingDone:Function
Parameters
None
Description
Notes
None
Example
myFTP.onListingDone = function(){
mdm.Dialogs.Prompt("File listing done");
}
6.17.4.15 onLoggedIn
Availability
Windows
Usage
ftpInstance.onLoggedIn:Function
Parameters
None
Description
Notes
None
Example
myFTP.onLoggedIn = function(){
mdm.Dialogs.Prompt("Logged to server");
}
6.17.4.16 onQuit
Availability
Windows
Usage
ftpInstance.onQuit:Function
Parameters
None
Description
Executes when the connection to the FTP server is lost (e.g, you are booted by the server)
Notes
This event is not fired when you close the connection normally using FTP.close()
Example
myFTP.onQuit = function(){
mdm.Dialogs.Prompt("Quit from server");
}
6.17.4.17 onReady
Availability
Windows
Usage
ftpInstance.onReady:Function
Parameters
None
Description
Notes
None
Example
myFTP.onReady = function(){
mdm.Dialogs.Prompt("Connection is ready");
}
6.17.4.18 onResolvedLinks
Availability
Windows
Usage
ftpInstance.onResolvedLinks:Function
Parameters
None
Description
Notes
None
Example
myFTP.onResolvedLinks = function(){
mdm.Dialogs.Prompt("Resolved link action");
}
6.18 mdm.HTTP
Availability
mdm.HTTP
Constructor Description
Will create a new HTTP Instance using the specified
mdm.HTTP()
parameters.
Method Description
HTTP.abort() Aborts the HTTP transfer.
HTTP.close() Closes the HTTP connection.
Event Description
onBinaryTransferComplete Executes when http transfer completes.
onError Executes when a HTTP Error occurs.
6.18.1 Constructor
6.18.1.1 mdm.HTTP()
Availability
Constructor
mdm.HTTP():Void
Parameters
None
Returns
Nothing
Description
Will create a new HTTP Instance. Multiple Instances can be created on Windows only.
Notes
Example
6.18.2 Methods
6.18.2.1 HTTP.abort()
Availability
Usage
httpInstance.abort():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myHTTP.abort();
6.18.2.2 HTTP.close()
Availability
Usage
httpInstance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myHTTP.close();
6.18.2.3 HTTP.getFile()
Availability
Usage
Parameters
Returns
Nothing
Description
Silently downloads any HTTP file in binary mode with the specified parameters.
Notes
None
Example
6.18.2.4 HTTP.getString()
Availability
Usage
Parameters
Returns
Nothing
Description
Silently downloads a text document in text mode using the specified parameters.
Notes
Example
6.18.3 Events
6.18.3.1 onBinaryTransferComplete
Availability
Usage
httpInstance.onBinaryTransferComplete:Function
Parameters
Description
Notes
None
Example
myHTTP.onBinaryTransferComplete = function(myObject){
mdm.Dialogs.Prompt(myObject.filename);
}
6.18.3.2 onError
Availability
Usage
httpInstance.onError:Function
Parameters
None
Description
Notes
None
Example
myHTTP.onError = function(){
mdm.Dialogs.Prompt("A HTTP Error has Occurred");
}
6.18.3.3 onProgress
Availability
Usage
httpInstance.onProgress:Function
Parameters
Description
Notes
None
Example
myHTTP.onProgress = function(myObject){
mdm.Forms.thisForm.title = "Progress: " + myObject.bytesTransferred + "of" +
myObject.bytesTotal;
}
6.18.3.4 onTransferComplete
Availability
Usage
httpInstance.onTransferComplete:Function
Parameters
Description
Notes
None
Example
myHTTP.onTransferComplete = function(myObject){
mdm.Dialogs.Prompt("Downloaded data = "+myObject.data);
6.19 mdm.Image
Availability
mdm.Image
Object Description
ScreenCapture ScreenCapture Object
Method Description
Image.bmpToJpg() Converts a BMP image to a JPG image of the same name.
Image.bmpToJpgAdv() Converts a BMP image to a JPG image of the same name.
6.19.1 Objects
6.19.1.1 Image.ScreenCapture
Availability
mdm.Image.ScreenCapture
Method Description
Image.ScreenCapture.toBmp() Saves a BMP snapshot of the defined DESKTOP area.
Image.ScreenCapture.toBmpAlt() Saves a BMP snapshot of the defined DESKTOP area. Alt.
6.19.1.1.1 Image.ScreenCapture.toBmp()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Notes
If alpha blending has been enabled, this command will not capture the actual Projector. Please use
mdm.Image.ScreenCapture.toBmpAlt instead.
Example
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Notes
Example
Availability
Mac OSX
Usage
Parameters
Returns
Nothing
Description
Notes
None
Example
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Notes
If alpha blending has been enabled, this command will not capture the actual Projector. Please use
mdm.Image.ScreenCapture.movieAreaToBmpAlt instead
Example
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Notes
Example
Availability
Windows
Usage
mdm.Image.ScreenCapture.movieToBmp(filePath:String):Void
Parameters
Returns
Nothing
Description
Takes a snapshot of just the PROJECTOR SWF window and saves it to a BMP.
Notes
If alpha blending has been enabled, this command will not capture the actual Projector. Please use
mdm.Image.ScreenCapture.movieToBmpAlt instead.
Example
mdm.Image.ScreenCapture.movieToBmp("c:\\myMovieScreenshot.bmp");
6.19.1.1.7 Image.ScreenCapture.movieToBmpAlt()
Availability
Windows
Usage
mdm.Image.ScreenCapture.movieToBmpAlt(filePath:String):Void
Parameters
Returns
Nothing
Description
Takes a snapshot of just the PROJECTOR SWF window and saves it to a BMP.
Notes
Example
mdm.Image.ScreenCapture.movieToBmpAlt("c:\\myMovieScreenshot.bmp");
6.19.2 Methods
6.19.2.1 Image.bmpToJpg()
Availability
Windows
Usage
mdm.Image.bmpToJpg(inputFilePath:String):Void
Parameters
Returns
Nothing
Description
Converts a BMP image to a JPG image of the same name. eg. snapshot.bmp will be converted to snapshot.jpg
Notes
JPG image files use much better compression and are a fraction of the size of BMPs.
Example
mdm.Image.bmpToJpg("c:\\myScreenshot.bmp");
6.19.2.2 Image.bmpToJpgAdv()
Availability
Usage
mdm.Image.bmpToJpgAdv(inputFilePath:String, compressionQuality:Number):Void
Parameters
Returns
Nothing
Description
Converts a BMP image to a JPG image of the same name. eg. snapshot.bmp will be converted to snapshot.jpg JPG image
files use much better compression and are a fraction of the size of BMPs.
Notes
This command is exactly the same as mdm.Image.bmpToJpg with the added option of setting the quality of the output JPG
file.
Example
mdm.Image.bmpToJpgAdv("c:\\myScreenshot.bmp", 50);
6.19.2.3 Image.bmpToPng()
Availability
Windows
Usage
mdm.Image.bmptToPng(inputBmpFilePath:String, outputPngFilePath:String,
use256Color:Boolean, transparentColor:String):Void
Parameters
use256Color:Boolean Boolean flag for use 256 color palette (8bit). Set to true will produce an 8bit 256 color PNG, set
to false will create a 24bit PNG
transparentColor:String Constant value for transparency color to be used in created PNG. Must be either "white",
"black" or "fuchsia".
Returns
Nothing
Description
Converts a BMP image to a PNG image with transparency. Transparent areas on your image can be set to white (#FFFFFF),
black (#000000) or fuchsia (#FF00FF)
Notes
None
Example
6.19.2.4 Image.getJpgSize()
Availability
Windows
Usage
mdm.Image.getJpgSize(filePath:String):Array
Parameters
Returns
An Array
Description
Notes
None
Example
//imageSize[0] = Width
//imageSize[1] = Height
6.19.2.5 Image.getSwfHeader()
Availability
Windows
Usage
mdm.Image.getSwfHeader(filePath:String):Array
Parameters
Returns
An Array
Description
Notes
None
Example
//swfInfo[0] = Width
//swfInfo[1] = Height
//swfInfo[2] = Version
//swfInfo[3] = Frame Rate
//swfInfo[4] = Frame Count
6.19.2.6 Image.jpgToBmp()
Availability
Windows
Usage
mdm.Image.jpgToBmp(inputJpgFilePath:String):Void
Parameters
Returns
Nothing
Description
Converts a JPG image to a BMP file of the same name. eg. snapshot.jpg will be converted to snapshot.bmp.
Notes
None
Example
mdm.Image.jpgToBmp("c:\\myImage.jpg");
6.19.2.7 Image.jpgToSwf()
Availability
Windows
Usage
mdm.Image.jpgToSwf(inputJpgFilePath:String):Void
Parameters
Returns
Nothing
Description
Converts a JPG image to a SWF file of the same name. eg. snapshot.jpg will be converted to snapshot.swf.
Notes
None
Example
mdm.Image.jpgToSwf("c:\\myImage.jpg");
6.19.2.8 Image.jpgToSwfSlideShow()
Availability
Windows
Usage
mdm.Image.jpgToSwfSlideShow(frameRate:Number, inputJpgFiles:String,
frameGap:String, outputFilePath:String, width:Number, height:Number):Void
Parameters
Returns
Nothing
Description
Notes
Images must be provided as a delimited list where the pipe character "|" is used as the delimiter. The frameGap variable must
also be provided as a delimited list.
Example
6.19.2.9 Image.pngToSwf()
Availability
Windows
Usage
mdm.Image.pngToSwf(inputPngFilePath:String):Void
Parameters
Returns
Nothing
Description
Converts a PNG image to a SWF file of the same name. eg. snapshot.png will be converted to snapshot.swf
Notes
None
Example
mdm.Image.pngToSwf("c:\\myImage.png");
6.19.2.10 Image.pngToSwfTransparent()
Availability
Windows
Usage
mdm.Image.pngToSwfTransparent(inputPngFilePath:String):Void
Parameters
Returns
Nothing
Description
Converts a PNG image to a SWF file of the same name. eg. snapshot.png will be converted to snapshot.swf with preserved
Transparency from the PNG File.
Notes
Example
mdm.Image.pngToSwfTransparent("c:\\myImage.png");
6.19.2.11 Image.setJpgSize()
Availability
Usage
Parameters
Returns
Nothing
Description
Resize's the JPG image and saves the output file to a BMP.
Notes
The antialiasing variables can be either: "1" for no antialiasing, "2" for medium, "3" for maximum antialiasing.
Example
6.20 mdm.Input
Availability
mdm.Input
Method Description
Joystick Joystick Object
Mouse Mouse Object
6.20.1 Objects
6.20.1.1 Input.Joystick
Availability
mdm.Input.Joystick
Method Description
Enables Joystick control in the form which calls the
Input.Joystick.enable()
command.
Input.Joystick.disable() Disables Joystick input.
Event Description
onJoystick1ButtonDown Executes when Joystick 1 button is pressed.
onJoystick1Move Executes when Joystick 1 is moved.
6.20.1.1.1 Methods
6.20.1.1.1.1 Input.Joystick.enable()
Availability
Windows
Usage
mdm.Input.Joystick.enable(joystickID:Number, joystickEmulationType:String):Void
Parameters
Returns
Nothing
Description
Enables Joystick control in the form which executes the command. The parameter joystickID is either "1" or "2" for the
corresponding Joystick. The parameter emulationType is either "keyboard" or "mouse". If emulationType is set to "mouse", the
mouse cursor will respond to the Joystick position and the following Joystick buttons are assigned to the following actions:
Notes
The joystick is only compatible with standard Forms. Transparent forms can not use the Joystick.
When Keyboard emulation is enabled, the following variables are created in your Flash Movie:
Example
mdm.Input.Joystick.enable(1, "mouse");
6.20.1.1.1.2 Input.Joystick.disable()
Availability
Windows
Usage
mdm.Input.Joystick.disable():Void
Parameters
Returns
Nothing
Description
Disables Joystick input. The parameter joystickID is either "1" or "2" for the corresponding Joystick.
Notes
None
Example
mdm.Input.Joystick.disable();
6.20.1.1.1.3 Input.Joystick.setKey()
Availability
Windows
Usage
mdm.Input.Joystick.setKey(joystickID:Number, joystickButtonID:Number,
keyboardKeyCode:String):Void
Parameters
Returns
Nothing
Description
Will assign a Joystick Button to a Keyboard Key. Valid codes for keyboardKeyCode are:
TAB = 9
RETURN = 13
SHIFT = 10
CONTROL = 17
ESCAPE = 27
SPACE = 20
HOME = 36
LEFT = 37
UP = 38
RIGHT = 39
DOWN = 40
{ 0 thru 9 are the same as ASCII '0' thru '9' (48 - 57) }
{ A thru Z are the same as ASCII 'A' thru 'Z' (65 - 90) }
NUMPAD0 = 96
NUMPAD1 = 97
NUMPAD2 = 98
NUMPAD3 = 99
NUMPAD4 = 100
NUMPAD5 = 101
NUMPAD6 = 102
NUMPAD7 = 103
NUMPAD8 = 104
NUMPAD9 = 105
F1 = 112
F2 = 113
F3 = 114
F4 = 115
F5 = 116
F6 = 117
F7 = 118
F8 = 119
F9 = 120
F10 = 121
F11 = 122
F12 = 123
LSHIFT = 160
RSHIFT = 161
LCONTROL = 162
RCONTROL = 163
Notes
To assign a Left Mouse Click to a Joystick Button, use the keyboardKeyCode "9999".
Example
The example code will assign Fire Button 3 on Joystick 1 to the equivalent of pressing the Space Bar:
mdm.Input.Joystick.setKey(1, 3, "$20");
6.20.1.1.2 Events
6.20.1.1.2.1 onJoystick1ButtonDown
Availability
Windows
Usage
mdm.Input.onJoystick1ButtonDown:Function
Parameters
xlevel:Number X level (percentage of protrusion in the x axis) of Joystick 1 from -100 to 100.
ylevel:Number Y level (percentage of protrusion in the y axis) of Joystick 1 from -100 to 100.
Description
Executes when Joystick 1 button is pressed. Number values are returned to x and y, and String values (as "true" or "false") are
returned to the parameters b1, b2, b3 and b4 (corresponding to the buttons on the Josytick).
Notes
None
Example
Simple Usage:
Advanced Usage:
mdm.Input.Joystick.onJoystick1ButtonDown = function(myObject){
mdm.Dialogs.prompt(myObject.xlevel)
mdm.Dialogs.prompt(myObject.ylevel)
mdm.Dialogs.prompt(myObject.b1)
// ... and so on
}
6.20.1.1.2.2 onJoystick1Move
Availability
Windows
Usage
mdm.Input.onJoystick1Move:Function
Parameters
xlevel:Number X level (percentage of protrusion in the y axis) of Joystick 1 from -100 to 100.
ylevel:Number Y level (percentage of protrusion in the y axis )of Joystick 1 from -100 to 100.
Description
Executes when Joystick 1 is moved. Number values are returned to x and y, and String values (as "true" or "false") are
returned to the parameters b1, b2, b3 and b4 (corresponding to the buttons on the Josytick).
Notes
None
Example
Simple Usage:
Advanced Usage:
mdm.Input.Joystick.onJoystick1Move = function(myObject){
mdm.Dialogs.prompt(myObject.xlevel)
mdm.Dialogs.prompt(myObject.ylevel)
mdm.Dialogs.prompt(myObject.b1)
// ... and so on
}
6.20.1.1.2.3 onJoystick2ButtonDown
Availability
Windows
Usage
mdm.Input.onJoystick2ButtonDown:Function
Parameters
xlevel:Number X level (percentage of protrusion in the y axis) of Joystick 2 from -100 to 100.
ylevel:Number Y level (percentage of protrusion in the y axis) of Joystick 2 from -100 to 100.
Description
Executes when Joystick 2 button is pressed. Number values are returned to x and y, and String values (as "true" or "false") are
returned to the parameters b1, b2, b3 and b4 (corresponding to the buttons on the Josytick).
Notes
None
Example
Simple Usage:
Advanced Usage:
mdm.Input.Joystick.onJoystick2ButtonDown = function(myObject){
mdm.Dialogs.prompt(myObject.xlevel)
mdm.Dialogs.prompt(myObject.ylevel)
mdm.Dialogs.prompt(myObject.b1)
// ... and so on
}
6.20.1.1.2.4 onJoystick2Move
Availability
Windows
Usage
mdm.Input.Joystick.onJoystick2Move:Function
Parameters
Description
Executes when Joystick 2 is moved. Co-ordinates are returned to x and y, and "true" or "false" values are returned to the
parameters b1, b2, b3 and b4 (corresponding to the buttons on the Josytick).
Notes
None
Example
Simple Usage:
Advanced Usage:
mdm.Input.Joystick.onJoystick2Move = function(myObject){
mdm.Dialogs.prompt(myObject.xlevel)
mdm.Dialogs.prompt(myObject.ylevel)
mdm.Dialogs.prompt(myObject.b1)
// ... and so on
}
6.20.1.2 Input.Mouse
Availability
mdm.Input.Mouse
Method Description
Input.Mouse.getPosition() Gets the Mouse Cursor position in pixels.
Input.Mouse.generateEvent() Simulate a Mouse Event.
6.20.1.2.1 Methods
6.20.1.2.1.1 Input.Mouse.getPosition()
Availability
Windows
Usage
mdm.Input.Mouse.getPosition():Array
Parameters
None
Returns
An Array
Description
Notes
None
Example
// myMousePosition[0] = x Position
// myMousePosition[1] = y Position
6.20.1.2.1.2 Input.Mouse.generateEvent()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Sets the mouse Cursor position to the pixel values set in left and top and simulates a mouse-click as defined in event. The
variable restorePosition has either a "true" or "false" value. If set to "true" the cursor will return to it's original position once the
event has been generated.
Notes
Example
Availability
Windows
Usage
mdm.Input.Mouse.setCursor(cursorType:String):Void
Parameters
Returns
Nothing
Description
Sets the Mouse Cursor Type to the variable cursorType. Valid values are (case-sensitive):
Default
None
Arrow
Cross
IBeam
SizeNESW
SizeNS
SizeNWSE
SizeWE
UpArrow
HourGlass
Drag
NoDrop
HSplit
VSplit
MultiDrag
SQLWait
No
AppStart
Help
HandPoint
SizeAll
Notes
None
Example
mdm.Input.Mouse.setCursor("Arrow");
6.20.1.2.1.4 Input.Mouse.setPosition()
Availability
Windows
Usage
mdm.Input.Mouse.setPosition(x:Number, y:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Input.Mouse.setPosition(100, 100);
6.20.1.2.1.5 Input.Mouse.show()
Availability
Usage
mdm.Input.Mouse.show(formName:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Input.Mouse.show("MainForm");
6.20.1.2.1.6 Input.Mouse.hide()
Availability
Usage
mdm.Input.Mouse.hide(formName:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Input.Mouse.hide("MainForm");
6.20.1.3 Input.Tablet
Availability
mdm.Input.Tablet
Method Description
Enables Tablet Input in the form which executes the
Input.Tablet.enable()
command.
Input.Tablet.disable() Disables Tablet Input in the form which executes the
command.
Event Description
onTabletEvent Executes on any Tablet Event.
6.20.1.3.1 Methods
6.20.1.3.1.1 Input.Tablet.enable()
Availability
Windows
Usage
mdm.Input.Tablet.enable():Void
Parameters
None
Returns
Nothing
Description
Example
mdm.Input.Tablet.enable();
6.20.1.3.1.2 Input.Tablet.disable()
Availability
Windows
Usage
mdm.Input.Tablet.disable():Void
Parameters
None
Returns
Nothing
Description
Example
mdm.Input.Tablet.disable();
6.20.1.3.2 Events
6.20.1.3.2.1 onTabletEvent
Availability
Windows
Usage
mdm.Input.onTabletEvent:Function
Parameters
Description
Notes
None
Example
Simple Usage:
Advanced Usage:
mdm.Input.onTabletEvent = function(myObject){
mdm.Dialogs.prompt(myObject.x)
mdm.Dialogs.prompt(myObject.y)
mdm.Dialogs.prompt(myObject.pressure)
// ... and so on
}
6.20.1.4 Input.Twain
Availability
mdm.Input.Twain
Method Description
Input.Twain.acquire() Acquires an image from a compatible TWAIN device.
6.20.1.4.1 Methods
6.20.1.4.1.1 Input.Twain.acquire()
Availability
Windows
Usage
mdm.Input.Twain.acquire(outputFilePath:String):Void
Parameters
Returns
Nothing
Description
Acquires an image from a compatible TWAIN device and saves to a BMP format.
Example
mdm.Input.Twain.acquire("c:\\myImage.bmp");
6.21 mdm.MacShell
Availability
mdm.MacShell
Method Description
MacShell.close() Will close or Interupt the Shell Script.
MacShell.exec() Executes one line of Shell Script.
Property Description
MacShell.exitCode Will return
MacShell.isRunning Checks to see if a Shell Script is running.
6.21.1 Methods
6.21.1.1 MacShell.close()
Availability
Mac OSX
Usage
mdm.MacShell.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.MacShell.close()
6.21.1.2 MacShell.exec()
Availability
Mac OSX
Usage
mdm.MacShell.exec(:String):Void
Parameters
Returns
Nothing
Description
Executes one line of Shell Script. You can check the progress of the running script by using MacShell.isRunning()
and MacShell.output()
Notes
None
Example
6.21.2 Properties
6.21.2.1 MacShell.exitCode
Availability
Mac OSX
Usage
mdm.MacShell.exitCode:String
Returns
A String
Description
Will return the exit code (if applicable) of the Shell Script executed using MacShell.exec()
Notes
None
Example
Simple Usage:
Result = mdm.MacShell.exitCode;
mdm.Dialogs.prompt(mdm.MacShell.exitCode);
6.21.2.2 MacShell.isRunning
Availability
Mac OSX
Usage
mdm.MacShell.isRunning:Boolean
Returns
A Boolean
Description
Will return a "true" or "false" statement based upon the Shell Script executed using MacShell.exec()
Notes
None
Example
Simple Usage:
Result = mdm.MacShell.isRunning;
mdm.Dialogs.prompt(mdm.MacShell.isRunning);
6.21.2.3 MacShell.output
Availability
Mac OSX
Usage
mdm.MacShell.output:String
Returns
A String
Description
Will return the standard output (if applicable) of the Shell Script executed using MacShell.exec()
Notes
None
Example
Simple Usage:
Result = mdm.MacShell.output;
mdm.Dialogs.prompt(mdm.MacShell.output);
6.22 mdm.MediaPlayer6
Availability
mdm.MediaPlayer6
Constructor Description
Inserts a Windows Media Player Instance using the
mdm.MediaPlayer6()
specified parameters.
Method Description
MediaPlayer6.close() Closes the video file loaded in the specified instance.
MediaPlayer6.fastForward() Use to Fast Forward the video clip.
Property Description
MediaPlayer6.balance Sets the balance of the specified Instance.
MediaPlayer6.duration Returns the total length of the video file in the specified
instance.
Event Description
onMPChangeState Executes when a video instance changes state.
6.22.1 Constructor
6.22.1.1 mdm.MediaPlayer6()
Availability
Windows
Constructor
Parameters
x:Number X position
y:Number Y Position
Returns
Nothing
Description
Inserts a Windows Media Player Instance using the specified parameters. Multiple Instances can be created.
Notes
Windows Media Player must be installed on the users system for this command to function correctly.
Example
// t = top
// b = bottom
// l = left
// r = right
// c = center
6.22.2 Methods
6.22.2.1 MediaPlayer6.close()
Availability
Windows
Usage
mpInstance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP6.close();
6.22.2.2 MediaPlayer6.fastForward()
Availability
Windows
Usage
mpInstance.fastForward():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP6.fastForward();
6.22.2.3 MediaPlayer6.fastReverse()
Availability
Windows
Usage
mpInstance.fastReverse():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP6.fastReverse();
6.22.2.4 MediaPlayer6.fullscreen()
Availability
Windows
Usage
mpInstance.fullscreen():Void
Parameters
None
Returns
Nothing
Description
Notes
To return to window mode, right click on the fullscreen window and deselect the fullscreen option.
Example
myMP6.fullscreen();
6.22.2.5 MediaPlayer6.hide()
Availability
Windows
Usage
mpInstance.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP6.hide();
6.22.2.6 MediaPlayer6.mute()
Availability
Windows
Usage
mpInstance.mute(muteFlag:Boolean):Void
Parameters
Returns
Nothing
Description
Mutes the Media Player if parameter is "true" and unmutes if param is "false".
Notes
None
Example
myMP6.mute(true);
6.22.2.7 MediaPlayer6.noMenu()
Availability
Windows
Usage
mpInstance.noMenu():Void
Parameters
None
Returns
Nothing
Description
Disbales the Media Player context menu. Single Mouse Clicks will start and stop the Video.
Notes
None
Example
myMP6.noMenu();
6.22.2.8 MediaPlayer6.pause()
Availability
Windows
Usage
mpInstance.pause():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP6.pause();
6.22.2.9 MediaPlayer6.play()
Availability
Windows
Usage
mpInstance.play():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP6.play();
6.22.2.10 MediaPlayer6.show()
Availability
Windows
Usage
mpInstance.show():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP6.show();
6.22.2.11 MediaPlayer6.stop()
Availability
Windows
Usage
mpInstance.stop():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP6.stop();
6.22.3 Properties
6.22.3.1 MediaPlayer6.balance
Availability
Windows
Usage
mpInstance.balance:Number
Returns
An Integer
Description
Sets the balance of the specified video instance. The balance is a value from -10000 to 10000.
Notes
The balance value are based upon the Windows Media Player requirements as provided by Microsoft.
Example
myMP6.balance = 0;
6.22.3.2 MediaPlayer6.canScan
Availability
Windows
Usage
mpInstance.canScan:Boolean
Returns
A Boolean
Description
Checks to see if the loaded Media File can scan and returns a "true" or "false" value based upon the result.
Notes
If Scan is available, it means that the Media File will work with MediaPlayer6.position
Example
6.22.3.3 MediaPlayer6.canSeek
Availability
Windows
Usage
mpInstance.canSeek:Boolean
Returns
A Boolean
Description
Checks to see if the loaded Media File can seek and returns a "true" or "false" value based upon the result.
Notes
If Scan is available, it means that the Media File will work with MediaPlayer6.fastForward() and
MediaPlayer6.fastReverse()
Example
6.22.3.4 MediaPlayer6.duration
Availability
Windows
Usage
mpInstance.duration:Number
Returns
An Integer
Description
Returns the total length of the video file in the specified instance.
Notes
None
Example
6.22.3.5 MediaPlayer6.height
Availability
Windows
Usage
mpInstance.height:Number
Returns
An Integer
Description
Notes
None
Example
myMP6.height = 200;
6.22.3.6 MediaPlayer6.isInstalled
Availability
Windows
Usage
mpInstance.isInstalled:Boolean
Returns
A Boolean
Description
Checks the existence of Windows Media Player 6 on the users system and return a "true" or "false" value based upon it's
presence.
Notes
None
Example
6.22.3.7 MediaPlayer6.position
Availability
Windows
Usage
mpInstance.position:Number
Returns
An Integer
Description
Notes
None
Example
myMP6.position = 10;
6.22.3.8 MediaPlayer6.volume
Availability
Windows
Usage
mpInstance.volume:Number
Returns
An Integer
Description
Volume of the specified video instance. The volume is a value from -5000 to 0.
Notes
The volume values are based upon the Windows Media Player requirements as provided by Microsoft.
Example
myMP6.volume = 0;
6.22.3.9 MediaPlayer6.visible
Availability
Windows
Usage
mpInstance.visible:Boolean
Returns
An Boolean
Description
Instance visibility.
Notes
None
Example
myMP6.visible = true;
6.22.3.10 MediaPlayer6.width
Availability
Windows
Usage
mpInstance.width:Number
Returns
An Integer
Description
Notes
None
Example
myMP6.width = 200;
6.22.3.11 MediaPlayer6.x
Availability
Windows
Usage
mpInstance.x:Number
Returns
An Integer
Description
Notes
None
Example
myMP6.x = 200;
6.22.3.12 MediaPlayer6.y
Availability
Windows
Usage
mpInstance.x:Number
Returns
An Integer
Description
Notes
None
Example
myMP6.y = 200;
6.22.4 Events
6.22.4.1 onMPChangeState
Availability
Windows
Usage
mpInstance.onMPChangeState:Function
Parameters
Description
Executes when a video instance changes state. The states returned are as follows:
0 = stopped
1 = paused
2 = playing
Notes
None
Example
myMP6.onMPChangeState = function(myObject){
mdm.Dialogs.prompt(myObject.newState);
}
6.23 mdm.MediaPlayer9
Availability
mdm.MediaPlayer9
Constructor Description
Inserts a Windows Media Player 9 Instance using the
mdm.MediaPlayer9()
specified parameters.
Method Description
MediaPlayer9.close() Closes the video file loaded in the specified instance.
MediaPlayer9.fastForward() Use to Fast Forward the video clip.
Property Description
Sets the balance of the specified Instance to the value of
MediaPlayer9.balance
balance.
Event Description
onWMP9ChangeState Executes when a video instance changes state.
onWMP9Buffering Returns true or false based upon the buffering state.
6.23.1 Constructor
6.23.1.1 mdm.MediaPlayer9()
Availability
Windows
Constructor
Parameters
x:Number X position
y:Number Y Position
Returns
Nothing
Description
Inserts a Windows Media Player 9 Instance using the specified parameters. Multiple Instances can be created.
Notes
a) Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
// t = top
// b = bottom
// l = left
// r = right
// c = center
6.23.2 Methods
6.23.2.1 MediaPlayer9.close()
Availability
Windows
Usage
mpInstance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP9.close();
6.23.2.2 MediaPlayer9.fastForward()
Availability
Windows
Usage
mpInstance.fastForward():Void
Parameters
None
Returns
Nothing
Description
Notes
This command will only work on Media Files that support this function.
Example
myMP9.fastForward();
6.23.2.3 MediaPlayer9.fastReverse()
Availability
Windows
Usage
mpInstance.fastReverse():Void
Parameters
None
Returns
Nothing
Description
Notes
This command will only work on Media Files that support this function.
Example
myMP9.fastReverse();
6.23.2.4 MediaPlayer9.featureAvailable()
Availability
Windows
Usage
mpInstance.featureAvailable(feature:String):Boolean
Parameters
Returns
A Boolean
Description
This command queries the loaded player instance about the available features for the selected media and returns a "true" or
"false" result. The feature parameter can be:
currentitem
currentposition
fastforward
fastreverse
pause
play
previous
stop
Notes
None
Example
6.23.2.5 MediaPlayer9.hide()
Availability
Windows
Usage
mpInstance.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP9.hide();
6.23.2.6 MediaPlayer9.mute()
Availability
Windows
Usage
mpInstance.mute(muteFlag:Boolean):Void
Parameters
Returns
Nothing
Description
Mutes the Media Player if parameter is "true" and unmutes if parameter is "false".
Notes
None
Example
myMP9.mute(true);
6.23.2.7 MediaPlayer9.pause()
Availability
Windows
Usage
mpInstance.pause():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP9.pause();
6.23.2.8 MediaPlayer9.play()
Availability
Windows
Usage
mpInstance.play():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP9.play();
6.23.2.9 MediaPlayer9.show()
Availability
Windows
Usage
mpInstance.show():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP9.show();
6.23.2.10 MediaPlayer9.stop()
Availability
Windows
Usage
mpInstance.stop():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myMP9.stop();
6.23.3 Properties
6.23.3.1 MediaPlayer9.balance
Availability
Windows
Usage
mpInstance.balance:Number
Returns
An Integer
Description
Sets the balance of the specified Instance to the value of balance. The balance is a value from -100 to 100.
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.balance = 0;
6.23.3.2 MediaPlayer9.canScan
Availability
Windows
Usage
mpInstance.canScan:Boolean
Returns
A Boolean
Description
Checks to see if the loaded Media File can scan and returns a "true" or "false" value based upon the result.
Notes
If Scan is available, it means that the Media File will work with MediaPlayer9.position
Example
6.23.3.3 MediaPlayer9.canSeek
Availability
Windows
Usage
mpInstance.canSeek:Boolean
Returns
A Boolean
Description
Checks to see if the loaded Media File can seek and returns a "true" or "false" value based upon the result.
Notes
If Scan is available, it means that the Media File will work with MediaPlayer9.fastForward() and
MediaPlayer9.fastReverse()
Example
6.23.3.4 MediaPlayer9.currentMarker
Availability
Windows
Usage
mpInstance.currentMarker:Number
Returns
An Integer
Description
Notes
b) Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.currentMarker = 0;
6.23.3.5 MediaPlayer9.duration
Availability
Windows
Usage
mpInstance.duration:Number
Returns
An Integer
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
6.23.3.6 MediaPlayer9.height
Availability
Windows
Usage
mpInstance.height:Number
Returns
An Integer
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.height = 200;
6.23.3.7 MediaPlayer9.isInstalled
Availability
Windows
Usage
mpInstance.isInstalled:Boolean
Returns
A Boolean
Description
Checks the existence of Windows Media Player 9 on the users system and return a "true" or "false" value based upon it's
presence.
Notes
None
Example
6.23.3.8 MediaPlayer9.markerCount
Availability
Windows
Usage
mpInstance.markerCount:Number
Returns
An Integer
Description
Returns the number of markers inside the media file specified (If any).
Notes
b) Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
6.23.3.9 MediaPlayer9.mediaName
Availability
Windows
Usage
mpInstance.mediaName:String
Returns
A String
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
6.23.3.10 MediaPlayer9.mediaHeight
Availability
Windows
Usage
mpInstance.mediaHeight:Number
Returns
An Integer
Description
Returns the loaded media height in the Windows Media Player Instance.
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
6.23.3.11 MediaPlayer9.mediaWidth
Availability
Windows
Usage
mpInstance.mediaWidth:Number
Returns
An Integer
Description
Returns the loaded media width in the Windows Media Player Instance.
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
6.23.3.12 MediaPlayer9.position
Availability
Windows
Usage
mpInstance.position:Number
Returns
An Integer
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.position = 10;
6.23.3.13 MediaPlayer9.source
Availability
Windows
Usage
mpInstance.source:Number
Returns
An Integer
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.source = "http://www.mydoamin.com/myFile.wmv";
6.23.3.14 MediaPlayer9.volume
Availability
Windows
Usage
mpInstance.volume:Number
Returns
An Integer
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.volume = 0;
6.23.3.15 MediaPlayer9.visible
Availability
Windows
Usage
mpInstance.visible:Boolean
Returns
A Boolean
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.visible = true;
6.23.3.16 MediaPlayer9.width
Availability
Windows
Usage
mpInstance.width:Number
Returns
An Integer
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.width = 200;
6.23.3.17 MediaPlayer9.x
Availability
Windows
Usage
mpInstance.x:Number
Returns
An Integer
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.x = 200;
6.23.3.18 MediaPlayer9.y
Availability
Windows
Usage
mpInstance.y:Number
Returns
An Integer
Description
Notes
Windows Media Player 9 must be installed on the users system for this command to function correctly.
Example
myMP9.y = 200;
6.23.4 Events
6.23.4.1 onWMP9Buffering
Availability
Windows
Usage
mpInstance.onWMP9Buffering:Function
Parameters
Description
Returns true or false based upon the buffering state (where true means buffering has started, and false means buffering has
finished).
Notes
None
Example
myMP9.onWMP9Buffering = function(myObject){
mdm.Dialogs.prompt(myObject.status);
}
6.23.4.2 onWMP9ChangeState
Availability
Windows
Usage
mpInstance.onWMP9ChangeState:Function
Parameters
Description
Executes when a video instance changes state. The states returned are as follows:
Notes
None
Example
function onWMP9ChangeState(myObject:Object){
mdm.Forms.thisForm.title = myObject.newState;
}
6.23.4.3 onWMP9Error
Availability
Windows
Usage
mpInstance.onWMP9Error:Function
Parameters
Description
Notes
None
Example
myMP9.onWMP9Error = function(myObject){
mdm.Dialogs.prompt(myObject.error);
}
6.23.4.4 onWMP9PositionChanged
Availability
Windows
Usage
mpInstance.onWMP9PositionChanged:Function
Parameters
Description
Executes when a video file position is changed by the user. For example, when a user clicks on the position bar.
Notes
None
Example
myMP9.onWMP9PositionChanged = function(myObject){
mdm.Dialogs.prompt(myObject.newPosition);
}
6.24 mdm.Menu
Availability
mdm.Application.Menu
Object Description
Context Context Menu Object
Main Main Menu Object
6.24.1 Objects
6.24.1.1 Menu.Context
Availability
mdm.Menu.Context
Method Description
Menu.Context.disable() Disables the RIGHT click menu
Menu.Context.enable() Enables the RIGHT click menu
Property Description
Menu.Context.menuType Sets the method to use with custom File Menus.
Event Description
Executes when the user clicks on a context menu item that
onContextMenuClick_*
has previously been created.
6.24.1.1.1 Methods
6.24.1.1.1.1 Menu.Context.disable()
Availability
Windows
Usage
mdm.Menu.Context.disable():Void
Parameters
None
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Context.disable();
6.24.1.1.1.2 Menu.Context.enable()
Availability
Windows
Usage
mdm.Menu.Context.enable():Void
Parameters
None
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Context.enable();
6.24.1.1.1.3 Menu.Context.insertDivider()
Availability
Windows
Usage
mdm.Menu.Context.insertDivider():Void
Parameters
None
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Context.insertDivider();
6.24.1.1.1.4 Menu.Context.insertItem()
Availability
Windows
Usage
mdm.Menu.Context.insertItem(itemLabel:String):Void
Parameters
Returns
Nothing
Description
Notes
c) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
d) To enable a keyboard shortcut for this particular Item, include "&" character before the letter you want to be the shortcut. For
example. $File would make ALT-F the shortcut. $$File would be the same result, but no line under the F charcter would be
visible. (Applies to Windows only)
Example
mdm.Menu.Context.insertItem("Hello World");
6.24.1.1.1.5 Menu.Context.itemChecked()
Availability
Windows
Usage
mdm.Menu.Context.itemChecked(itemLabel:String, checked:Boolean):Void
Parameters
Returns
Nothing
Description
Notes
c) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
Availability
Windows
Usage
mdm.Menu.Context.itemEnabled(itemLabel:String, checked:Boolean):Void
Parameters
Returns
Nothing
Description
Notes
c) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
Availability
Windows
Usage
mdm.Menu.Context.itemVisible(itemLabel:String, checked:Boolean):Void
Parameters
Returns
Nothing
Description
Notes
c) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
Availability
Windows
Usage
mdm.Menu.Context.removeItem(itemLabel:String):Void
Parameters
Returns
Nothing
Description
Notes
c) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
d) To enable a keyboard shortcut for this particular Item, include "&" character before the letter you want to be the shortcut. For
example. $File would make ALT-F the shortcut. $$File would be the same result, but no line under the F charcter would be
visible. (Applies to Windows only)
Example
mdm.Menu.Context.removeItem("Hello World");
6.24.1.1.2 Properties
6.24.1.1.2.1 Menu.Context.menuType
Availability
Windows
Usage
playerInstance.menuType:String
Description
Sets the method to use with custom File Menus. The menuType parameter must be either "function", "variable" or "frame".
When "function" is set, the System Event Function "onContextMenuClick_*" is executed (where * is the name of the menu
item)
When "variable" is set, the File menu Item(s) will set a variable of the same name (with the prefix "menu_") to "false" as
default, and "true" when clicked. For example, the menu item "Open" would set the the variable "menu_Open" to "true".
When "frame" is set, the File menu Item(s) will move the playhead to a frame label of the same name within your movie.
Notes
a) If "frame" is selected as the handler method, the menu Item name must be exactly the same name as a Label within your
Flash Movie. Please note that labels are case sensitive.
b) If "variable" is selected as the handler method, the developer must remember to reset the value to "false" after a "true" value
has been returned.
Example
mdm.Menu.Context.menuType = "function";
6.24.1.1.3 Events
6.24.1.1.3.1 onContextMenuClick_*
Availability
Windows
Usage
mdm.Menu.Context.onContextMenuClick_*:Function
Parameters
Description
Executes when the user clicks on a context menu item that has previously been created.
Notes
a) These events will only execute after the menutype has been set to "function".
b) If your Menu Item includes spaces, full stops or any of the ( ) { } , characters, they must be substituted with an underscore
character in the function name. For example, if you File Menu Item entry is "Open File" the function would be:
onMenuClick_Open_File()
c) If your File Menu Item entry is "Open File..." the function would be: onMenuClick_Open_File___()
d) The Underscore character is a substitute for a space or the ( ) { } , characters ONLY. No other characters are supported at
this time.
Example
mdm.Menu.Context.onContextMenuClick_Hello_World = function(){
mdm.Dialogs.prompt("Hello World!");
}
6.24.1.2 Menu.Main
Availability
mdm.Menu.Main
Method Description
Menu.Main.insertDivider() Inserts a menu divider in the specified menu header.
Menu.Main.insertHeader() Inserts a Title Bar Menu Header for building dynamic
Menus.
Menu.Main.insertItem() Inserts a Menu Item into the specified header.
Checks or unchecks a Menu Item in the specified menu
Menu.Main.itemChecked()
Header.
Enables or disables a Menu Item in the specified menu
Menu.Main.itemEnabled()
Header.
Menu.Main.itemVisible() Hides or shows a Menu Item in the specified menu Header.
Property Description
Menu.Main.menuType Sets the method to use with custom File Menus.
Event Description
onMenuClick_* Executes when the user clicks on a menu item.
6.24.1.2.1 Methods
6.24.1.2.1.1 Menu.Main.insertDivider()
Availability
Usage
mdm.Menu.Main.insertDivider(headerLabel:String):Void
Parameters
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Main.insertDivider("File");
6.24.1.2.1.2 Menu.Main.insertHeader()
Availability
Usage
mdm.Menu.Main.insertHeader(headerLabel:String):Void
Parameters
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
c) To enable a mnemonic for this particular Item, include "&" character before the letter you want to be the shortcut. For
example. &File would make ALT-F the shortcut. &&File would be the same result, but no line under the F character would be
visible. (Applies to Windows only)
Example
mdm.Menu.Main.insertHeader("File");
6.24.1.2.1.3 Menu.Main.insertItem()
Availability
Usage
mdm.Menu.Main.insertItem(headerLabel:String, itemLabel:String):Void
Parameters
Returns
Nothing
Description
Inserts a Menu Item into the specified header. A Header must first be created using mdm.Menu.Main.insertHeader()
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
c) To enable a keyboard shortcut for this particular Item, include "&" character before the letter you want to be the shortcut. For
example. $File would make ALT-F the shortcut. $$File would be the same result, but no line under the F character would be
visible. (Applies to Windows only)
Example
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
Availability
Usage
Parameters
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
Availability
Usage
mdm.Menu.Main.removeHeader(headerLabel:String):Void
Parameters
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Main.removeHeader("File");
6.24.1.2.1.8 Menu.Main.removeItem()
Availability
Usage
mdm.Menu.Main.removeItem(headerLabel:String, itemLabel:String):Void
Parameters
Returns
Nothing
Description
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
6.24.1.2.2.1 Menu.Main.menuType
Availability
Windows
Usage
mdm.Menu.Main.menuType:String
Description
Sets the method to use with custom File Menus. The menuType parameter must be either "function", "variable" or "frame".
When "function" is set, the System Event Function "onMenuClick_*" is executed (where * is the name of the menu item)
When "variable" is set, the File menu Item(s) will set a variable of the same name (with the prefix "menu_") to "false" as
default, and "true" when clicked. For example, the menu item "Open" would set the the variable "menu_Open" to "true".
When "frame" is set, the File menu Item(s) will move the playhead to a frame label of the same name within your movie.
Notes
a) If "frame" is selected as the handler method, the menu Item name must be exactly the same name as a Label within your
Flash Movie. Please note that labels are case sensitive.
b) If "variable" is selected as the handler method, the developer must remember to reset the value to "false" after a "true" value
has been returned.
Example
mdm.Menu.Main.menuType = "function";
6.24.1.2.3 Events
6.24.1.2.3.1 onMenuClick_*
Availability
Usage
mdm.Menu.Main.onContextMenuClick_*:Function
Parameters
None
Description
Notes
a) These events will only execute after the menutype has been set to "function".
b) If your Menu Item includes spaces, full stops or any of the ( ) { } , characters, they must be substituted with an underscore
character in the function name. For example, if you File Menu Item entry is "Open File" the function would be:
onMenuClick_Open_File()
c) If your File Menu Item entry is "Open File..." the function would be: onMenuClick_Open_File___()
d) The Underscore character is a substitute for a space or the ( ) { } , characters ONLY. No other characters are supported at
this time.
Example
mdm.Menu.Main.onMenuClick_Open_File = function(){
mdm.Dialogs.prompt("Open File");
}
6.24.1.3 Menu.Tray
vailability
mdm.Menu.Tray
Method Description
Menu.Tray.hideIcon() Hides the Tray Icon.
Menu.Tray.insertDivider() Inserts a menu divider in the Tray Icon menu.
Property Description
Menu.Tray.menuType Sets the method to use with custom File Menus.
Event Description
onTrayMenuClick_* Executes when the user clicks on a tray menu item.
6.24.1.3.1 Methods
6.24.1.3.1.1 Menu.Tray.hideIcon()
Availability
Windows
Usage
mdm.Menu.Tray.hideIcon():Void
Parameters
None
Returns
Nothing
Description
Notes
When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Tray.hideIcon();
6.24.1.3.1.2 Menu.Tray.insertDivider()
Availability
Windows
Usage
mdm.Menu.Tray.insertDivider():Void
Parameters
None
Returns
Nothing
Description
Notes
When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Tray.insertDivider();
6.24.1.3.1.3 Menu.Tray.insertItem()
Availability
Windows
Usage
mdm.Menu.Tray.insertItem(itemLabel:String):Void
Parameters
Returns
Nothing
Description
Inserts a Menu Item into the Tray Icon which can be accessed by right clicking on the icon.
Notes
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Tray.insertItem("Hello World");
6.24.1.3.1.4 Menu.Tray.itemChecked()
Availability
Windows
Usage
mdm.Menu.Tray.itemChecked(itemLabel:String, checked:Boolean):Void
Parameters
Returns
Nothing
Description
Checks or unchecks a Tray Menu Item. The state parameter can be either "true" or "false".
Notes
a) The trayMenuItem name must be exactly the same name as a Label within your Flash Movie. Please note that labels are
case sensitive.
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
Availability
Windows
Usage
mdm.Menu.Tray.itemEnabled(itemLabel:String, enabled:Boolean):Void
Parameters
Returns
Nothing
Description
Enables or disables a Tray Menu Item. The state parameter can be either "true" or "false".
Notes
a) The trayMenuItem name must be exactly the same name as a Label within your Flash Movie. Please note that labels are
case sensitive.
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
6.24.1.3.1.6 Menu.Tray.itemVisible()
Availability
Windows
Usage
mdm.Menu.Tray.itemVisible(itemLabel:String, visible:Boolean):Void
Parameters
Returns
Nothing
Description
Hides or Shows a Tray Menu Item. The state parameter can be either "true" or "false".
Notes
a) The trayMenuItem name must be exactly the same name as a Label within your Flash Movie. Please note that labels are
case sensitive.
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
Availability
Windows
Usage
mdm.Menu.Tray.removeItem(itemLabel:String):Void
Parameters
Returns
Nothing
Description
Notes
a) The trayMenuItem name must be exactly the same name as a Label within your Flash Movie. Please note that labels are
case sensitive.
b) When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Tray.removeItem("Hello World");
6.24.1.3.1.8 Menu.Tray.setIcon()
Availability
Windows
Usage
mdm.Menu.Tray.setIcon(filePath:String):Void
Parameters
Returns
Nothing
Description
Notes
When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Tray.setIcon("c:\\myIcon.ico");
6.24.1.3.1.9 Menu.Tray.showBalloon()
Availability
Windows
Usage
mdm.Menu.Tray.showBalloon(balloonTitle:String, balloonText:String,
balloonIconType:String, BalloonTimeout:Number, balloonFrameLabel:String):Void
Parameters
balloonIconType:String Path Balloon icon type. One of constants: "none", "error", "warning" and "info".
Returns
Nothing
Description
will display an XP style tray icon balloon, using the specified parameters:
frameLabel is the name of a label within your Flash Movie that the playhead will go to when the tray icon balloon is clicked. If
you do not wish the playhead to move anywhere when the balloon is clicked, simply leave this variable empty. ie. ""
Notes
a) After the specified timeout period has passed the balloon closes automatically.
Example
Availability
Windows
Usage
mdm.Menu.Tray.showIcon():Void
Parameters
None
Returns
Nothing
Description
Notes
When using Menu Items with a Skinned Projector, it is recommended that you initiate a Custom File Menu on Frame 2 or
higher.
Example
mdm.Menu.Tray.showIcon();
6.24.1.3.2 Properties
6.24.1.3.2.1 Menu.Tray.menuType
Availability
Windows
Usage
mdm.Menu.Tray.menuType:String
Description
Sets the method to use with custom File Menus. The menuType parameter must be either "function", "variable" or "frame".
When "function" is set, the System Event Function "onTrayMenuClick_*" is executed (where * is the name of the menu item)
When "variable" is set, the File menu Item(s) will set a variable of the same name (with the prefix "menu_") to "false" as
default, and "true" when clicked. For example, the menu item "Open" would set the the variable "menu_Open" to "true".
When "frame" is set, the File menu Item(s) will move the playhead to a frame label of the same name within your movie.
Notes
a) If "frame" is selected as the handler method, the menu Item name must be exactly the same name as a Label within your
Flash Movie. Please note that labels are case sensitive.
b) If "variable" is selected as the handler method, the developer must remember to reset the value to "false" after a "true" value
has been returned.
Example
mdm.Menu.Tray.menuType = "function";
6.24.1.3.2.2 Menu.Tray.iconHint
Availability
Windows
Usage
mdm.Menu.Tray.iconHint:String
Description
Notes
Example
6.24.1.3.3.1 onTrayMenuClick_*
Availability
Windows
Usage
mdm.Menu.Tray.onTrayMenuClick_*:Function
Parameters
Description
Notes
a) These events will only execute after the menutype has been set to "function".
b) If your Menu Item includes spaces, full stops or any of the ( ) { } , characters, they must be substituted with an underscore
character in the function name. For example, if you File Menu Item entry is "Open File" the function would be:
onMenuClick_Open_File()
c) If your File Menu Item entry is "Open File..." the function would be: onMenuClick_Open_File___()
d) The Underscore character is a substitute for a space or the ( ) { } , characters ONLY. No other characters are supported at
this time.
Example
mdm.Menu.Tray.onTrayMenuClick_Hello_World = function(){
mdm.Dialogs.prompt("Hello World!");
}
6.25 mdm.Network
Availability
mdm.Net
Object Description
HTTPD HTTPD Object
Mail Mail Object
Method Description
Network.checkConnection() Checks for presence of an Internet Connection.
Network.checkConnectionAdv() Checks for presence of an Internet Connection in more
detail.
Uses an internal Ping request to check the connection of
Network.checkConnectionPing()
an internet presence.
Returns the Host Name for the specified IP address (if
Network.getHostByIP()
available).
Returns the IP address for the specified Host Name (if
Network.getIPByHost()
available).
Network.getMacAddress() Returns the MAC address of the specified adapter.
Will open a new external browser window with the URL
Network.getURL()
specified.
Properties Description
Network.IPAddress Returns the system IP address.
Network.isPresent Will check for the presence of a Network.
6.25.1 Objects
6.25.1.1 Network.HTTPD
Availability
mdm.Network.HTTPD
Method Description
Network.HTTPD.resume() Resets the HTTP preprocessor.
Network.HTTPD.startServer() Starts the HTTP server for http remote control of your
Projector.
Stops the HTTP server for http remote control of your
Network.HTTPD.stopServer()
Projector.
Sets the response message for a successful HTTP
Network.HTTPD.setResponse()
transfer.
Event Description
onRequest Executes when a HTTP Server Request is made.
6.25.1.1.1 Methods
6.25.1.1.1.1 Network.HTTPD.resume()
Availability
Windows
Usage
mdm.Network.HTTPD.resume():Void
Parameters
None
Returns
Nothing
Description
Resets the HTTP preprocessor. This command is MANDATORY in that it makes that particular session end and conclude its
cycle. It has to be manually run every time the processing of information is finished and the HTTPD.setResponse() has
been run to update the response data, otherwise the client side browser would be waiting to infinity or timeout.
Notes
Example
mdm.Network.HTTPD.resume();
6.25.1.1.1.2 Network.HTTPD.setResponse()
Availability
Windows
Usage
mdm.Network.HTTPD.setResponse(responseString:String):Void
Parameters
Returns
Nothing
Description
Sets the response message for a successful HTTPD transfer. This can be any type of string, including any character,
combined from calculated data and/or database origin.
Notes
None
Example
mdm.Network.HTTPD.setResponse("Task completed");
6.25.1.1.1.3 Network.HTTPD.startServer()
Availability
Windows
Usage
mdm.Network.HTTPD.startServer(serverPort:Number):Void
Parameters
serverPort:Number Port on which server will be listening. An empty string will default to port 80.
Returns
Nothing
Description
Starts the http server for HTTP remote control of your Projector. The projector can be controlled using the following syntax in
http://127.0.0.1?get&info - will return the contents of the variable info to the browser
Notes
None
Example
mdm.Network.HTTPD.startServer(8080);
6.25.1.1.1.4 Network.HTTPD.stopServer()
Availability
Windows
Usage
mdm.Network.HTTPD.stopServer():Void
Parameters
None
Returns
Nothing
Description
Stops the HTTPD server for HTTP remote control of your Projector.
Notes
None
Example
mdm.Network.HTTPD.stopServer();
6.25.1.1.2 Events
6.25.1.1.2.1 onRequest
Availability
Windows
Usage
httpServerInstance.onRequest:Function
Parameters
Description
Notes
None
Example
httpServerInstance.onRequest = function(myObject){
mdm.Dialogs.prompt(myObject.document)
mdm.Dialogs.prompt(myObject.parameters)
mdm.Dialogs.prompt(myObject.remoteIP)
}
6.25.1.2 Network.Mail
Availability
mdm.Network.Mail
Method Description
Sends a new email message using the specified SMTP
Network.Mail.send()
server.
Sends a new email message using the specified SMTP
Network.Mail.sendNoAuth()
server. For use when no Authorization is needed.
Opens a new email using the clients default mail
Network.MAil.sendClientSide()
application.
6.25.1.2.1 Methods
6.25.1.2.1.1 Network.Mail.send()
Availability
Usage
Parameters
Returns
Nothing
Description
Sends a new email message using the specified SMTP server specified. This method works best when used for feedback
forms to a static email address.
Notes
a) Please note that commas "," are currently not supported in the message attribute. Please do not use commas. Multiple
attachments can be added by delimiting them with a ";" character. eg. c:\\test.zip;d:\\folder\\test2.zip - "to" and "bcc" can also
have multiple values, delimited with the ";" character.
b) To send a HTML email, simply enter the value "html" in the attachments parameter and ensure that the body is correctly
formatted HTML. When sending HTML emails, it is not possible to send attachments.
Example
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Sends a new email message using the specified SMTP server specified. This method works best when used for feedback
forms to a static email address.
Notes
a) Please note that commas "," are currently not supported in the message attribute. Please do not use commas. Multiple
attachments can be added by delimiting them with a ";" character. eg. c:\\test.zip;d:\\folder\\test2.zip - "to" and "bcc" can also
have multiple values, delimited with the ";" character.
b) To send a HTML email, simply enter the value "html" in the attachments parameter and ensure that the body is correctly
formatted HTML. When sending HTML emails, it is not possible to send attachments.
c) Use this command ONLY if your SMTP server does not require authentication.
Example
6.25.1.2.1.3 Network.Mail.sendClientSide()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Opens a new email using the clients default mail application with all options filled in, ready to send.
Notes
Commas (",") are currently not supported in the message attribute. Multiple attachments can be added by delimiting them with
a ";" character. eg. c:\\test.zip;d:\\folder\\test2.zip
Example
mdm.Network.Mail.sendClientSide("recipient@anotherdomain.com", "This is my
Subject", "Hello World", "c:\\myfile.jpg");
6.25.1.3 Network.TCP
Availability
mdm.Network.TCP
Object Description
FileServer FileServer Object
ProxyHTTP ProxyHTTP Object
6.25.1.3.1 Objects
6.25.1.3.1.1 Network.TCP.FileServer
Availability
mdm.Network.TCP.FileServer
Method Description
Network.TCP.FileServer.getFile() Will retrieve the File from the specified Remote System.
Network.TCP.FileServer.getFileList() Retrieves a File List from the Remote System.
Network.TCP.FileServer.getFolderList(
Retrieves a Folder List from the Remote System.
)
Network.TCP.FIleServer.sendFile() Will transfer a File using the TCP protocol.
Availability
Windows
Usage
mdm.Network.TCP.FileServer.getFile(remoteIPAddress:String, remotePortNumber:Number,
remoteFilePath:String, localFilePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
Availability
Windows
Usage
mdm.Network.TCP.FileServer.getFileList(remoteIPAddress:String,
remotePortNumber:Number, remoteBaseFolder:String):Array
Parameters
Returns
An Array
Description
Retrieves an Array of all files in the Folder specified on the remote computer.
Notes
None
Example
Availability
Windows
Usage
mdm.Network.TCP.FileServer.getFolderList(remoteIPAddress:String,
remotePortNumber:Number, remoteBaseFolder:String):String
Parameters
Returns
An Array
Description
Retrieves an Array of all folders in the Folder Specified on the remote computer.
Notes
None
Example
Availability
Windows
Usage
mdm.Network.TCP.FileServer.sendFile(remoteIPAddress:String,
remotePortNumber:Number, localIPAddress:String, localPortNumber:Number,
localFilePath:String, remoteFilePath:String):Void
Parameters
Returns
Nothing
Description
Will transfer a file from the local system to the remote system using the TCP protocol.
Notes
When executed, sets a PPSV (variable) called "mdm_tcpfiletransfer". The value to this PPSV is either "true" if the transfer has
finished or "false" if the transfer is still in progress.
Example
Availability
Windows
Usage
mdm.Network.TCP.FileServer.startServer(localPortNumber:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Network.TCP.FileServer.startServer(4000);
Availability
Windows
Usage
mdm.Network.TCP.FileServer.stopServer():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.Network.TCP.FileServer.stopServer();
6.25.1.3.1.2 Network.TCP.ProxyHTTP
Availability
mdm.Network.TCP.ProxyHTTP
Method Description
Network.TCP.ProxyHTTP.getFile() Downloads a HTTP file through a Proxy.
Network.TCP.ProxyHTTP.getString() Downloads a File directly to a String through a Proxy.
Availability
Windows
Usage
mdm.Network.TCP.ProxyHTTP.getFile(serverName:String, remoteFilePath:String,
localFilePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Network.TCP.ProxyHTTP.getFile("www.mydomain.com", "/remote.txt",
"c:\\local.txt");
Availability
Windows
Usage
mdm.Network.TCP.ProxyHTTP.getString(serverName:String, remoteFilePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.Network.TCP.ProxyHTTP.getString("www.mydomain.com", "/remote.txt");
Availability
Windows
Usage
mdm.Network.TCP.ProxyHTTP.setProxy(proxyType:String, proxyServerAddress:String,
proxyServerPortNumber:Number, username:String, password:String):Void
Parameters
Returns
Nothing
Description
Sets the type of HTTP connection to use if the connection is behind a proxy server. Valid values for proxyType are: "0" - Basic
Authentication Disabled or "1" - Basic Authentication Enabled.
Notes
None
Example
6.25.1.4 Network.UDP
Zinc 2.5 (Windows)
mdm.Network.UDP
Object Description
Socket Socket Object
TFTP TFTP Object
6.25.1.4.1 Objects
6.25.1.4.1.1 Network.UDP.Socket
Availability
mdm.Network.TCP.FileServer
Method Description
Network.UDP.Socket.broadcast() Broadcasts a message across a specific Port.
Network.UDP.Socket.send() Sends a message to a specific IP Address.
Event Description
onData Executes when UDP Data is Received.
Availability
Windows
Usage
mdm.Network.UDP.Socket.broadcast(remotePortNumber:Number, messageText:String):Void
Parameters
Returns
Nothing
Description
Broadcasts the contents of the variable message to the specified Port number.
Notes
This command will broadcast to all systems on the same network so an IP address is not required.
Example
// receivedText is a var on the recipient side which receive the String 'Hello
World'
Availability
Windows
Usage
mdm.Network.UDP.Socket.send(remoteIPAddress:String, remotePortNumber:Number,
messageText:String):Void
Parameters
Returns
Nothing
Description
Sends the contents of the variable messageText to the specified IP and Port number via UDP protocol.
Notes
None
Example
// receivedText is a var on the recipient side which receive the String 'Hello
World'
Availability
Windows
Usage
mdm.Network.UDP.Socket.startServer(localPortNumber:Number):Void
Parameters
Returns
Nothing
Description
Enables listening to the specified port number. When set, the projector will start listening for incoming packets.
Notes
None
Example
mdm.Network.UDP.Socket.startServer(4000);
Availability
Windows
Usage
mdm.Network.UDP.Socket.stopServer():Void
Parameters
None
Returns
Nothing
Description
Disables listening. When set, the projector will stop listening for incoming packets.
Notes
None
Example
mdm.Network.UDP.Socket.stopServer();
Availability
Windows
Usage
mdm.Network.UDP.Socket.onData:Function
Parameters
Description
Notes
None
Example
mdm.Network.UDP.Socket.onData = function(myObject){
mdm.Dialogs.prompt(myObject.data);
}
6.25.1.4.1.2 Network.UDP.TFTP
Availability
mdm.Network.UDP.TFTP
Method Description
Network.UDP.TFTP.abort() Aborts the transfer.
Network.UDP.TFTP.getFile() Gets a File from the Host Projector
Network.UDP.TFTP.setBlockSize() Sets the TFTP block size in bytes to the specified value.
Sets the TFTP timeout in miliseconds to the specified
Network.UDP.TFTP.setTimeOut()
value.
Network.UDP.TFTP.setTransferMode() Sets the TFTP Transfer mode to the specified value.
Starts the File Server for transfer of files using the TFTP
Network.UDP.TFTP.startServer()
Protocol.
Stops the File Server for transfer of files between
Network.UDP.TFTP.stopServer()
projectors.
Availability
Windows
Usage
mdm.Network.UDP.TFTP.abort():Void
Parameters
None
Returns
Nothing
Description
Aborts the transfer. Use error trapping to supress the timeout error which may occur when this command is used. For more
info on the TFTP protocol, and how to optimize it:
Notes
None
Example
mdm.Network.UDP.TFTP.abort();
Availability
Windows
Usage
mdm.Network.UDP.TFTP.getFile(remoteIPAddress:String, remotePortNumber:Number,
localFilePath:String, remoteFilePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
Availability
Windows
Usage
mdm.Network.UDP.TFTP.getProgressCurrent():Number
Parameters
None
Returns
An Integer.
Description
Notes
None
Example
Availability
Windows
Usage
mdm.Network.UDP.TFTP.getProgressMax():Number
Parameters
None
Returns
An Integer.
Description
Returns the Total size of the file to be transfered. For more info on the TFTP protocol, and how to optimize it:
Notes
None
Example
Availability
Windows
Usage
mdm.Network.UDP.TFTP.sendFile(remoteIPAddress:String, remotePortNumber:Number,
localFilePath:String, remoteFilePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
Availability
Windows
Usage
mdm.Network.UDP.TFTP.setBuffer():Void
Parameters
bufferSize:Number
Returns
Nothing
Description
Notes
None
Example
mdm.Network.UDP.TFTP.setBuffer(5000);
Availability
Windows
Usage
mdm.Network.UDP.TFTP.setBlockSize(blockSize:Number):Void
Parameters
Returns
Nothing
Description
Sets the tftp block size in bytes to the specified value. The default size is 1500.
Notes
For more info on the TFTP protocol, and how to optimize it:
Example
mdm.Network.UDP.TFTP.setBlockSize(1500);
Availability
Windows
Usage
mdm.Network.UDP.TFTP.setTimeout(timeout:Number):Void
Parameters
Returns
Nothing
Description
Sets the tftp timeout in miliseconds to the specified value. The default timeout is 4000.
Notes
For more info on the TFTP protocol, and how to optimize it:
Example
mdm.Network.UDP.TFTP.setTimeout(4000);
Availability
Windows
Usage
mdm.Network.UDP.TFTP.setTransferMode(transferMode:String):Void
Parameters
Returns
Nothing
Description
Sets the TFTP transfer mode to the specified value. Possible values of transferMode are: "Octet" or "Ascii"
Notes
For more info on the TFTP protocol, and how to optimize it:
Example
mdm.Network.UDP.TFTP.setTransferMode("Octet");
Availability
Windows
Usage
mdm.Network.UDP.TFTP.startServer(localPortNumber:Number):Void
Parameters
Returns
Nothing
Description
Starts the file server for transfer of files between projectors on the port number specified in the variable port. Uses TFTP
Protocol.
Notes
For more info on the TFTP protocol, and how to optimize it:
Example
mdm.Network.UDP.TFTP.startServer(4000);
Availability
Windows
Usage
mdm.Network.UDP.TFTP.stopServer():Void
Parameters
None
Returns
Nothing
Description
Notes
For more info on the TFTP protocol, and how to optimize it:
Example
mdm.Network.UDP.TFTP.stopServer();
6.25.2 Methods
6.25.2.1 Network.checkConnection()
Availability
Usage
mdm.Network.checkConnection():Boolean
Parameters
None
Returns
A Boolean
Description
Returns True or False to the variable connected based upon the presence of an Internet Connection.
Notes
None
Example
6.25.2.2 Network.checkConnectionAdv()
Availability
Windows
Usage
mdm.Network.checkConnectionAdv():String
Parameters
None
Returns
A String
Description
Returns a string to the variable connected based upon the presence of an Internet Connection.
Notes
The string returned is either "Connected through LAN","Connected through modem","Proxy server configured" or "Not
connected"
Example
6.25.2.3 Network.checkConnectionPing()
Availability
Windows
Usage
mdm.Network.checkConnectionPing(remoteAddress:String, timeout:Number):Boolean
Parameters
Returns
A Boolean
Description
Notes
This command uses an internal Ping request to check the connection of an internet presence. The timeout can be set to any
amount in miliseconds, but we recommend using at least 2000 miliseconds for accurate results. The remoteAddress variable
can also be an IP address.
Example
6.25.2.4 Network.getHostByIP()
Availability
Usage
mdm.Network.getHostByIP(ip:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.25.2.5 Network.getIPByHost()
Availability
Usage
mdm.Network.getIPByHost(hostName:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.25.2.6 Network.getMACAddress()
Availability
Usage
mdm.Network.getMACAddress(adapterID:Number):String
Parameters
Returns
A String
Description
Returns the MAC address of the specified adapter to the variable result. adapterID must be a value from 0 upwards.
Notes
None
Example
6.25.2.7 Network.getURL()
Availability
Windows
Usage
mdm.Network.getURL(url:String):Void
Parameters
Returns
A String
Description
Will open a new external browser window with the URL specified.
Notes
None
Example
mdm.Network.getURL("http://www.multidmedia.com");
6.25.3 Properties
Enter topic text here.
6.25.3.1 Network.IPAddress
Availability
Windows
Usage
mdm.Network.IPAddress:String
Description
Notes
None
Example
6.25.3.2 Network.isPresent
Availability
Windows
Usage
mdm.Network.isPresent:Boolean
Description
Will contain a "true" or "false" value based upon the presence of a Network.
Notes
None
Example
6.26 mdm.PDF6
Availability
mdm.PDF
Constructor Description
loads an instance of Adobe Acrobat Reader 6 using the
mdm.PDF6()
specified parameters.
Method Description
PDF6.close() Closes the specified PDF Instance
PDF6.firstPage() Goes to the first page in the loaded PDF document.
Property Description
PDF6.height Height of loaded PDF in pixels.
6.26.1 Constructor
6.26.1.1 mdm.PDF6()
Availability
Windows
Constructor
Parameters
x:Number X position
y:Number Y Position
Returns
Nothing
Description
loads an instance of Adobe Acrobat Reader 6 using the specified parameters. Multiple Instances can be created.
Notes
Adobe Acrobat Reader 6 must be installed on the users system for this command to function correctly.
Example
// t = top
// b = bottom
// l = left
// r = right
// c = center
6.26.2 Methods
6.26.2.1 PDF6.close()
Availability
Windows
Usage
pdf6Instance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.close();
6.26.2.2 PDF6.firstPage()
Availability
Windows
Usage
pdf6Instance.firstPage():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.firstPage();
6.26.2.3 PDF6.hide()
Availability
Windows
Usage
pdf6Instance.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.hide();
6.26.2.4 PDF6.lastPage()
Availability
Windows
Usage
pdf6Instance.lastPage():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.lastPage();
6.26.2.5 PDF6.loadFile()
Availability
Windows
Usage
pdf6Instance.loadFile(filePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myPDF.loadFile("c:\\myFile.pdf");
6.26.2.6 PDF6.nextPage()
Availability
Windows
Usage
pdf6Instance.nextPage():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.nextPage();
6.26.2.7 PDF6.print()
Availability
Windows
Usage
pdf6Instance.print():Void
Parameters
None
Returns
Nothing
Description
Prints the current page of the PDF instance. This command does not show a print dialog.
Notes
None
Example
myPDF.print();
6.26.2.8 PDF6.printWithDialog()
Availability
Windows
Usage
pdf6Instance.printWithDialog():Void
Parameters
None
Returns
Nothing
Description
Prints the current page of the PDF instance. This command will show a print dialog.
Notes
None
Example
myPDF.printWithDialog();
6.26.2.9 PDF6.printAll()
Availability
Windows
Usage
pdf6Instance.printAll():Void
Parameters
None
Returns
Nothing
Description
Prints the entire document of the PDF instance. This command does not show a print dialog.
Notes
None
Example
myPDF.printAll();
6.26.2.10 PDF6.printPages()
Availability
Windows
Usage
pdf6Instance.printPages(printFromPage:Number, printToPage:Number):Void
Parameters
Returns
Nothing
Description
Prints the pages specified in the variables from and to of the PDF instance. This command does not show a print dialog.
Notes
None
Example
myPDF.printPages(1, 5);
6.26.2.11 PDF6.previousPage()
Availability
Windows
Usage
pdf6Instance.previousPage():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.previousPage();
6.26.2.12 PDF6.setCurrentPage()
Availability
Windows
Usage
pdf6Instance.setCurrentPage(targetPage:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myPDF.setCurrentPage(5);
6.26.2.13 PDF6.show()
Availability
Windows
Usage
pdf6Instance.show():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.show();
6.26.3 Properties
6.26.3.1 PDF6.height
Availability
Windows
Usage
pdf6Instance.height:Number
Returns
An Integer
Description
Notes
None
Example
myPDF.height = 300;
6.26.3.2 PDF6.scrollbars
Availability
Windows
Usage
pdf6Instance.scrollbars:Boolean
Returns
A Boolean
Description
Notes
None
Example
myPDF.scrollbars = true;
6.26.3.3 PDF6.toolbar
Availability
Windows
Usage
pdf6Instance.toolbar:Boolean
Returns
A Boolean
Description
Notes
None
Example
myPDF.toolbar = true;
6.26.3.4 PDF6.visible
Availability
Windows
Usage
pdf6Instance.visible:Boolean
Returns
A Boolean
Description
Notes
None
Example
myPDF.visible = true;
6.26.3.5 PDF6.width
Availability
Windows
Usage
pdf6Instance.width:Number
Returns
An Integer
Description
Notes
None
Example
myPDF.width = 300;
6.26.3.6 PDF6.x
Availability
Windows
Usage
pdf6Instance.x:Number
Returns
An Integer
Description
Notes
None
Example
To Get the X:
To Set the X:
myPDF.x = 0;
6.26.3.7 PDF6.y
Availability
Windows
Usage
pdf6Instance.y:Number
Returns
An Integer
Description
Notes
None
Example
To Get the Y:
To Set the Y:
myPDF.y = 0;
6.27 mdm.PDF7
Availability
mdm.PDF7
Constructor Description
loads an instance of Adobe Acrobat Reader 7 using the
mdm.PDF7()
specified parameters.
Method Description
PDF7.close() Closes the specified PDF Instance
PDF7.firstPage() Goes to the first page in the loaded PDF document.
Property Description
PDF7.height Height of loaded PDF in pixels.
PDF7.scrollbars Will show or hide the scrollbars in the specified PDF
instance.
PDF7.toolbar Will show or hide the toolbar in the specified PDF instance.
6.27.1 Constructor
6.27.1.1 mdm.PDF7()
Availability
Windows
Constructor
Parameters
x:Number X position
y:Number Y Position
Returns
Nothing
Description
loads an instance of Adobe Acrobat Reader 7 using the specified parameters. Multiple Instances can be created.
Notes
Adobe Acrobat Reader 7 must be installed on the users system for this command to function correctly.
Example
// t = top
// b = bottom
// l = left
// r = right
// c = center
6.27.2 Methods
6.27.2.1 PDF7.close()
Availability
Windows
Usage
pdf7Instance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.close();
6.27.2.2 PDF7.firstPage()
Availability
Windows
Usage
pdf7Instance.firstPage():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.firstPage();
6.27.2.3 PDF7.hide()
Availability
Windows
Usage
pdf7Instance.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.hide();
6.27.2.4 PDF7.lastPage()
Availability
Windows
Usage
pdf7Instance.lastPage():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.lastPage();
6.27.2.5 PDF7.loadFile()
Availability
Windows
Usage
pdf7Instance.loadFile(filePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myPDF.loadFile("c:\\myFile.pdf");
6.27.2.6 PDF7.nextPage()
Availability
Windows
Usage
pdf7Instance.nextPage():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.nextPage();
6.27.2.7 PDF7.print()
Availability
Windows
Usage
pdf7Instance.print():Void
Parameters
None
Returns
Nothing
Description
Prints the current page of the PDF instance. This command does not show a print dialog.
Notes
None
Example
myPDF.print();
6.27.2.8 PDF7.printWithDialog()
Availability
Windows
Usage
pdf7Instance.printWithDialog():Void
Parameters
None
Returns
Nothing
Description
Prints the current page of the PDF instance. This command will show a print dialog.
Notes
None
Example
myPDF.printWithDialog();
6.27.2.9 PDF7.printAll()
Availability
Windows
Usage
pdf7Instance.printAll():Void
Parameters
None
Returns
Nothing
Description
Prints the entire document of the PDF instance. This command does not show a print dialog.
Notes
None
Example
myPDF.printAll();
6.27.2.10 PDF7.printPages()
Availability
Windows
Usage
pdf7Instance.printPages(printFromPage:Number, printToPage:Number):Void
Parameters
Returns
Nothing
Description
Prints the pages specified in the variables from and to of the PDF instance. This command does not show a print dialog.
Notes
None
Example
myPDF.printPages(1, 5);
6.27.2.11 PDF7.previousPage()
Availability
Windows
Usage
pdf7Instance.previousPage():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.previousPage();
6.27.2.12 PDF7.setCurrentPage()
Availability
Windows
Usage
pdf7Instance.setCurrentPage(targetPage:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myPDF.setCurrentPage(5);
6.27.2.13 PDF7.show()
Availability
Windows
Usage
pdf7Instance.show():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myPDF.show();
6.27.3 Properties
6.27.3.1 PDF7.height
Availability
Windows
Usage
pdf7Instance.height:Number
Returns
An Integer
Description
Notes
None
Example
myPDF.height = 300;
6.27.3.2 PDF7.scrollbars
Availability
Windows
Usage
pdf7Instance.scrollbars:Boolean
Returns
A Boolean
Description
Notes
None
Example
myPDF.scrollbars = true;
6.27.3.3 PDF7.toolbar
Availability
Windows
Usage
pdf7Instance.toolbar:Boolean
Returns
A Boolean
Description
Notes
None
Example
myPDF.toolbar = true;
6.27.3.4 PDF7.visible
Availability
Windows
Usage
pdf7Instance.visible:Boolean
Returns
A Boolean
Description
Notes
None
Example
myPDF.visible = true;
6.27.3.5 PDF7.width
Availability
Windows
Usage
pdf7Instance.width:Number
Returns
An Integer
Description
Notes
None
Example
myPDF.width = 300;
6.27.3.6 PDF7.x
Availability
Windows
Usage
pdf7Instance.x:Number
Returns
An Integer
Description
Notes
None
Example
To Get the X:
To Set the X:
myPDF.x = 0;
6.27.3.7 PDF7.y
Availability
Windows
Usage
pdf7Instance.y:Number
Returns
An Integer
Description
Notes
None
Example
To Get the Y:
To Set the Y:
myPDF.y = 0;
6.28 mdm.Process
Availability
mdm.Process
Method Description
Closes the application (process) that was previously
Process.close()
launched.
Process.create() Executes an application with custom parameters and
creates a process for the application.
Property Description
Returns "true" or "false" based upon the existence of a
Process.isOpen
Process.
Process.lastId Returns the PID process ID of the last Executed
Application.
6.28.1 Methods
6.28.1.1 Process.close()
Availability
Windows
Usage
mdm.Process.close():Void
Parameters
None
Returns
Nothing
Description
Closes the application that was previously launched by using the Process.create() command.
Notes
Example
mdm.Process.close()
6.28.1.2 Process.create()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Executes an application with custom parameters and creates a process for the application.
Notes
None
Example
6.28.1.3 Process.kill()
Availability
Windows
Usage
mdm.Process.kill():Void
Parameters
None
Returns
Nothing
Description
Forcefully closes (kills) the application that was previously launched by the Process.create() command.
Notes
Example
mdm.Process.kill()
6.28.1.4 Process.killById()
Availability
Windows
Usage
mdm.Process.killById(id:Number, timeout:Number):Void
Parameters
timeout:Number Value set in milliseconds which forces the task to close if the initial request was not executed
Returns
Nothing
Description
Notes
You can retrieve the ID of the last Application launched with Process.lastId
Example
mdm.Process.killById(1, 5000)
6.28.2 Properties
6.28.2.1 Process.isOpen
Availability
Windows
Usage
mdm.Process.isOpen:Boolean
Returns
A Boolean
Description
Example
6.28.2.2 Process.lastId
Availability
Windows
Usage
mdm.Process.lastId:Number
Returns
An Integer
Description
Returns the PID process ID of the last Executed Application with Process.create()
Example
6.29 mdm.QuickTime
Availability
mdm.QuickTime
Constructor Description
Inserts a QuickTime Player Instance using the specified
mdm.QuickTime()
parameters.
Method Description
QuickTime.close() Closes the QuickTime file loaded in the specified instance.
QuickTime.hide() Will hide the QuickTime Instance.
Property Description
QuickTime.duration Returns the total length of the QuickTime Movie.
QuickTime.height Height of QuickTime Instance.
6.29.1 Constructor
6.29.1.1 mdm.QuickTime()
Availability
Windows
Constructor
Parameters
x:Number X position
y:Number Y Position
Returns
Nothing
Description
Inserts a QuickTime Player Instance using the specified parameters. Multiple Instances can be created.
Notes
a) Quicktime 6 or higher must be installed on the users system for this command to function correctly.
Example
// t = top
// b = bottom
// l = left
// r = right
// c = center
6.29.2 Methods
6.29.2.1 QuickTime.close()
Availability
Windows
Usage
qtInstance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myQuickTime.close();
6.29.2.2 QuickTime.hide()
Availability
Windows
Usage
qtInstance.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myQuickTime.hide();
6.29.2.3 QuickTime.hideControl()
Availability
Windows
Usage
qtInstance.hideControl():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myQuickTime.hideControl();
6.29.2.4 QuickTime.mute()
Availability
Windows
Usage
qtInstance.mute():Void
Parameters
Returns
Nothing
Description
Mutes the QuickTime Player if parameter is "true" and unmutes if param is "false" in the specified instance.
Notes
None
Example
myQuickTime.mute(true);
6.29.2.5 QuickTime.play()
Availability
Windows
Usage
qtInstance.play():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myQuickTime.play();
6.29.2.6 QuickTime.show()
Availability
Windows
Usage
qtInstance.show():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myQuickTime.show();
6.29.2.7 QuickTime.showControl()
Availability
Windows
Usage
qtInstance.showControl():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myQuickTime.showControl();
6.29.2.8 QuickTime.stop()
Availability
Windows
Usage
qtInstance.stop():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myQuickTime.stop();
6.29.3 Properties
6.29.3.1 QuickTime.duration
Availability
Windows
Usage
qtInstance.duration:Number
Returns
An Integer
Description
Notes
None
Example
6.29.3.2 QuickTime.height
Availability
Windows
Usage
qtInstance.height:Number
Returns
An Integer
Description
Notes
None
Example
myQuickTime.height = 200;
6.29.3.3 QuickTime.isInstalled
Availability
Windows
Usage
qtInstance.isInstalled:Boolean
Returns
A Boolean
Description
Will check for the existance of the QuickTime Player on the users system and return a "true" or "false" value to the variable
Result based upon it's presence.
Notes
None
Example
6.29.3.4 QuickTime.position
Availability
Windows
Usage
qtInstance.position:Number
Returns
An Integer
Description
Notes
None
Example
myQuickTime.position = 10;
6.29.3.5 QuickTime.visible
Availability
Windows
Usage
qtInstance.visible:Boolean
Returns
A Boolean
Description
Instance visibility.
Notes
None
Example
myQuickTime.visible = true;
6.29.3.6 QuickTime.width
Availability
Windows
Usage
qtInstance.width:Number
Returns
An Integer
Description
Notes
None
Example
myQuickTime.width = 200;
6.29.3.7 QuickTime.x
Availability
Windows
Usage
qtInstance.x:Number
Returns
An Integer
Description
Notes
None
Example
myQuickTime.x = 200;
6.29.3.8 QuickTime.y
Availability
Windows
Usage
qtInstance.x:Number
Returns
An Integer
Description
Notes
None
Example
myQuickTime.y = 200;
6.30 mdm.RealMedia
Availability
mdm.RealMedia
Constructor Description
Inserts a Real Media Player Instance using the specified
mdm.RealMedia()
parameters.
Method Description
RealMedia.close() Closes the File loaded in the Real Media Instance.
RealMedia.hide() Will hide the specified Real Media Instance.
RealMedia.fullscreen() Will show the Real Media control in Full Screen mode.
RealMedia.pause() Will Pause the File loaded in the Real Media Instance.
RealMedia.stop() Will stop the File loaded in the Real Media Instance.
Property Description
Returns the total length of the File in the Real Media
RealMedia.duration
instance.
RealMedia.height The Height of the Real Media Instance.
Will check for the existance of the Real Media on the users
RealMedia.isInstalled
system.
Current position of the File in the specified Real Media
RealMedia.position
Instance.
RealMedia.visible Instance visibility.
6.30.1 Constructor
6.30.1.1 mdm.RealMedia()
Availability
Windows
Constructor
Parameters
x:Number X position
y:Number Y Position
Returns
Nothing
Description
Inserts a Real Media Player Instance using the specified parameters. Multiple Instances can be created.
Notes
Real Media Player must be installed on the users system for this command to function correctly.
Example
// t = top
// b = bottom
// l = left
// r = right
// c = center
6.30.2 Methods
6.30.2.1 RealMedia.close()
Availability
Windows
Usage
rmInstance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myRealMedia.close();
6.30.2.2 RealMedia.hide()
Availability
Windows
Usage
rmInstance.hide():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myRealMedia.hide();
6.30.2.3 RealMedia.fullscreen()
Availability
Windows
Usage
rmInstance.fullscreen():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myRealMedia.fullscreen();
6.30.2.4 RealMedia.mute()
Availability
Windows
Usage
rmInstance.mute():Void
Parameters
Returns
Nothing
Description
Mutes the Real Media Player if parameter is "true" and unmutes if param is "false".
Notes
None
Example
myRealMedia.mute();
6.30.2.5 RealMedia.normalSize()
Availability
Windows
Usage
rmInstance.normalSize():Void
Parameters
None
Returns
Nothing
Description
Will switch the Real Media control from Full Screen to default mode.
Notes
None
Example
myRealMedia.normalSize();
6.30.2.6 RealMedia.play()
Availability
Windows
Usage
rmInstance.play():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myRealMedia.play();
6.30.2.7 RealMedia.pause()
Availability
Windows
Usage
rmInstance.pause():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myRealMedia.pause();
6.30.2.8 RealMedia.show()
Availability
Windows
Usage
rmInstance.show():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myRealMedia.show();
6.30.2.9 RealMedia.stop()
Availability
Windows
Usage
rmInstance.stop():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myRealMedia.stop();
6.30.3 Properties
6.30.3.1 RealMedia.duration
Availability
Windows
Usage
rmInstance.duration:Number
Returns
An Integer
Description
Returns the total length of the File in the Real Media instance.
Notes
None
Example
6.30.3.2 RealMedia.height
Availability
Windows
Usage
rmInstance.height:Number
Returns
An Integer
Description
Notes
None
Example
myRealMedia.height = 200;
6.30.3.3 RealMedia.isInstalled
Availability
Windows
Usage
rmInstance.isInstalled:Boolean
Returns
A Boolean
Description
Will check for the existance of the Real Media on the users system and return a "true" or "false" based upon it's presence.
Notes
None
Example
6.30.3.4 RealMedia.position
Availability
Windows
Usage
rmInstance.position:Number
Returns
An Integer
Description
Notes
None
Example
myRealMedia.position = 10;
6.30.3.5 RealMedia.visible
Availability
Windows
Usage
rmInstance.visible:Boolean
Returns
A Boolean
Description
Instance visibility.
Notes
None
Example
myRealMedia.visible = true;
6.30.3.6 RealMedia.width
Availability
Windows
Usage
rmInstance.width:Number
Returns
An Integer
Description
Notes
None
Example
myRealMedia.width = 200;
6.30.3.7 RealMedia.x
Availability
Windows
Usage
rmInstance.x:Number
Returns
An Integer
Description
Notes
None
Example
currentX = myRealMedia.x;
myRealMedia.x = 200;
6.30.3.8 RealMedia.y
Availability
Windows
Usage
rmInstance.x:Number
Returns
An Integer
Description
Notes
None
Example
myRealMedia.y = 200;
6.31 mdm.Shockwave
Availability
mdm.Shockwave
Constructor Description
Inserts a Shockwave Instance using the specified
mdm.Shockwave()
parameters.
Method Description
Shockwave.close() Closes the Shockwave Instance.
Shockwave.evaluateScript() This command will trigger the EvalScript function in Lingo.
Shockwave.swList() Sets the value for the Shockwave Player attribute: swList
Shockwave.swName() Sets the value for the Shockwave Player attribute: swName
Sets the value for the Shockwave Player attribute:
Shockwave.swPassword()
swPassword
Sets the value for the Shockwave Player attribute:
Shockwave.swPreLoadTime()
swPreloadTime
Sets the value for the Shockwave Player attribute:
Shockwave.swSound()
swSound
Shockwave.swText() Sets the value for the Shockwave Player attribute: swText
Sets the value for the Shockwave Player attribute:
Shockwave.swVolume()
swVolume
Property Description
Shockwave.bgcolor Sets the BG Color of the Shockwave Instance.
Returns the current frame of the specified Shockwave
Shockwave.currentFrame
Player Instance.
Shockwave.height Height of Shockwave Player instance.
6.31.1 Constructor
6.31.1.1 mdm.Shockwave()
Availability
Windows
Constructor
Parameters
x:Number X position
y:Number Y Position
Returns
Nothing
Description
Inserts an instance of the Adobe Shockwave Player using the specified parameters. Multiple Instances can be created.
Notes
The Adobe Shockwave Player must be installed on the users system for this command to function correctly. The Shockwave
Player is different to the Flash OCX/Plug-In but is a free download available at:
http://www.Adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwave
Example
// t = top
// b = bottom
// l = left
// r = right
// c = center
6.31.2 Methods
6.31.2.1 Shockwave.close()
Availability
Windows
Usage
shockwaveInstance.close():Void
Parameters
None
Returns
Nothing
Description
Notes
Please note that Shockwave Player must be installed on the users system for this command to function correctly. The
Shockwave Player is different to the Flash OCX/Plug-In but is a free download available at: http://www.
Adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwave
Example
myShockwave.close();
6.31.2.2 Shockwave.evaluateScript()
Availability
Windows
Usage
shockwaveInstance.evaluateScript(scriptString:String):Void
Parameters
Returns
Nothing
Description
This command will trigger (if implemented in the shockwave movie) the EvalScript function, and pass the specified string
(script) to it. The function will then execute and can also execute any code submited to it as long as it is formated correctly. An
example of Lingo in Director would be:
on evalScript argString
do argString
end
Notes
Please note that Shockwave Player must be installed on the users system for this command to function correctly. The
Shockwave Player is different to the Flash OCX/Plug-In but is a free download available at:
http://www.Adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwave
Example
myShockwave.evaluateScript("member(\"test\").text = argString");
// Director Lingo:
on evalScript argString
do argString
end
6.31.2.3 Shockwave.goToFrame()
Availability
Windows
Usage
shockwaveInstance.gotoFrame(frame:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.gotoFrame(20);
6.31.2.4 Shockwave.goToMovie()
Availability
Windows
Usage
shockwaveInstance.gotoMovie(filePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.gotoMovie("c:\\myMovie.dcr");
6.31.2.5 Shockwave.play()
Availability
Windows
Usage
shockwaveInstance.play():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myShockwave.play();
6.31.2.6 Shockwave.rewind()
Availability
Windows
Usage
shockwaveInstance.rewind():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myShockwave.rewind();
6.31.2.7 Shockwave.stop()
Availability
Windows
Usage
shockwaveInstance.stop():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
myShockwave.stop();
6.31.2.8 Shockwave.swBackColor()
Availability
Windows
Usage
shockwaveInstance.swBackColor(backgroundColor:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swBackColor("FF0000");
6.31.2.9 Shockwave.swBanner()
Availability
Windows
Usage
shockwaveInstance.swBanner(bannerText:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swBanner("This is my text");
6.31.2.10 Shockwave.swColor()
Availability
Windows
Usage
shockwaveInstance.swColor(instanceColor:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swColor(0xFF0000);
6.31.2.11 Shockwave.swForeColor()
Availability
Windows
Usage
shockwaveInstance.swForeColor(foregroundColor:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swForeColor(0xFF0000);
6.31.2.12 Shockwave.swFrame()
Availability
Windows
Usage
shockwaveInstance.swFrame(frame:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swForeColor(20);
6.31.2.13 Shockwave.swAudio()
Availability
Windows
Usage
shockwaveInstance.swAudio(filePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swAudio("c:\\myAudio.wav");
6.31.2.14 Shockwave.swList()
Availability
Windows
Usage
shockwaveInstance.swList(delimitedKeys:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swList("val1,val2,val3,val4");
6.31.2.15 Shockwave.swName()
Availability
Windows
Usage
shockwaveInstance.swName(nameValue:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swName("my name");
6.31.2.16 Shockwave.swPassword()
Availability
Windows
Usage
shockwaveInstance.swPassword(passwordValue:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swPassword("my password");
6.31.2.17 Shockwave.swPreLoadTime()
Availability
Windows
Usage
shockwaveInstance.swPreLoadTime(preloadTime:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swPreLoadTime(30);
6.31.2.18 Shockwave.swSound()
Availability
Windows
Usage
shockwaveInstance.swSound(filePath:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swSound("c:\\myAudio.wav");
6.31.2.19 Shockwave.swText()
Availability
Windows
Usage
shockwaveInstance.swText(nameValue:String):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swText("my text");
6.31.2.20 Shockwave.swVolume()
Availability
Windows
Usage
shockwaveInstance.swVolume(soundLevel:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
myShockwave.swVolume(5);
6.31.3 Properties
6.31.3.1 Shockwave.bgcolor
Availability
Windows
Usage
shockwaveInstance.bgcolor:Void
Description
Notes
None
Example
myShockwave.bgcolor = "FF0000";
6.31.3.2 Shockwave.currentFrame
Availability
Windows
Usage
shockwaveInstance.currentFrame:Number
Description
Notes
None
Example
6.31.3.3 Shockwave.height
Availability
Windows
Usage
shockwaveInstance.height:Number
Description
Notes
None
Example
myShockwave.height = 200;
6.31.3.4 Shockwave.visible
Availability
Windows
Usage
shockwaveInstance.visible:Boolean
Description
Instance visibility.
Notes
None
Example
myShockwave.visible = true;
6.31.3.5 Shockwave.width
Availability
Windows
Usage
shockwaveInstance.width:Number
Description
Notes
None
Example
myShockwave.width = 200;
6.31.3.6 Shockwave.x
Availability
Windows
Usage
shockwaveInstance.x:Number
Description
Notes
None
Example
myShockwave.x = 200;
6.31.3.7 Shockwave.y
Availability
Windows
Usage
shockwaveInstance.x:Number
Description
Notes
None
Example
myShockwave.y = 200;
6.32 mdm.String
Availability
mdm.String
Method Description
String.position() Will return the position, in characters, of any String.
String.replace() Will execute an internal "Search and Replace" on any input
string.
6.32.1 Methods
6.32.1.1 String.position()
Availability
Windows
Usage
mdm.String.position(inputString:String, searchString:String):Number
Parameters
Returns
An Integer
Description
Notes
None
Example
6.32.1.2 String.replace()
Availability
Windows
Usage
Parameters
Returns
A String
Description
Will execute an internal "Search and Replace" on any input string. The command will search for occurences of the value find in
the string specified in inputString and replace any matches with the value specified. The resulting string will be returned.
Notes
None
Example
6.33 mdm.System
Availability
mdm.System
Object Description
DirectX DirectX Object
Jscript Java Script Object
Method Description
System.closeCDTray() Closes the CD Tray on the specified drive.
System.getFreeSpace() Returns the free space available from the drive specified.
System.getHDSerial() Returns the Hard Disk serial number.
System.getTotalSpace() Returns the Total Space available from the drive specified.
Property Description
System.computerCompany Default company name to whom the PC is registered.
System.computerName Default computer name.
System.CDDrive Returns the first CD-Rom drive path present in the system.
Will contain a "true" or "false" value based upon the users
System.isAdmin
Admin Status.
System.localTime Returns the local system time to the variable time.
6.33.1 Objects
6.33.1.1 System.DirectX
Availability
mdm.System.DirectX
Method Description
System.DirectX.enable() Switches to the specified DirectX resolution.
System.DirectX.disable() Disables the DirectX resolution.
6.33.1.1.1 Methods
6.33.1.1.1.1 System.DirectX.enable()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Switches the Projector to Fullscreen at the specified DirectX resolution and Color Depth. When the Projector exits, the screen
resolution will revert to default.
Notes
320x240
400x300
640x480
800x600
1024x768
c) Supported Resolutions and Color Depths are dependent on graphics hardware, and monitor.
Example
Availability
Windows
Usage
mdm.System.DirectX.disable():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.System.DirectX.disable();
6.33.1.2 System.JScript
Availability
mdm.System.Jscript
Method Description
System.JScript.execute() Runs a custom JScript command.
6.33.1.2.1 Methods
6.33.1.2.1.1 System.JScript.execute()
Availability
Windows
Usage
Parameters
Returns
A String
Description
Notes
None
Example
6.33.1.3 System.Paths
Availability
mdm.System.Paths
Property Description
System.Paths.allUsersAppData Path to the All Users Application Data Folder.
6.33.1.3.1 Properties
6.33.1.3.1.1 System.Paths.allUsersAppData
Availability
Windows
Usage
mdm.System.Paths.allUsersAppData:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.allUsersPrograms:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.allUsersStartMenu:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.allUsersStartup:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.commonAdminTools:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.commonAppData:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.commonPrograms:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.commonStartMenu:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.commonStartup:String
Returns
A String
Description
Notes
Example
6.33.1.3.1.10 System.Paths.appData
Availability
Windows
Usage
mdm.System.Paths.appData:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.cookies:String
Returns
A String
Description
Notes
Example
Availability
Usage
mdm.System.Paths.desktop:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.favorites:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.fonts:String
Returns
A String
Description
Notes
Example
6.33.1.3.1.15 System.Paths.history
Availability
Windows
Usage
mdm.System.Paths.history:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.network:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.personal:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.programs:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.programFiles:String
Returns
A String
Description
Notes
Example
6.33.1.3.1.20 System.Paths.recent
Availability
Windows
Usage
mdm.System.Paths.recent:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.startup:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.startMenu:String
Returns
A String
Description
Notes
Example
Availability
Windows
Usage
mdm.System.Paths.system:String
Returns
A String
Description
Notes
Example
Availability
Usage
mdm.System.Paths.temp:String
Returns
A String
Description
Notes
Example
6.33.1.3.1.25 System.Paths.windows
Availability
Windows
Usage
mdm.System.Paths.windows:String
Returns
A String
Description
Notes
Example
6.33.1.4 System.Registry
Availability
mdm.System.Registry
Method Description
Create a new Key in the System Registry at the location
System.Registry.createKey()
specified.
System.Registry.deleteKey() Deletes a Key in the System Registry at the location
specified.
System.Registry.deleteValue() Deletes a Registry Value.
Will return an array of all keys found under the specified
System.Registry.getKeyNames()
values.
Will return an array of all value names found under the
System.Registry.getValueNames()
specified values.
System.Registry.hasSubKeys() Will check for the existence of any Sub Keys.
6.33.1.4.1 Methods
6.33.1.4.1.1 System.Registry.createKey()
Availability
Windows
Usage
mdm.System.Registry.createKey(keyBranchID:Number, keyName:String,
keyDefaultValue:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
mdm.System.Registry.createKey(3,"\\SOFTWARE\\NewKey\\SubKey","AnyValue");
6.33.1.4.1.2 System.Registry.deleteKey()
Availability
Windows
Usage
mdm.System.Registry.deleteKey(keyBranchID:Number, keyName:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
mdm.System.Registry.deleteKey(3,"\\SOFTWARE\\NewKey\\SubKey");
6.33.1.4.1.3 System.Registry.deleteValue()
Availability
Windows
Usage
mdm.System.Registry.deleteValue(keyBranchID:Number, value:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
mdm.System.Registry.deleteValue(3,"\\SOFTWARE\\Key\\SubKey");
6.33.1.4.1.4 System.Registry.getKeyNames()
Availability
Windows
Usage
mdm.System.Registry.getKeyNames(keyBranchID:Number, keyName:String):Array
Parameters
Returns
An Array
Description
Will return an array of all keys found under the specified values.
Notes
Example
Availability
Windows
Usage
mdm.System.Registry.getValueNames(keyBranchID:Number, keyName:String):String
Parameters
Returns
A String.
Description
Will return an array of all value names found under the specified values.
Notes
Example
Availability
Windows
Usage
mdm.System.Registry.hasSubKeys(keyBranchID:Number, keyName:String):Boolean
Parameters
Returns
A Boolean
Description
Will check for the existence of any Sub Keys and return "true" if it exists, or "false" if it does not exist.
Notes
Example
Availability
Windows
Usage
mdm.System.Registry.keyExists(keyBranchID:Number, keyName:String):Boolean
Parameters
Returns
A Boolean
Description
Will check for the existence of the specified key and return "true" if it exists, or "false" if it does not exist.
Notes
Example
Availability
Windows
Usage
mdm.System.Registry.load(keyName:String):String
Parameters
Returns
A String
Description
Loads the data from the specified Key in the System Registry.
Notes
None
Example
Availability
Windows
Usage
mdm.System.Registry.loadBoolean(keyBranchID:Number, keyName:String,
keyNameValue:String):String
Parameters
Returns
A String.
Description
Notes
While the registry command looks for a specific type of key (string,integer or boolean) the actual new value is always submitted
as a string.
Example
Availability
Windows
Usage
mdm.System.Registry.loadInteger(keyBranchID:Number, keyName:String,
keyNameValue:String):Number
Parameters
Returns
An Integer
Description
Notes
While the registry command looks for a specific type of key (string,integer or boolean) the actual new value is always submitted
as a string.
Example
var browserVersion =
mdm.System.Registry.loadInteger("3","SOFTWARE\\Microsoft\\Internet
Explorer","Version");
6.33.1.4.1.11 System.Registry.loadString()
Availability
Windows
Usage
mdm.System.Registry.loadString(keyBranchID:Number, keyName:String,
keyNameValue:String):String
Parameters
Returns
A String
Description
Notes
While the registry command looks for a specific type of key (string,integer or boolean) the actual new value is always submitted
as a string.
Example
var browserVersion =
mdm.System.Registry.loadString("3","SOFTWARE\\Microsoft\\Internet
Explorer","Version");
6.33.1.4.1.12 System.Registry.loadMultiSz()
Availability
Windows
Usage
mdm.System.Registry.loadMultiSz(keyBranchID:Number, keyName:String,
keyNameValue:String):String
Parameters
Returns
A String
Description
Notes
While the registry command looks for a specific type of key (string,integer or boolean) the actual new value is always submitted
as a string.
Example
var browserVersion =
mdm.System.Registry.loadMultiSz("3","SOFTWARE\\Microsoft\\Internet
Explorer","Version");
6.33.1.4.1.13 System.Registry.save()
Availability
Windows
Usage
mdm.System.Registry.save(keyName:String, keyValue:String):Void
Parameters
Returns
Nothing
Description
Notes
HKEY_CURRENT_USER\Software\FormCaption\
Example
mdm.System.Registry.save("myKey","This is my Content");
6.33.1.4.1.14 System.Registry.saveBoolean()
Availability
Windows
Usage
mdm.System.Registry.saveBoolean(keyBranchID:Number, keyName:String,
keyNameValue:String, keyNameData:Boolean):Void
Parameters
Returns
Nothing
Description
Notes
Example
mdm.System.Registry.saveBoolean(3,"\\SOFTWARE\\Microsoft\\Internet
Explorer","Version", true);
6.33.1.4.1.15 System.Registry.saveInteger()
Availability
Windows
Usage
mdm.System.Registry.saveInteger(keyBranchID:Number, keyName:String,
keyNameValue:String, keyNameData:Number):Void
Parameters
Returns
Nothing
Description
Notes
Example
mdm.System.Registry.saveInteger(3,"\\SOFTWARE\\Microsoft\\Internet
Explorer","Version", 1234);
6.33.1.4.1.16 System.Registry.saveString()
Availability
Windows
Usage
mdm.System.Registry.saveString(keyBranchID:Number, keyName:String,
keyNameValue:String, keyNameData:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
mdm.System.Registry.saveString(3,"\\SOFTWARE\\Microsoft\\Internet
Explorer","Version", "some string");
6.33.1.4.1.17 System.Registry.saveMultiSz()
Availability
Windows
Usage
mdm.System.Registry.saveMultiSz(keyBranchID:Number, keyName:String,
keyNameValue:String, keyNameData:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
mdm.System.Registry.saveMultiSz(3,"\\SOFTWARE\\Microsoft\\Internet
Explorer","Version", "some string");
6.33.1.5 System.VBScript
Availability
mdm.System.VBScript
Method Description
System.VBScript.execute() Runs a custom VB script command.
6.33.1.5.1 Methods
6.33.1.5.1.1 System.VBScript.execute()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Notes
None
Example
6.33.2 Methods
6.33.2.1 System.closeCDTray()
Availability
Windows
Usage
mdm.System.closeCDTray(driveLetter:String):Void
Parameters
driveLetter:String CD drive.
Returns
Nothing
Description
Notes
Trying to execute this command on a Physical Hard Drive can result in a System Crash.
Example
mdm.System.closeCDTray("e");
6.33.2.2 System.exec()
Availability
Usage
mdm.System.exec(exePath:String):Void
Parameters
Returns
Nothing
Description
Executes the File or Application. Any File type or Application can be launched using this method.
Notes
None
Example
Simple Usage:
mdm.System.exec("Notepad.exe");
This command can also be used to execute "mailto:" commands to launch email:
mdm.System.exec("mailto:support@multidmedia.com")
6.33.2.3 System.execStdOut()
Availability
Windows
Usage
mdm.System.execStdOut(exePath:String):String
Parameters
Returns
A String
Description
Executes the File or Application and returns the standard Command Line output of the launched application.
Notes
None
Example
6.33.2.4 System.execUnicode()
Availability
Windows
Usage
mdm.System.execUnicode(exePath:String):Void
Parameters
Returns
Nothing
Description
Executes the File or Application. Any File type or Application can be launched using this method.
Notes
Unicode Compliant.
Example
Simple Usage:
mdm.System.execUnicode("Notepad.exe");
This command can also be used to execute "mailto:" commands to launch email:
mdm.System.execUnicode("mailto:support@multidmedia.com")
6.33.2.5 System.getDisplayModes()
Availability
Usage
mdm.System.getDisplayModes():Array
Parameters
None
Returns
An Array
Description
Returns the available system display modes in a 2 dimensional array. The First Dimension contains the Array Entry ID and the
Second Dimension contains the Resolution Details.
Notes
None
Example
6.33.2.6 System.getFreeSpace()
Availability
Usage
mdm.System.getFreeSpace(drive:String):Number
Parameters
Returns
An Integer
Description
Notes
On Mac OSX, specify the Volume Number instead of a Drive Letter, starting from 0.
Example
6.33.2.7 System.getHDSerial()
Availability
Windows
Usage
mdm.System.getHDSerial(drive:String):String
Parameters
Returns
A String
Description
Notes
None
Example
6.33.2.8 System.getMasterVolume()
Availability
Windows
Usage
mdm.System.getMasterVolume():Number
Parameters
None
Returns
An Integer
Description
Notes
None
Example
6.33.2.9 System.getNumberOfVolumes()
Availability
Mac OSX
Usage
mdm.System.getNumberOfVolumes():Number
Parameters
None
Returns
An Integer
Description
Notes
None.
Example
6.33.2.10 System.getVolumeName()
Availability
Mac OSX
Usage
mdm.System.getVolumeName(volumeNumber:String):String
Parameters
Returns
A String
Description
Notes
The Volume Number starts from Zero, so in essence, it is the Number of Volumes minus 1. volumeNumber should also be
entered as a string.
Example
6.33.2.11 System.getWaveBalance()
Availability
Windows
Usage
mdm.System.getWaveBalance():Number
Parameters
None
Returns
An Integer
Description
Notes
None
Example
6.33.2.12 System.getWaveVolume()
Availability
Usage
mdm.System.getWaveVolume():Number
Parameters
None
Returns
An Integer
Description
Notes
None
Example
6.33.2.13 System.getWindowList()
Availability
Windows
Usage
mdm.System.getWindowList():Array
Parameters
None
Returns
An Array
Description
Returns the running Windows to a 2 dimensional Array. The First Dimension contains the Array Entry ID and the Second
Dimension contains the Window Details.
Notes
None
Example
6.33.2.14 System.getResolution()
Availability
Usage
mdm.System.getResolution():Array
Parameters
None
Returns
An Array
Description
Notes
None
Example
// resolutionInfo[0] = Width
// resolutionInfo[1] = Height
// resolutionInfo[2] = Color Depth
6.33.2.15 System.getTotalSpace()
Availability
Usage
mdm.System.getTotalSpace(drive:String):Number
Parameters
Returns
An Integer
Description
Notes
On Mac OSX, specify the Volume Number instead of a Drive Letter, starting from 0.
Example
6.33.2.16 System.hibernate()
Availability
Windows
Usage
mdm.System.hibernate(promptOption:String, messageText:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
Simple Usage:
mdm.System.hibernate("noask");
Advanced Usage:
6.33.2.17 System.hideTaskBar()
Availability
Windows
Usage
mdm.System.hideTaskBar():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.System.hideTaskBar();
6.33.2.18 System.logOff()
Availability
Windows
Usage
mdm.System.logOff(promptOption:String, messageText:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
Simple Usage:
mdm.System.logOff("noask");
Advanced Usage:
6.33.2.19 System.openCDTray()
Availability
Windows
Usage
mdm.System.openCDTray(driveLetter:String):Void
Parameters
driveLetter:String CD drive.
Returns
Nothing
Description
Notes
Please do not use HD drive letters. This can cause the system to crash.
Example
mdm.System.openCDTray("e");
6.33.2.20 System.postMessage()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Will post a system message (by using the Windows API Postmessage procedure) to an active window to perform a specific
task. For example, in the above code, the WM_QUIT message is sent to the specified window. A list of the most common
messages follow: (Please note that this is NOT a comprehensive list. For more information on messages and parameters
please consult the Microsoft Website http://www.microsoft.com)
0:WM_NULL
1:WM_CREATE
2:WM_DESTROY
3:WM_MOVE
5:WM_SIZE
6:WM_ACTIVATE
7:WM_SETFOCUS
8:WM_KILLFOCUS
10:WM_ENABLE
11:WM_SETREDRAW
12:WM_SETTEXT
13:WM_GETTEXT
14:WM_GETTEXTLENGTH
15:WM_PAINT
16:WM_CLOSE
17:WM_QUERYENDSESSION
18:WM_QUIT
19:WM_QUERYOPEN
20:WM_ERASEBKGND
21:WM_SYSCOLORCHANGE
22:WM_ENDSESSION
23:WM_SYSTEMERROR
24:WM_SHOWWINDOW
25:WM_CTLCOLOR
26:WM_WININICHANGE
27:WM_DEVMODECHANGE
28:WM_ACTIVATEAPP
29:WM_FONTCHANGE
30:WM_TIMECHANGE
31:WM_CANCELMODE
32:WM_SETCURSOR
33:WM_MOUSEACTIVATE
34:WM_CHILDACTIVATE
35:WM_QUEUESYNC
36:WM_GETMINMAXINFO
38:WM_PAINTICON
39:WM_ICONERASEBKGND
40:WM_NEXTDLGCTL
42:WM_SPOOLERSTATUS
43:WM_DRAWITEM
44:WM_MEASUREITEM
45:WM_DELETEITEM
46:WM_VKEYTOITEM
47:WM_CHARTOITEM
48:WM_SETFONT
49:WM_GETFONT
50:WM_SETHOTKEY
51:WM_GETHOTKEY
55:WM_QUERYDRAGICON
57:WM_COMPAREITEM
61:WM_GETOBJECT
65:WM_COMPACTING
70:WM_WINDOWPOSCHANGING
71:WM_WINDOWPOSCHANGED
72:WM_POWER
74:WM_COPYDATA
75:WM_CANCELJOURNAL
78:WM_NOTIFY
Notes
This command should only be used for sending simple messages, and will ONLY work on Windows that are able to receive
and process these specific messages. Structures and Events should not be sent and will not work.
Example
6.33.2.21 System.powerOff()
Availability
Windows
Usage
mdm.System.powerOff(promptOption:String, messageText:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
Simple Usage:
mdm.System.powerOff("noask");
Advanced Usage:
6.33.2.22 System.restart()
Availability
Usage
mdm.System.restart(promptOption:String, messageText:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
Simple Usage:
mdm.System.restart("noask");
Advanced Usage:
6.33.2.23 System.sendMessage()
Availability
Windows
Usage
Parameters
Returns
Nothing
Description
Will send a system message to an active window to perform a specific task. For example, in the above code, the WM_QUIT
message is sent to the specified window. A list of the most common messages follow: (Please note that this is NOT a
comprehensive list. For more information on messages and parameters please consult the Microsoft Website
http://www.microsoft.com)
0:WM_NULL
1:WM_CREATE
2:WM_DESTROY
3:WM_MOVE
5:WM_SIZE
6:WM_ACTIVATE
7:WM_SETFOCUS
8:WM_KILLFOCUS
10:WM_ENABLE
11:WM_SETREDRAW
12:WM_SETTEXT
13:WM_GETTEXT
14:WM_GETTEXTLENGTH
15:WM_PAINT
16:WM_CLOSE
17:WM_QUERYENDSESSION
18:WM_QUIT
19:WM_QUERYOPEN
20:WM_ERASEBKGND
21:WM_SYSCOLORCHANGE
22:WM_ENDSESSION
23:WM_SYSTEMERROR
24:WM_SHOWWINDOW
25:WM_CTLCOLOR
26:WM_WININICHANGE
27:WM_DEVMODECHANGE
28:WM_ACTIVATEAPP
29:WM_FONTCHANGE
30:WM_TIMECHANGE
31:WM_CANCELMODE
32:WM_SETCURSOR
33:WM_MOUSEACTIVATE
34:WM_CHILDACTIVATE
35:WM_QUEUESYNC
36:WM_GETMINMAXINFO
38:WM_PAINTICON
39:WM_ICONERASEBKGND
40:WM_NEXTDLGCTL
42:WM_SPOOLERSTATUS
43:WM_DRAWITEM
44:WM_MEASUREITEM
45:WM_DELETEITEM
46:WM_VKEYTOITEM
47:WM_CHARTOITEM
48:WM_SETFONT
49:WM_GETFONT
50:WM_SETHOTKEY
51:WM_GETHOTKEY
55:WM_QUERYDRAGICON
57:WM_COMPAREITEM
61:WM_GETOBJECT
65:WM_COMPACTING
70:WM_WINDOWPOSCHANGING
71:WM_WINDOWPOSCHANGED
72:WM_POWER
74:WM_COPYDATA
75:WM_CANCELJOURNAL
78:WM_NOTIFY
Notes
This command should only be used for sending simple messages, and will ONLY work on Windows that are able to receive
and process these specific messages. Structures and Events should not be sent and will not work.
Example
6.33.2.24 System.setMasterVolume()
Availability
Windows
Usage
mdm.System.setMasterVolume(volumeLevel:Number):Void
Parameters
Returns
Nothing
Description
Notes
None
Example
mdm.System.setMasterVolume(0);
6.33.2.25 System.setResolution()
Availability
Usage
mdm.System.setResolution(resolutionX:Number, resolutionY:Number, [
refreshRate:Number]):Void
Parameters
Returns
A String
Description
Changes the system resolution to the specified values. A "true" or "false" value is returned depending on a successful or
non-successful change
Notes
The refreshRate Parameter is optional, and available on Windows Only. If a non-supported Refresh Rate is supplied, the
command will default to 60hz.
Example
6.33.2.26 System.setWindowFocus()
Availability
Windows
Usage
mdm.System.setWindowFocus(windowID:Number):Void
Parameters
Returns
Nothing
Description
Sets focus to the running window with the ID in the variable id. To retrieve a list of running windows and their ID's use
System.getWindowList()
Notes
None
Example
mdm.System.setWindowFocus(5024);
6.33.2.27 System.setWaveVolume()
Availability
Usage
mdm.System.setWaveVolume(volumeLevel:Number):Void
Parameters
Returns
Nothing
Description
Sets the volume of the wave (digital sound) specified in the variable volume. Range 0(min)-255(max)
Notes
None
Example
mdm.System.setWaveVolume(0);
6.33.2.28 System.setWaveVolumeAdv()
Availability
Windows
Usage
mdm.System.setWaveVolumeAdv(leftVolumeLevel:Number, rightVolumeLevel:Number):Void
Parameters
Returns
Nothing
Description
Sets the volume of the wave (digital sound) specified in the variable leftVolume and rightVolume. Range 0(min)-65535(max)
Balance can be set by altering the values for the left and right channels.
Notes
None
Example
mdm.System.setWaveVolumeAdv(0, 65535);
6.33.2.29 System.setWaveBalance()
Availability
Windows
Usage
mdm.System.setWaveBalance(volumeBalance:Number):Void
Parameters
Returns
Nothing
Description
Sets the balance of the wave (digital sound) specified in the variable balance. Range 0(min)-100(max)
Notes
None
Example
mdm.System.setWaveBalance(50);
6.33.2.30 System.setWallpaper()
Availability
Windows
Usage
mdm.System.setWallpaper(filePath:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
mdm.System.setWallpaper("c:\\myImage.bmp");
6.33.2.31 System.setWallpaperAlt()
Availability
Windows
Usage
mdm.System.setWallpaperAlt(filePath:String):Void
Parameters
Returns
Nothing
Description
Notes
Only BMP files are valid. This command uses an alternative method to mdm.System.setWallpaper() which is
non-ActiveX/ActiveDesktop method of setting the wallpaper. Added Windows NT support, but requires reboot in order to apply
changes.
Example
mdm.System.setWallpaperAlt("c:\\myImage.bmp");
6.33.2.32 System.showTaskBar()
Availability
Windows
Usage
mdm.System.showTaskBar():Void
Parameters
None
Returns
Nothing
Description
Notes
None
Example
mdm.System.showTaskBar();
6.33.2.33 System.shutDown()
Availability
Usage
mdm.System.shutDown(promptOption:String, messageText:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
Simple Usage:
mdm.System.shutDown("noask");
Advanced Usage:
6.33.2.34 System.suspend()
Availability
Windows
Usage
mdm.System.suspend(promptOption:String, messageText:String):Void
Parameters
Returns
Nothing
Description
Notes
Example
Simple Usage:
mdm.System.suspend("noask");
Advanced Usage:
6.33.2.35 System.taskBarBlink()
Availability
Windows
Usage
mdm.System.taskBarBlink():Void
Parameters
None
Returns
Nothing
Description
Makes the Projectors Taskbar Tile blink once. The tile will remain highlighted until clicked on by the user.
Notes
None
Example
mdm.System.taskBarBlink();
6.33.3 Properties
6.33.3.1 System.computerCompany
Availability
Windows
Usage
mdm.System.computerCompany:String
Returns
A String
Description
Notes
None
Example
6.33.3.2 System.computerName
Availability
Windows
Usage
mdm.System.computerName:String
Returns
A String
Description
Notes
None
Example
6.33.3.3 System.computerOwner
Availability
Windows
Usage
mdm.System.computerOwner:String
Returns
A String
Description
Notes
None
Example
6.33.3.4 System.CPUSpeed
Availability
Windows
Usage
mdm.System.CPUSpeed:Number
Returns
An Integer
Description
Notes
None
Example
6.33.3.5 System.CDDrive
Availability
Windows
Usage
mdm.System.CDDrive:String
Returns
A String
Description
Notes
None
Example
6.33.3.6 System.isAdmin
Availability
Windows
Usage
mdm.System.isAdmin:Boolean
Returns
A Boolean
Description
Will contain a "true" or "false" value based upon the users Admin Status.
Notes
None
Example
6.33.3.7 System.localTime
Availability
Usage
mdm.System.localTime:Date
Returns
A Date Object
Description
Notes
None
Example
6.33.3.8 System.language
Availability
Windows
Usage
mdm.System.language:String
Returns
A String
Description
Notes
None
Example
6.33.3.9 System.macVerString
Availability
Mac OSX
Usage
mdm.System.macVerString:String
Returns
A String
Description
Notes
None
Example
6.33.3.10 System.RAMSize
Availability
Windows
Usage
mdm.System.RAMSize:Number
Returns
An Integer
Description
Notes
None
Example
6.33.3.11 System.screenHeight
Availability
Usage
mdm.System.screenHeight:Number
Returns
An Integer
Description
Notes
None
Example
6.33.3.12 System.screenWidth
Availability
Usage
mdm.System.screenWidth:Number
Returns
An Integer
Description
Notes
None
Example
6.33.3.13 System.servicePack
Availability
Windows
Usage
mdm.System.servicePack:String
Returns
A String
Description
Notes
Example
6.33.3.14 System.winVerString
Availability
Windows
Usage
mdm.System.winVerString:String
Returns
A String
Description
Notes
Return Values:
Windows 95
Windows 95 OSR2
Windows 98
Windows 98 SE
Windows ME
Windows NT 3.5
Windows NT 4.0
Windows 2000
Windows XP
Example
6.33.3.15 System.winVerStringDetail
Availability
Windows
Usage
mdm.System.winVerStringDetail:String
Returns
A String
Description
Notes
Return Values:
Microsoft Windows 95
Microsoft Windows 98
Microsoft Windows Millenium Edition
Microsoft Windows NT 3.51
Microsoft Windows NT 4.0 Domain Controller
Microsoft Windows NT 4.0 Server
Microsoft Windows NT 4.0 Workstation
Microsoft Windows 2000
Microsoft Windows 2000 Advanced Server
Microsoft Windows 2000 DataCenter Server
Microsoft Windows XP Home Edition
Microsoft Windows XP Professional
Microsoft Windows XP .NET Server
Example
7 Troubleshooting
7.1 Common Questions
7.1.1 Are Shared Libraries Supported?
At present, Runtime Shared Libraries are not supported in Zinc™ v2 Projectors for Windows or Mac OSX. We recommend you
plan your Zinc™ v2 projects with this in mind before starting.
Dragging a SWF file onto the main Application will create a new Project with the SWF just "dropped". However, dragging a
SWF file onto the Preview Window will just replace the current SWF and retain all current Project Settings.
System Events will only work if other {mdm}Script 2.0 Commands have been used. If your Project only requires a System
Event without the need for any {mdm}Script 2.0 Commands, please initialize events with:
mdm.initevents();
Most path references online are relative and there is no need to use absolute paths. However, when coding for the desktop, it
is always advisable to use absolute paths for a number of reasons:
Firstly, there is no knowing where exactly the user will decide to launch the compiled Application from. It could be from a CD, it
could be from the Hard Drive. The second reason is that the internal SWF isn't ever physically available on the users Hard
Drive (it is contained within the EXE shell) and therefore doesn't "know" what it's current location is and, more importantly,
doesn't know what is relative to it. For this reason, all paths should be appended with the property
mdm.Application.path which contains the current location of the EXE File.
LoadMovieNum(mdm.Application.path+"myMovie.swf", 5);
Notes
Using mdm.Application.path is recommended for all projects as it guarantees the path to the SWF will be found
correctly, no matter where the Projector is. It will also work across all operating systems.
When loading FLV files, a similar approach to loading external SWF files must be adopted. Whether you are loading FLV files
using actionscript you must specify the url of the FLV file as an absolute path using mdm.Application.path
For example, the following script will NOT work when compiled with Zinc™ v2.5:
myMedia.setMedia("myMovie.flv", "FLV");
myMedia.setMedia(mdm.Application.path+"myMovie.flv", "FLV");
Notes
Using mdm.Application.path is recommended for all projects as it guarantees the path to the SWF will be found
correctly, no matter where the Projector is. It will also work across all operating systems.
When deleting a Mac Projector (Moving it to the Trash), be sure to empty the Trash before extracting a new Projector in the
same location. OSX sometimes caches applications with the same file name if it is present in the System Trash Folder.
Comma characters in {mdm}Script™ 2.0 Syntax can often break the code and result in Scripting Errors. This is because the
comma character is used to separate Parameters. If you need to use a comma character in your Parameters, you can use
@c@.
In addition to @c@ for the comma character, you can also use @q@ for a double-quote character and @amp@ for the '&'
character.
Note
If you have a variable which contains many characters which need to be escaped (as shown above), you can do this
automatically using ActionScript. An Example is shown below:
myVar = myVar.split(",").join("@c@");
The Adobe Flash OCX is a small plug-in which renders the SWF movie on your system. The Flash OCX (also referred to as
the Flash Player) is available free from Adobe. Over 98% of Internet users have the Flash Plug-In installed.
Zinc™ v2.5 uses the Flash OCX to render the SWF movie within the Zinc™ v2.5 Projector (also referred to as the "wrapper")
What if the end user does not have the Flash OCX installed?
Zinc™ v2.5 creates completely Standalone Projectors! This means that even if the end user does NOT have the Flash OCX
installed, Projectors compiled with Zinc™ v2.5 will STILL work! Zinc™ v2.5 projectors will also work on systems where Admin
Rights have been restricted which makes Zinc™ v2.5 Application very versatile!
Absolutely not. Zinc™ v2.5 Projectors do not edit, delete or update an existing Flash Plug-In if it is already present on the users
system.
Zinc™ v2.5 Standard Projectors require the Microsoft MDAC drivers present to function correctly. The MDAC Drivers are used
by the Projector to evoke Database Connectivity. If a system does not have the MDAC drivers available, it may show the
following error: "The error ELNTFCASTEROOR in module. Interface not supported"
The MDAC drivers are installed by default across 99.9% of systems from Win98SE upwards. However, in very rare cases,
some OEM licences do not include them. In this case, they can be downloaded and installed, completely free, from the
Microsoft Website.
If the Result [Type Function] is ever returned within your Flash Project, it is a good indication that that you are not referencing
the property in a case sensitive manner.
The MDM Support Forums are available 24 hours a day online at http://www.mdmforum.com - They provide FAQ's, Tech
Notes, Product Support and Scripting Help on all aspects of Zinc™ v2.5 and other MDM Software.
Most answers can be found on the MDM Support Forum, with new questions being answered promptly by Moderator's and
MDM Administrators. Please be sure to visit the Forum regularly for news and announcements on new MDM Software Builds
and Releases!
MDM TechNotes provide up to date Technical Information and Solution on common problems and Issues. Please visit
http://www.multidmedia.com/support/developers/technotes
MDM Developer Articles provide advice and guidance from Industry Professionals in the various uses of Zinc. Please Visit
http://www.multidmedia.com/support/developers/articles
MDM are committed to constantly improving our software. As such, product updates are released from time to time which are
completely FREE* for Registered users. To keep your software up to date, please be sure to check the MDM Software Updates
at http://www.multidmedia.com/support/update
*Updates are free for the life of a specific version. ie. Registered Users of v2 are entitled to all 2.x updates. MDM reserve the
right to withdraw the free update policy without prior notice.
MDM are committed to offering the very best support and after sales service to both registered and non-registered users of our
software.
Support Checklist
Before contacting the MDM Support Team, please make sure you have checked the FAQ's, Tech Notes and User Posts on the
MDM Forum Board for answers. Often, many common questions have already been answered and are available at this
If your question has not been answered, or you require help with something more specific, please contact the appropriate MDM
Support Department. For Technical Support on MDM Software, contact techsupport@multidmedia.com - please be sure to
attach the following information:
Registered users will take priority over non-registered, so please be sure to include your serial number if you are registered.
Notes
Sending a Technical Query to a department/email other than techsupport@multidmedia will result in a delayed response.