You are on page 1of 575

MDM Zinc 2.

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

Part II Using Zinc v2.5 6


1 Quickstart Guide
................................................................................................................................... 6
Quickstart Tutorial
.......................................................................................................................................................... 6
Step 1 - Create..........................................................................................................................................................
New Document 6
Step 2 - Add a ..........................................................................................................................................................
Command 7
Step 3 - Export..........................................................................................................................................................
to SWF 7
Step 4 - Launch..........................................................................................................................................................
Zinc v2.5 8
Step 5 - Compile
..........................................................................................................................................................
Projector 8
Step 6 - Launch..........................................................................................................................................................
& Test Projector 9
2 Workspace ................................................................................................................................... 9
Workspace Overview
.......................................................................................................................................................... 9
Workspace > ..........................................................................................................................................................
Input File 10
Workspace > ..........................................................................................................................................................
Style 11
Workspace > ..........................................................................................................................................................
Size & Position 12
Workspace > ..........................................................................................................................................................
Input Devices 13
Workspace > ..........................................................................................................................................................
Flash Settings 16
Workspace > ..........................................................................................................................................................
Installer Settings 17
Workspace > ..........................................................................................................................................................
Screensaver Options 18
Workspace > ..........................................................................................................................................................
Trial Options 19
Workspace > ..........................................................................................................................................................
Splash Screen 20
Workspace > ..........................................................................................................................................................
Version Information 21
Workspace > ..........................................................................................................................................................
Application Settings 22
Workspace > ..........................................................................................................................................................
Global/Secure Vars 23
Workspace > ..........................................................................................................................................................
Extensions 24
3 Scripting with
...................................................................................................................................
ZINC v2.5 25
Introduction .......................................................................................................................................................... 25
FSCommands..........................................................................................................................................................
(Deprecated) 26
What is a.........................................................................................................................................................
FSCommand? 26
FSCommand .........................................................................................................................................................
Usage - Step 1 26
FSCommand .........................................................................................................................................................
Usage - Step 2 27
FSCommand .........................................................................................................................................................
Usage - Step 3 28
FSCommand .........................................................................................................................................................
Advanced Usage 28
{mdm}Script 1.0
..........................................................................................................................................................
(Deprecated) 29
What is {mdm}Script
.........................................................................................................................................................
1.0? 29
{mdm}Script
.........................................................................................................................................................
1.0 Usage - Step 1 30
{mdm}Script
.........................................................................................................................................................
1.0 Usage - Step 2 30
{mdm}Script
.........................................................................................................................................................
1.0 Usage - Step 3 30
{mdm}Script
.........................................................................................................................................................
1.0 Advanced Usage 31
{mdm}Script 2.0
.......................................................................................................................................................... 31
What is {mdm}Script
.........................................................................................................................................................
2.0? 31

©2006 Multidmedia Limited {mdm}


Contents II

{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 III Application Development Guide 49


1 Overview ................................................................................................................................... 49
2 Considerations
................................................................................................................................... 49

Part IV Flex 2 & ActionScript 3 52


1 Introduction ................................................................................................................................... 52
2 Using the Flex
...................................................................................................................................
2 SWC 52

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

©2006 Multidmedia Limited {mdm}

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

Part VI {mdm}Script 2.0 API 79


1 mdm.ActiveX................................................................................................................................... 79
Constructor .......................................................................................................................................................... 80
mdm.ActiveX()
......................................................................................................................................................... 80
Methods .......................................................................................................................................................... 81
ActiveX.addMethodParam()
......................................................................................................................................................... 81
ActiveX.close()
......................................................................................................................................................... 81
ActiveX.doVerbCustom()
......................................................................................................................................................... 82
ActiveX.doVerbDiscardUndoState()
......................................................................................................................................................... 82
ActiveX.doVerbHide()
......................................................................................................................................................... 83

©2006 Multidmedia Limited {mdm}


Contents IV

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

©2006 Multidmedia Limited {mdm}

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

©2006 Multidmedia Limited {mdm}


Contents VI

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

©2006 Multidmedia Limited {mdm}

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

©2006 Multidmedia Limited {mdm}


Contents VIII

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

©2006 Multidmedia Limited {mdm}

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

©2006 Multidmedia Limited {mdm}


Contents X

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

©2006 Multidmedia Limited {mdm}

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

©2006 Multidmedia Limited {mdm}


Contents XII

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

©2006 Multidmedia Limited {mdm}

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

©2006 Multidmedia Limited {mdm}


Contents XIV

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

©2006 Multidmedia Limited {mdm}

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

©2006 Multidmedia Limited {mdm}


Contents XVI

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

©2006 Multidmedia Limited {mdm}

XVI
XVII ZINC™ v2.5 Help Manual

Properties ......................................................................................................................................... 404


Menu.Tray.menuType
................................................................................................................................... 404
Menu.Tray.iconHint
................................................................................................................................... 405
Events ......................................................................................................................................... 405
onTrayMenuClick_*
................................................................................................................................... 405
25 mdm.Network
................................................................................................................................... 406
Objects .......................................................................................................................................................... 407
Network.HTTPD
......................................................................................................................................................... 407
Methods ......................................................................................................................................... 407
Network.HTTPD.resume()................................................................................................................................... 407
Network.HTTPD.setResponse()
................................................................................................................................... 408
Network.HTTPD.startServer()
................................................................................................................................... 408
Network.HTTPD.stopServer()
................................................................................................................................... 409
Events ......................................................................................................................................... 409
onRequest ................................................................................................................................... 409
Network.Mail
......................................................................................................................................................... 410
Methods ......................................................................................................................................... 410
Network.Mail.send() ................................................................................................................................... 410
Network.Mail.sendNoAuth()
................................................................................................................................... 411
Network.Mail.sendClientSide()
................................................................................................................................... 412
Network.TCP
......................................................................................................................................................... 413
Objects ......................................................................................................................................... 413
Network.TCP.FileServer................................................................................................................................... 413
Methods ................................................................................................................................... 413
Network.TCP.FileServer.getFile()
................................................................................................................................... 413
Network.TCP.FileServer.getFileList()
................................................................................................................................... 414
Network.TCP.FileServer.getFolderList()
................................................................................................................................... 414
Network.TCP.FileServer.sendFile()
................................................................................................................................... 415
Network.TCP.FileServer.startServer()
................................................................................................................................... 416
Network.TCP.FileServer.stopServer()
................................................................................................................................... 416
Network.TCP.ProxyHTTP ................................................................................................................................... 417
Methods ................................................................................................................................... 417
Network.TCP.ProxyHTTP.getFile()
................................................................................................................................... 417
Network.TCP.ProxyHTTP.getString()
................................................................................................................................... 417
Network.TCP.ProxyHTTP.setProxy()
................................................................................................................................... 418
Network.UDP
......................................................................................................................................................... 418
Objects ......................................................................................................................................... 419
Network.UDP.Socket ................................................................................................................................... 419
Methods ................................................................................................................................... 419
Network.UDP.Socket.broadcast()
................................................................................................................................... 419
Network.UDP.Socket.send()
................................................................................................................................... 420
Network.UDP.Socket.startServer()
................................................................................................................................... 420
Network.UDP.Socket.stopServer()
................................................................................................................................... 421
Events ................................................................................................................................... 421
onData ................................................................................................................................... 421
Network.UDP.TFTP ................................................................................................................................... 422
Methods ................................................................................................................................... 422
Network.UDP.TFTP.abort()
................................................................................................................................... 422
Network.UDP.TFTP.getFile()
................................................................................................................................... 423
Network.UDP.TFTP.getProgressCurrent()
................................................................................................................................... 423
Network.UDP.TFTP.getProgressMax()
................................................................................................................................... 424
Network.UDP.TFTP.sendFile()
................................................................................................................................... 424
Network.UDP.TFTP.setBuffer()
................................................................................................................................... 425
Network.UDP.TFTP.setBlockSize()
................................................................................................................................... 425

©2006 Multidmedia Limited {mdm}


Contents XVIII

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

©2006 Multidmedia Limited {mdm}

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

©2006 Multidmedia Limited {mdm}


Contents XX

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

©2006 Multidmedia Limited {mdm}

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

©2006 Multidmedia Limited {mdm}


Contents XXII

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

Part VII Troubleshooting 548


1 Common Questions
................................................................................................................................... 548

©2006 Multidmedia Limited {mdm}

XXII
XXIII ZINC™ v2.5 Help Manual

Are Shared Libraries


..........................................................................................................................................................
Supported? 548
Drag & Drop..........................................................................................................................................................
SWF Files onto Zinc v2.5 548
Events not Working
.......................................................................................................................................................... 548
Loading External
..........................................................................................................................................................
SWF's 548
Loading External
..........................................................................................................................................................
FLV's 548
Moving Mac ..........................................................................................................................................................
OSX Projectors to the Trash 549
Using Commas..........................................................................................................................................................
in Parameters 549
What is the Flash
..........................................................................................................................................................
OCX? 549
What is the "ELNTFCASTEROOR"
..........................................................................................................................................................
Error? 550
What is the [Type
..........................................................................................................................................................
Function] Error? 550
2 Product Support
................................................................................................................................... 550
Support & Resources
.......................................................................................................................................................... 550
Software Updates
.......................................................................................................................................................... 550
Contact Support
..........................................................................................................................................................
Team 550

Index 0

©2006 Multidmedia Limited {mdm}


Part I
2 ZINC™ v2.5 Help Manual

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

1.2 System Requirements

To successfully install and run Zinc™ v2.5, the following System Requirements are necessary:

PC Minimum Requirements Mac OSX Minimum Requirements

Pentium 2 350mhz or higher G3 300mhz


64mb RAM or higher 128mb RAM or higher
100mb Free HD Space 100mb Free HD Space
Windows 98SE, ME, NT, 2000, XP Mac OS 10.2.x
Compatible with Adobe Flash 4, 5, 6, 7, 8 Compatible with Adobe Flash 6, 7, 8
800 x 600 resolution or higher 800 x 600 resolution or higher

PC Recommended Requirements Mac OSX Recommended Requirements

Pentium 3 500mhz or higher G4 800mhz


256mb RAM or higher 256mb RAM or higher
500mb Free HD Space 200mb Free HD Space
Windows XP Mac OS 10.4
Compatible with Adobe Flash 4, 5, 6, 7, 8 Compatible with Adobe Flash 6, 7, 8
1024 x 768 resolution or higher 1024 x 768 resolution or higher

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.

*{mdm}Script™ 2.0 requires Flash Format 6, 7 or 8

1.3 What's New in 2.5?

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:

· Adobe Flash® 9 Compatible


Zinc™ v2.5 is 100% Flash® 9 Compatible on Windows and Flash® 8 Compatible on Mac OSX! This means you can start
working with the latest release of Flash without the worry of compatibility. On Windows, you can even select which version of
the Flash OCX to include with your Project!

©2006 Multidmedia Limited {mdm}


Introduction 3

· {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.

· Synchronous & Asynchronous Scripting


{mdm}Script™ 2.0 is 100% Synchronous! This means that code is executed in the correct order eliminating the need to use
Call Backs, Loops, Intervals or any other "workarounds". Best of all, Zinc v2.5 is the First and Only SWF2EXE Application
which provides the ability to switch between Synchronous and Asynchronous Scripting during runtime on both Windows and
Mac OSX. You choose the best method for your Project - True Synchronous and/or Asynchronous behavior on both
Windows and Mac OSX means you can work smarter, not harder.

· Native Windows & Mac OSX Versions


Zinc v2.5 is now available, natively, for both Windows and Mac OSX! The all new Mac OSX IDE Version features the same
intuitive and familiar User Interface as the long established Windows version, along with some great enhancements
designed specifically for OSX.

· Over 800 Commands


The all new Zinc™ v2 Scripting API, {mdm}Script™ 2.0, features over 800 methods, properties and events for use in
ActionScript! Virtually anything can be achieved "out of the box" making {mdm}Script™ 2.0 the most powerful 3rd Party
Scripting API for Adobe Flash. Combined with the groundbreaking features of the compiling engine, this makes Zinc™ v2.5
the Ultimate SWF2EXE Application.

Previous Zinc™ v2.0 Features and Exclusives

· Form Based Development


Zinc™ v2 embraces a form based visual programming environment, which allows advanced development of applications.
Zinc™ v2 is the only SWF2EXE tool which offers multiple window applications based upon the Adobe Flash® Format!

· 100% Standalone Projectors


A key improvement, Zinc™ v2 now builds completely standalone Projectors. Using advanced OCX handling Techniques,
Zinc™ v2 Projectors will now run even if the end system does not have the Flash OCX installed. In addition, Admin Rights
are no longer required!

· Pixel Perfect Transparency


Transparency in Zinc™ v2 has been greatly improved. PC Windows 2000 and XP Projectors now benefit from pixel perfect
transparency and alpha blending which means you can create amazing transparent desktop applications. In addition,
Transparency is also supported on Windows 98SE Systems!

· Build Installers and Trial Protected Projectors


Zinc™ v2 now allows you to compile a custom installer for your application. In addition, you can create "Trial" applications by
limiting your projector to number of uses, number of days use, or even to a specific date.

· 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.

· 100+ Projector Skins


Instantly give your Projectors and Applications a unique look and feel with over 50 pre-designed Skins - You can even
specify a different skin for each form! Make your projectors look like Windows XP or Mac OSX applications or even dress
them with a completely unique look!

· Burn directly to CD/DVD


Zinc™ v2 now allows you to burn your application, project, setup files directly to CD or DVD without using any external
software! Once you have completed a project, you can create a CD or DVD ready for distribution! *CD Writer Required for
CD Burning. DVD Writer Required for DVD Burning.

· 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.

©2006 Multidmedia Limited {mdm}


4 ZINC™ v2.5 Help Manual

· Export to Windows & Mac OSX


Zinc™ v2 is the World's First SWF2EXE Application that provides export to both Windows PC and Mac OSX* Projectors!
Create Cross-Platform Projectors from a single SWF source with over 100 Zinc™ v2 Commands supported on Mac OSX
Projectors!

*With Optional Mac OSX PLug-In

©2006 Multidmedia Limited {mdm}


Part II
6 ZINC™ v2.5 Help Manual

2 Using Zinc v2.5


2.1 Quickstart Guide
2.1.1 Quickstart Tutorial

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.

2.1.2 Step 1 - Create New Document

Step 1 - Create a New Document

Create a New File in your preferred SWF Authoring tool.

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

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 7

2.1.3 Step 2 - Add a Command

Step 2 - Add a {mdm}Script™ 2.0 Command

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:

Your final code should look like this:

on(release){
mdm.Dialogs.prompt("Hello World");
}

Continue to Step 3

2.1.4 Step 3 - Export to SWF

Step 3 - Export to SWF

From your SWF Authoring Tool, export your project as a SWF. The screenshot below is taken from Adobe Flash MX 2004:

©2006 Multidmedia Limited {mdm}


8 ZINC™ v2.5 Help Manual

Continue to Step 4

2.1.5 Step 4 - Launch Zinc v2.5

Step 4 - Launch Zinc™ v2.5

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

2.1.6 Step 5 - Compile Projector

Step 5 - Compile Projector

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):

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 9

Continue to Step 6

2.1.7 Step 6 - Launch & Test Projector

Step 6 - Launch & Test Projector

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

Scripting with Zinc 2.5


Application Development Guide

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.

©2006 Multidmedia Limited {mdm}


10 ZINC™ v2.5 Help Manual

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.2.2 Workspace > Input File

The Input File Settings are shown below:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 11

(1) Enter a Form Caption for the current selected Form.

(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.

2.2.3 Workspace > Style

The Style Settings are shown below:

©2006 Multidmedia Limited {mdm}


12 ZINC™ v2.5 Help Manual

(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.

2.2.4 Workspace > Size & Position

The Size & Position Settings are shown below:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 13

(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.

2.2.5 Workspace > Input Devices

The Input Devices Tab is shown below:

Mouse Settings

©2006 Multidmedia Limited {mdm}


14 ZINC™ v2.5 Help Manual

(1) Apply an Action to the Left Mouse Button.

(2) Apply an Action to the Middle Mouse Button..

(3) Apply an Action to the Right Mouse Button..

Keyboard Settings

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 15

(1) Disable or enable Key Combinations.

Joystick Settings

©2006 Multidmedia Limited {mdm}


16 ZINC™ v2.5 Help Manual

(1) If Joystick is enabled you can select the Emulation Type to use.

(2) As above, for Joystick 2.

Tablet Settings

(1) Enable/Disable Graphic Tablet.

2.2.6 Workspace > Flash Settings

The Flash Settings are shown below:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 17

(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.

(3) Flash Movie Quality Settings.

(4) This recently added option allows you to select which version of the Flash OCX should be included in your Compiled
Projector

2.2.7 Workspace > Installer Settings

The Installer Settings are shown below:

©2006 Multidmedia Limited {mdm}


18 ZINC™ v2.5 Help Manual

(1) Select this option to compile an Installer for your Application.

(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.

2.2.8 Workspace > Screensaver Options

The Screensaver Settings are shown below:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 19

(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.

2.2.9 Workspace > Trial Options

The Trial Settings are shown below:

©2006 Multidmedia Limited {mdm}


20 ZINC™ v2.5 Help Manual

(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.2.10 Workspace > Splash Screen

The Splash Screen Settings are shown below:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 21

(1) Select a Splash Screen Option.

(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.

2.2.11 Workspace > Version Information

The Version Information Settings are shown below:

©2006 Multidmedia Limited {mdm}


22 ZINC™ v2.5 Help Manual

(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

2.2.12 Workspace > Application Settings

The PC Executable Settings are shown below:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 23

(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.

2.2.13 Workspace > Global/Secure Vars

The PC Executable Settings are shown below:

©2006 Multidmedia Limited {mdm}


24 ZINC™ v2.5 Help Manual

(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().

2.2.14 Workspace > Extensions

The Extensions Settings are shown below:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 25

(1) Installed Extensions can be enabled or disabled. For each extension that is enabled, the compiled Projector Size will
increase.

2.3 Scripting with ZINC v2.5


2.3.1 Introduction

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.

Until recently, all external Flash API's have had to be Asynchronous:

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!

©2006 Multidmedia Limited {mdm}


26 ZINC™ v2.5 Help Manual

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.

2.3.2 FSCommands (Deprecated)


2.3.2.1 What is a FSCommand?

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:

· FSCommand Execution Order


The SWF Format is engineered to execute all native actionscript first, and then execute FSCommands. Even if your
FSCommands are placed at the top of your code, they will still be executed last.

· 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.

· FSCommands and Variables


By default, FSCommands will ALWAYS return and read values (variables) to the _root of your SWF movie, even if the
FSCommand is executed within a Movie Clip. You must be sure to target variables correctly.

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.

2.3.2.2 FSCommand Usage - Step 1

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.

Step 1 - Insert a new FSCommand

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:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 27

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

2.3.2.3 FSCommand Usage - 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.

Step 2 - FSCommand Syntax (literal)

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

©2006 Multidmedia Limited {mdm}


28 ZINC™ v2.5 Help Manual

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

2.3.2.4 FSCommand Usage - 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.

Step 3 - FSCommand Syntax (Var)

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.

2.3.2.5 FSCommand Advanced Usage

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.

Advanced FSCommand Usage

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:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 29

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.

2.3.3 {mdm}Script 1.0 (Deprecated)


2.3.3.1 What is {mdm}Script 1.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.

{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:

· Flash Version Compatibility


{mdm}Script™ is ONLY compatible with SWF's exported to version 6 or higher. {mdm}Script™ is not compatible any
previous versions of Flash.

· {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.

· Cross Platform Compatibility


{mdm}Script™ is cross platform and works on both Windows PC Projectors and Mac OSX Projectors! Please note that if
you are developing a Mac OSX Projector only, you MUST use {mdm}Script™ . FSCommands are NOT supported in Mac
OSX Projectors.

· Referencing Variables
Unlike FSCommands, {mdm}Script™ can reference variables from ANY location. You no longer need to declare variables
on the _root.

©2006 Multidmedia Limited {mdm}


30 ZINC™ v2.5 Help Manual

2.3.3.2 {mdm}Script 1.0 Usage - Step 1

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.

Step 1 - Initialize {mdm}Script™

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

2.3.3.3 {mdm}Script 1.0 Usage - 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.

Step 2 - {mdm}Script™ Syntax (literal)

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

2.3.3.4 {mdm}Script 1.0 Usage - 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.

Step 3 - {mdm}Script™ Syntax (var)

{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:

message = "Hello World";


mdm.prompt(message);

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).

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 31

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.

2.3.3.5 {mdm}Script 1.0 Advanced Usage

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.

Advanced {mdm}Script™ 1.0 Usage (Callbacks)

{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.

2.3.4 {mdm}Script 2.0


2.3.4.1 What is {mdm}Script 2.0?

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!

· True Object Oriented Approach


Every {mdm}Script™ 2.0 command is part of an ActionScript Object. This means that it can called directly, or assigned to

©2006 Multidmedia Limited {mdm}


32 ZINC™ v2.5 Help Manual

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!

2.3.4.2 {mdm}Script 2.0 Usage

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:

Object Oriented Programming

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.

2.3.4.3 {mdm}Script 2.0 Advanced Usage

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:

a) Browse their local Hard Drive for any Text File.

b) Load the contents of the File into their Application.

c) Prompt the contents in a simple Dialog.

Previously, with {mdm}Script™ 1.0, the code required to successfully execute this procedure would be:

mdminit();

function loadFile(fileToLoad){
mdm.loadfromfile(fileToLoad, promptValue);
}

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 33

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:

mdm.Dialogs.prompt( mdm.FileSystem.loadFile( mdm.Dialogs.BrowseFile.show


() ) );

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).

2.4.2 Working with Forms

Forms in Zinc™ v2 can be added and removed from the Forms Pane:

©2006 Multidmedia Limited {mdm}


34 ZINC™ v2.5 Help Manual

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;

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 35

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.

2.5.2 Saving a Template

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:

©2006 Multidmedia Limited {mdm}


36 ZINC™ v2.5 Help Manual

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.

Once you click on Save, your Template will be saved.

Notes

If you select "Enable Password for Full Open" please be sure to note the password as the Template will be permanently
locked.

2.5.3 Loading a Template

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.

The alternative method is to select a Template from the Templates Tab:

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.

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 37

2.6 CD/DVD Burning


2.6.1 Creating a CD/DVD

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.

Step 1 - Create a CD Structure

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.

Step 2 - Launch the CD/DVD Burn Screen

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:

©2006 Multidmedia Limited {mdm}


38 ZINC™ v2.5 Help Manual

Step 3 - Burn a CD/DVD

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.

2.7 Icon Resources


2.7.1 ICO
2.7.1.1 ICO Overview

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:

16x16 8bit (256 Color)


16x16 32bit (True Color with Alpha)

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 39

32x32 8bit (256 Color)


32x32 32bit (True Color with Alpha)

48x48 8bit (256 Color)


48x48 32bit (True Color with Alpha)

With Zinc™ v2 you can provide a single resource ICO or a multi-resource ICO (an ICO which contains multiple sizes & color
depths).

Notes

ICO files are specific to Windows PC Only

2.7.1.2 Adding an ICO Resource

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

ICNS files are specific to Mac OSX Only.

2.7.2.2 Adding an ICNS Resource

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.

©2006 Multidmedia Limited {mdm}


40 ZINC™ v2.5 Help Manual

2.8.2 Building an Installer

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:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 41

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.

2.9 Mac OSX


2.9.1 Overview

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.

2.9.2 Compiling for Mac OSX from Windows

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!

©2006 Multidmedia Limited {mdm}


42 ZINC™ v2.5 Help Manual

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:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 43

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.

2.10 CMD Edition


2.10.1 Introduction

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)

©2006 Multidmedia Limited {mdm}


44 ZINC™ v2.5 Help Manual

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.

2.10.2 Quickstart Guide

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:

MDM Zinc v2 Command-line Compiler.


----------------------------------

Syntax: [operation] [sourcetype] [swffiles ...] [additionaloptions] -o


outputfilename

Possible Operation values:

-h Displays this help message.


-c Compiles using the supplied sourcetype.

Possible Sourcetype values:

-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.

Possible Additional Option values:

-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

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 45

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:


zinc -c -s myswf.swf -o myswf.exe

To compile a Zinc v2 project file:


zinc -c -p myprj.zinc -o myswf.exe

To compile a Zinc v2 Template with two forms to an exe:


zinc -c -t mytmp.znct mainform.swf subform1.swf -o myswf.exe

To compile a Zinc v2 Template with 5 forms to an exe:


zinc -c -t mytmp.znct mainform.swf subform1.swf subform2.swf subform3.swf
subform4.swf -o myswf.exe

To compile a Zinc v2 Template with 5 forms to an Mac OSX hqx file:


zinc -c -t mytmp.znct mainform.swf subform1.swf subform2.swf subform3.swf
subform4.swf -o myswf.hqx

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

Compiling Using 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)

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!

To learn how to create a Template File, Click Here.

2.10.3 Mapping Network Locations

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:

©2006 Multidmedia Limited {mdm}


46 ZINC™ v2.5 Help Manual

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:

©2006 Multidmedia Limited {mdm}


Using Zinc v2.5 47

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:

Z:\zinc -c -p c:\myProject.zinc -o c:\myProjector.exe

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.

©2006 Multidmedia Limited {mdm}


Part III
Application Development Guide 49

3 Application Development Guide


3.1 Overview

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:

· System & File Paths


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

©2006 Multidmedia Limited {mdm}


50 ZINC™ v2.5 Help Manual

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.

· External System Commands


When executing a command which does anything involving a process outside of the SWF, care must be taken to allow
sufficient time for the action to successfully complete. For example, retrieving 1000 records from an Access Database might
take less than a second on a more recent system, but could take a couple of seconds on an older machine with a slower
CPU and less recent Operating System.

· Windows & Mac OSX


With Zinc™ v2.5 (and the Mac OSX Plug-In) you can build applications for both Windows and Mac OSX from a single
source SWF. However, aside from characteristic differences there are also programming differences to consider when
developing cross platform Projectors. For example, path references are different on a Mac OSX to Windows and care must
be taken to use the correct format for the correct Platform. For more tips on Cross Platform Development, please visit the
MDM Support Form.

©2006 Multidmedia Limited {mdm}


Part IV
52 ZINC™ v2.5 Help Manual

4 Flex 2 & ActionScript 3


4.1 Introduction

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

For more Information on Flex, please visit http://www.adobe.com/products/flex

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.

For more Information on ActionScript 3, please visit http://labs.adobe.com/wiki/index.php/ActionScript_3:overview

4.2 Using the Flex 2 SWC

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:

1. Make the project as per usual in Flex

2. Right click on the project in the Navigator ( the top left pane )

3. Select properties from the drop down menu

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...

7. Browse to the mdm swc ( mdm.swc ), in BASE-INSTALL-DIR/swc/mdm.swc

8. Click OK to add the swc to the project

©2006 Multidmedia Limited {mdm}


Flex 2 & ActionScript 3 53

9. Click OK to close the properties dialog

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

Initializing {mdm}Script 2.0 in Flex 2 Projects

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:

<?xml version="1.0" encoding="utf-8"?>


<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
creationComplete="initApp()">

function initApp()
{
mdm.Application.init(this);
}

This is required to ensure the {mdm}Script 2.0 object is correctly initialized.

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:

public class HelloWorldTestZinc extends Sprite


{
public function HelloWorldTestZinc(){
mdm.Application.init(this,OnInit);
}

public function OnInit():void


{
mdm.Dialogs.prompt("Hello from AS3!")
}
}

To get started with Flex2/AS3 Development, please visit http://www.multidmedia.com/support/developers/articles

©2006 Multidmedia Limited {mdm}


Part V
Tutorials 55

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:

Press OK to launch the Command Line Window.

©2006 Multidmedia Limited {mdm}


56 ZINC™ v2.5 Help Manual

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"

5.2 Creating an Extension


5.2.1 Introduction

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:

©2006 Multidmedia Limited {mdm}


Tutorials 57

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:

©2006 Multidmedia Limited {mdm}


58 ZINC™ v2.5 Help Manual

With the Beep Chapter selected, click on "Display" to view the usage references shown below:

©2006 Multidmedia Limited {mdm}


Tutorials 59

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:

Frequency (in hertz)


Duration (in milliseconds)

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:

©2006 Multidmedia Limited {mdm}


60 ZINC™ v2.5 Help Manual

This will launch the Zinc™v2.5 Extension Creator:

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:

©2006 Multidmedia Limited {mdm}


Tutorials 61

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:

©2006 Multidmedia Limited {mdm}


62 ZINC™ v2.5 Help Manual

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.

©2006 Multidmedia Limited {mdm}


Tutorials 63

Click on the "Command Tester" Tab:

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:

©2006 Multidmedia Limited {mdm}


64 ZINC™ v2.5 Help Manual

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:

©2006 Multidmedia Limited {mdm}


Tutorials 65

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

5.3 Custom File Menu


5.3.1 Introduction

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:

©2006 Multidmedia Limited {mdm}


66 ZINC™ v2.5 Help Manual

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.

Add the following code:

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

©2006 Multidmedia Limited {mdm}


Tutorials 67

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.

5.4 Database Connectivity


5.4.1 Introduction

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

©2006 Multidmedia Limited {mdm}


68 ZINC™ v2.5 Help Manual

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.

b) This Tutorial assumes a basic understanding of Databases and SQL statements.

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":

mdm.Database.MSAccess.select("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

©2006 Multidmedia Limited {mdm}


Tutorials 69

"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.

©2006 Multidmedia Limited {mdm}


70 ZINC™ v2.5 Help Manual

5.5 Masking Projectors


5.5.1 Introduction

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:

©2006 Multidmedia Limited {mdm}


Tutorials 71

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.

5.6 Packing & Extracting Files


5.6.1 Introduction

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);
}

Create a second button, and attach the following code to it:

on(release){
packedFile = "myPic.txt";
extractedFile = mdm.System.Paths.temp+"myPic.tif";
mdm.Application.Library.extractToFile(packedFile, extractedFile);

©2006 Multidmedia Limited {mdm}


72 ZINC™ v2.5 Help Manual

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!

5.7 Socket Communication


5.7.1 Introduction

Introduction

©2006 Multidmedia Limited {mdm}


Tutorials 73

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.

Sending Data is composed of three parts:

· The destination information: This is the IP address.


· The port number of the client computer.
· The message to be sent.

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.

A projector-to-projector message is designed to SET variables on the remote Flash Application.

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".

©2006 Multidmedia Limited {mdm}


74 ZINC™ v2.5 Help Manual

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.

5.8 Using Video


5.8.1 Introduction

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:

©2006 Multidmedia Limited {mdm}


Tutorials 75

myVideo = new mdm.WMP6 (0, 0, 320, 240, "myClip.mpg")

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:

myVideo2 = new mdm.WMP6 (320, 0, 320, 240, "myClip.mpg")

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()
}

Select the second button and enter the following code:

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

©2006 Multidmedia Limited {mdm}


76 ZINC™ v2.5 Help Manual

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.

5.9 Global & Secure Variables


5.9.1 Introduction

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;
}

This Command is used to request Secure variables.

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:

©2006 Multidmedia Limited {mdm}


Tutorials 77

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.

©2006 Multidmedia Limited {mdm}


Part VI
{mdm}Script 2.0 API 79

6 {mdm}Script 2.0 API


6.1 mdm.ActiveX

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.ActiveX

Constructor Summary for the ActiveX Class

The following table lists constructors for the ActiveX class

Constructor Description
Inserts an activeX/OLE object using the specified
mdm.ActiveX()
parameters.

Method Summary for the ActiveX Class

The following table lists methods of the ActiveX class

Method Description
ActiveX.addMethodParam() Will populate the argument list with Values and Types.
ActiveX.close() Closes a previously created ActiveX Instance.

Executes a custom or non-standard verb on the ActiveX


ActiveX.doVerbCustom()
Object.
Executes a DISCARDUNDOSTAT verb on the ActiveX
ActiveX.doVerbDiscardUndoState()
Object.
ActiveX.doVerbHide() Executes a HIDE verb on the ActiveX Object.
Executes an INPLACEACTIVATE verb on the ActiveX
ActiveX.doVerbInPlaceActivate()
Object.
ActiveX.doVerbPrimary() Executes a PRIMARY verb on the ActiveX Object.

ActiveX.doVerbOpen() Executes an OPEN verb on the ActiveX Object.

ActiveX.doVerbShow() Executes an SHOW verb on the ActiveX Object.

ActiveX.doVerbUIActivate() Executes an UIACTIVATE verb on the ActiveX Object.

ActiveX.getProperty() Will return the value of an ActiveX/OLE Property.

ActiveX.hide() Hides a previously created ActiveX Instance.


Loads a previously saved status of a current ActiveX
ActiveX.loadObject()
Object.
ActiveX.runMethod() Will run the specified method on the ActiveX Object.
Will run the specified method on the ActiveX Object with a
ActiveX.runMethodRet()
Return.
ActiveX.saveDoc() Saves the document contained within an ActiveX Object.

ActiveX.saveObject() Saves the status of the current ActiveX Object for later use.

ActiveX.setProperty() Will set the ActiveX Object's Property Value

ActiveX.show() Shows a previously created ActiveX Instance

©2006 Multidmedia Limited {mdm}


80 ZINC™ v2.5 Help Manual

Property Summary for the ActiveX Class

The following table lists properties of the ActiveX class

Property Description
Integer specifying the Height of the ActiveX Instance in
ActiveX.height
Pixels.
ActiveX.visible Boolean which shows or hides the ActiveX Instance.

Integer specifying the Width of the ActiveX Instance in


ActiveX.width
Pixels.
ActiveX.x Integer specifying the X position of the ActiveX Instance.

ActiveX.y Integer specifying the Y position of the ActiveX Instance.

6.1.1 Constructor
6.1.1.1 mdm.ActiveX()

Availability

Windows

Constructor

mdm.ActiveX(x:Number, y:Number, width:Number, height:Number, object:String):Void

Parameters

x:Number X position

y:Number Y Position

width:Number Width of Instance in Pixels

height:String Height if Instance in Pixels

object:String ActiveX Object Name

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.

c) Some examples of class ID's for immediate use are:

word.document
mediaplayer.mediaplayer
wmplayer.ocx
shockwaveflash.shockwaveflash.1

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 81

Example

Create a new Instance called myActiveX with absolute positioning:

myActiveX = new mdm.ActiveX(0, 0, 400, 350, "excel.sheet")

Create a new Instance called myActiveX with relative positioning:

// t = top
// b = bottom
// l = left
// r = right
// c = center

myActiveX = new mdm.ActiveX("t", "c", "50%", "50%", "excel.sheet")

6.1.2 Methods
6.1.2.1 ActiveX.addMethodParam()

Availability

Windows

Usage

ActiveXinstance.addMethodParam(paramID:Number, paramType:String, paramValue:String)


:Void

Parameters

paramID:Number Integer ID of the Argument

paramType:String The Parameter Type

paramValue:String The Parameter Value

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:

myActiveX.addMethodParam(1, "string", "John")


myActiveX.addMethodParam(2, "integer", 35)

6.1.2.2 ActiveX.close()

Availability

Windows

©2006 Multidmedia Limited {mdm}


82 ZINC™ v2.5 Help Manual

Usage

ActiveXinstance.close():Void

Parameters

None

Returns

Nothing

Description

Closes a previously created ActiveX Instance

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

To close the ActiveX Instance myActiveX :

myActiveX.close()

6.1.2.3 ActiveX.doVerbCustom()

Availability

Windows

Usage

ActiveXinstance.doVerbCustom(verbID:Number):Void

Parameters

VerbID:Number Integer ID of the Verb

Returns

Nothing

Description

Executes a custom or non-standard verb on the ActiveX object, specified by an integer ID.

Notes

For use after an ActiveX Object has been instantiated.

Example

To execute this command on the ActiveX Object, myActiveX :

myActiveX.doVerbCustom(10)

6.1.2.4 ActiveX.doVerbDiscardUndoState()

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 83

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

For use after an ActiveX Object has been instantiated.

Example

To execute this command on the ActiveX Object, myActiveX :

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

For use after an ActiveX Object has been instantiated.

Example

To execute this command on the ActiveX Object, myActiveX :

myActiveX.doVerbHide()

6.1.2.6 ActiveX.doVerbInPlaceActivate()

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


84 ZINC™ v2.5 Help Manual

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

For use after an ActiveX Object has been instantiated.

Example

To execute this command on the ActiveX Object, myActiveX :

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

For use after an ActiveX Object has been instantiated.

Example

To execute this command on the ActiveX Object, myActiveX :

myActiveX.doVerbPrimary()

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 85

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

For use after an ActiveX Object has been instantiated.

Example

To execute this command on the ActiveX Object, myActiveX :

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

For use after an ActiveX Object has been instantiated.

Example

To execute this command on the ActiveX Object, myActiveX :

©2006 Multidmedia Limited {mdm}


86 ZINC™ v2.5 Help Manual

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

For use after an ActiveX Object has been instantiated.

Example

To execute this command on the ActiveX Object, myActiveX :

myActiveX.doVerbUIActivate()

6.1.2.11 ActiveX.getProperty()

Availability

Windows

Usage

ActiveXinstance.getProperty(propertyName:String):String

Parameters

propertyName:String reference to the Property Name

Returns

A String

Description

Will return the value of an ActiveX/OLE Property.

Notes

Regardless of the property type, the returned value will always be a string.

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 87

To receive the value of a property called Movie, in an ActiveX Object referenced as myActiveX :

var result = myActiveX.getProperty("Movie");

6.1.2.12 ActiveX.hide()

Availability

Windows

Usage

ActiveXinstance.hide():Void

Parameters

None

Returns

Nothing

Description

Hides a previously created ActiveX Instance

Notes

For use after an ActiveX Object has been instantiated.

Example

To hide the ActiveX Instance myActiveX :

myActiveX.hide()

6.1.2.13 ActiveX.loadObject()

Availability

Windows

Usage

ActiveXinstance.loadObject(fileName:String):Void

Parameters

fileName:String reference to the Path/Name of the File to load

Returns

Nothing

Description

Loads a previously saved status of a current ActiveX/OLE object.

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")

©2006 Multidmedia Limited {mdm}


88 ZINC™ v2.5 Help Manual

6.1.2.14 ActiveX.runMethod()

Availability

Windows

Usage

ActiveXinstance.runMethod(methodName:String, numArguments:String):Void

Parameters

methodName:String reference to the Method Name

numArguments:Number An Integer reference to the number of Arguments

Returns

Nothing

Description

Will run the specified method on the ActiveX/OLE Object.

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:

// First declare the Method Parameters

myActiveX.addMethodParam("1", "string", "John")


myActiveX.addMethodParam(2, "integer", 35)

// 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

methodName:String reference to the Method Name

numArguments:Number An Integer reference to the number of Arguments

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 89

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:

// First declare the Method Parameters

myActiveX.addMethodParam(1, "string", "John")


myActiveX.addMethodParam(2, "integer", 35)

// Run the Method

Result = myActiveX.runMethodRet("myMethod", 2);

In the next example below, the same Method does not have any Parameters. In this case, the correct code would be:

Result = myActiveX.runMethodRet("myMethod", 0);

6.1.2.16 ActiveX.saveDoc()

Availability

Windows

Usage

ActiveXinstance.saveDoc(fileName:String):Void

Parameters

fileName:String value which contains a File Path/Name

Returns

Nothing

Description

Saves the document contained within an ActiveX/OLE Object.

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

©2006 Multidmedia Limited {mdm}


90 ZINC™ v2.5 Help Manual

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

fileName:String A String reference to the Path/Name of the File to save

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

propertyName:String A String reference to the Property Name

propertyType:String A String reference to the Property Type (string, boolean, integer)

newValue:String A String reference to the New Property Value

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 91

We have a Shockwave Flash Object loaded in the instance myActiveX and we want to set the movie property:

myActiveX.setProperty("Movie", "string", "C:\\myMovies\\Movie1.swf");

6.1.2.19 ActiveX.show()

Availability

Windows

Usage

ActiveXinstance.show():Void

Parameters

None

Returns

Nothing

Description

Shows a previously created ActiveX Instance

Notes

For use after an ActiveX Object has been instantiated.

Example

To show the ActiveX Instance myActiveX :

myActiveX.show()

6.1.3 Properties
6.1.3.1 ActiveX.height

Availability

Windows

Usage

ActiveXinstance.height:Number

Description

Gets or Sets the Height as an integer of the referenced ActiveX instance

Notes

None

Example

The following code sets the Height of the myActiveX object to 500 pixels:

myActiveX.height = 500;

©2006 Multidmedia Limited {mdm}


92 ZINC™ v2.5 Help Manual

6.1.3.2 ActiveX.visible

Availability

Windows

Usage

ActiveXinstance.visible:Boolean

Description

Sets the visibility of the ActiveX Instance.

Notes

None

Example

To hide the ActiveX Instance called myActiveX:

myActiveX.visible = false;

6.1.3.3 ActiveX.width

Availability

Windows

Usage

ActiveXinstance.width:Number

Description

Gets or Sets the Width as an integer of the referenced ActiveX instance

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 93

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

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Application

Object Summary for the Application Class

The following table lists objects of the Application class

Object Description
Library Library Object
Screensaver Screensaver Object

Timer Timer Object

Trial Trial Object

Method Summary for the Application Class

The following table lists methods of the Application class

Method Description
Application.bringToFront() Restores the application to topmost standard mode.
Application.delay() Pauses all execution in the form it is called from.

Processes any system messages in the system message


Application.doEvents()
queue.

©2006 Multidmedia Limited {mdm}


94 ZINC™ v2.5 Help Manual

When executed, this command will catch an external exit


Application.enableExitHandler()
command.
Application.exit() Exits the Projector.

Application.exitWithCode() Exit the Projector with a system code.


Closes a previously launched modal form and returns the
Application.exitWithModalResult()
modalResult to the Parent Form
Retrieves the command line parameter set when the
Application.getCMDParams()
Projector has been executed from the command line.
Application.getEnvVar() Returns a previously set Environment Variable.
Will return the value of the specified secure variable from
Application.getSecureVar()
the Application Wrapper.
Application.maximize() Maximizes the Projector to Full Screen

Application.minimize() Minimizes the Projector.


Sets the "minimize to tray" flag to "true" so that the
Application.minimizeToTray() application will minimize to the Tray Icon and not the
Taskbar.
Application.printVar() Prints the contents of the variable.

Application.restore() Restores the Projector to it's original default size


Uses the system text2speech capabilities to read back a
Application.say()
String.
Application.sendToBack() Sends the application behind any system windows.
Will set (or create if not declared), a LOCAL environment
Application.setEnvVar()
variable to the specified value.
Application.shake() Shakes the Projector the amount of times specified.
Application.showTips() Loads a Tips Window from your projector populated with
custom data.
Application.textAreaEnhance() Will enhance copying and pasting from within text boxes.

Property Summary for the Application Class

The following table lists properties of the Application class

Property Description
Application.filename Contains the Application File Name.
Application.filenameUnicode Contains the Application File Name. Unicode Compliant.

Contains the Application File Name in Unix Format for Mac


Application.filenameUnix
OSX.
Returns a Boolean value indicating whether the App is
Application.isMinimized
minimized.
Application.path Contains the Application Path.

Application.pathUnicode Contains the Application Path. Unicode Compliant.

Application.pathUnix Contains the Application Path in Unix Format for Mac OSX.
Application.title Sets the Application Title.

Event Summary for the Application Class

The following table lists events of the Application class

Event Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 95

Executes a function upon a change in Focus of the Main


onAppChangeFocus
Application
onAppExit Executes a function when the User attempts to Exit the
Application.
onAppMinimize Executes a function when the Projector is Minimized.

onAppRestore Executes when the Application Restores.

onArrowKeyPress Executes when any Arrow/Cursor Key is Pressed.


Executes when the specific Form touches the bottom side
onBottomHit
of the Desktop Area
Executes when the user drops a File/Files onto the
onDragDrop
Projector.
onFormChangeFocus Executes a function upon a change in Form Focus.

onFormClose Executes a function when the specific Form is Closed.

onFormMaximize Executes a function when the specific Form is Maximized.

onFormMinimize Executes a function when the specific Form is Minimized.


Executes a function when the specific Form is
onFormReposition
Repositioned.
onFormResize Executes a function when the specific Form is Resized.

onFormRestore Executes a function when the specific Form is Restored.


Executes when the specific Form touches the left side of
onLeftHit
the Desktop Area
onMDMScriptException Executes when an {mdm}Script Exception occurs.
Executes when an {mdm}Script Exception occurs. Mac
onMDMScriptExceptionOSX
OSX Specific.
Executes when the specific Form touches the right side of
onRightHit
the Desktop Area.
onSplashClosed Executes when a custom splash closes.
Executes when the specific Form touches the top side of
onTopHit
the Desktop Area.

6.2.1 Objects
6.2.1.1 Application.Library

Availability

Zinc 2.5 (Windows, MacOSX)

ActionScript Class Name

mdm.Application.Library

Method Summary for the Library Class

The following table lists methods of the Library class

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.

©2006 Multidmedia Limited {mdm}


96 ZINC™ v2.5 Help Manual

Application.Library.extractToExecPat Extracts a packed file to the same directory as the


h() Projector.
Application.Library.extractToFile() Extracts a packed file to the path and filename specified.

Application.Library.extractToVar() Extracts a packed file directly to a variable.

6.2.1.1.1 Methods

6.2.1.1.1.1 Application.Library.extractAllToDir()

Availability

Windows, Mac OSX

Usage

mdm.Application.Library.extractAllToDir(extractDir:String):Void

Parameters

extractDir:String Target folder path

Returns

Nothing

Description

Extracts all packed files to the specified directory.

Example

mdm.Application.Library.extractAllToDir("c:\\");
6.2.1.1.1.2 Application.Library.extractAllToExecPath()

Availability

Windows, Mac OSX

Usage

mdm.Application.Library.extractAllToExecPath():Void

Parameters

None

Returns

Nothing

Description

Extracts all packed files to the same directory as the Projector.

Example

mdm.Application.Library.extractAllToExecPath();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 97

6.2.1.1.1.3 Application.Library.extractToExecPath()

Availability

Windows, Mac OSX

Usage

mdm.Application.Library.extractToExecPath(packedFile:String, extractedFile:String
):Void

Parameters

packedFile:String Reference to file name to be extracted

extractedFile:String Reference to target file name (file name to be created)

Returns

Nothing

Description

Extracts a packed file to the same directory as the Projector.

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

Windows, Mac OSX

Usage

mdm.Application.Library.extractToFile(packedFile:String, extractedFilePath:String)
:Void

Parameters

packedFile:String Reference to file name to be extracted

extractedFilePath:String Reference to target file path (file path where file is to be created)

Returns

Nothing

Description

Extracts a packed file to the path and filename specified.

Notes

The extractedFilePath parameter must include a path: directory + file name.

Example

©2006 Multidmedia Limited {mdm}


98 ZINC™ v2.5 Help Manual

mdm.Application.Library.extractToFile("myFile.txt", "c:\\myFile.txt");

6.2.1.1.1.5 Application.Library.extractToVar()

Availability

Windows, Mac OSX

Usage

mdm.Application.Library.extractToVar(packedFile:String):String

Parameters

packedFile:String Reference to file name to be extracted

Returns

A String

Description

Extracts a packed file directly to a variable.

Notes

The extractedFile parameter must NOT include a path.

Example

var myData = mdm.Application.Library.extractToVar("myFile.txt");

6.2.1.2 Application.Screensaver
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Application.Screensaver

Method Summary for the Screensaver Class

The following table lists events of the Screensaver class

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 99

mdm.Application.Screensaver.mouseMoveExits(Exits:Boolean):Void

Parameters

Exits:Boolean Reference to Exit upon Mouse Movement

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

Exits:Boolean Reference to Exit upon Key Press

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

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Application.Timer

Method Summary for the Timer Class

The following table lists methods of the Timer class

Method Description
Application.Timer.start() Enables a Global Projector Timer.
Application.Timer.stop() Disables the Specified Projector Timer.

Application.Timer.stopAll() Disables all previously started timers.

©2006 Multidmedia Limited {mdm}


100 ZINC™ v2.5 Help Manual

Event Summary for the Timer Class

The following table lists events of the Timer class

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

mdm.Application.Timer.start(id:Number, interval:Number, cycle:Boolean):Void

Parameters

id:Number Timer identifier

interval:Number Timer interval in miliseconds

cycle:Boolean Boolean flag

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:

mdm.Application.Timer.start(0, 1000, true);

6.2.1.3.1.2 Application.Timer.stop()

Availability

Windows

Usage

mdm.Application.Timer.stop(id:Number):Void

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 101

Parameters

id:Number Timer identifier

Returns

Nothing

Description

Disables the Specified Projector Timer.

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

Disables all previously started Timers.

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.

©2006 Multidmedia Limited {mdm}


102 ZINC™ v2.5 Help Manual

Notes

This function will only execute when enabled with mdm.Application.Timer.start()

Example

The following code displays a prompt when Timer 1 executes:

mdm.Application.Timer.onTimer1 = function(){
mdm.Dialogs.Prompt("Timer 1 Interval")
}

6.2.1.4 Application.Trial
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Application.Trial

Method Summary for the Trial Class

The following table lists methods of the Trial class

Method Description
Will activate a valid serial and remove the Projector Trial
Application.Trial.activate()
Protection.
Application.Trial.evaluate() Will validate a specified serial.

Application.Trial.resetTimer() Will Reset the Trial Protection.

Property Summary for the Trial Class

The following table lists properties of the Trial class

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

serial:String Reference to a valid serial

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 103

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");

Prompt the user directly:

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

serial:String Reference to a valid serial

Returns

A Boolean

Description

Compares the serial specified with the internal serial list.

Notes

Returns "true" if the serial is valid and "false" if invalid.

Example

Simple Usage:

Result = mdm.Application.Trial.evaluate("ABC1234HB67N");

Prompt the user directly:

if (mdm.Application.Trial.evaluate("ABC1234HB67N") == false){
mdm.Dialogs.prompt("Your Serial is Invalid")
}

©2006 Multidmedia Limited {mdm}


104 ZINC™ v2.5 Help Manual

6.2.1.4.1.3 Application.Trial.resetTimer()

Availability

Windows

Usage

mdm.Application.Trial.resetTimer():Void

Parameters

None

Returns

Nothing

Description

Will reset the Trial Protection.

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

Contains the Number of Days left in a Trial Limited Projector.

Notes

None

Example

var myVar = Application.Trial.daysLeft;

6.2.1.4.2.2 Application.Trial.expired

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 105

mdm.Application.Trial.expired:Boolean

Description

Returns "true" or "false" based upon the Expiration of a Trial Projector.

Notes

None

Example

var myVar = Application.Trial.expired;

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

var myVar = Application.Trial.tampered;

6.2.1.4.2.4 Application.Trial.usesLeft

Availability

Windows

Usage

mdm.Application.Trial.usesLeft:Number

Description

Contains the Number of Uses left in a Trial Limited Projector.

Notes

None

Example

var myVar = Application.Trial.usesLeft;

©2006 Multidmedia Limited {mdm}


106 ZINC™ v2.5 Help Manual

6.2.2 Methods
6.2.2.1 Application.bringToFront()

Availability

Windows

Usage

mdm.Application.bringToFront():Void

Parameters

None

Returns

Nothing

Description

Restores the application to standard mode after executing mdm.Application.sendToBack()

Notes

None

Example

mdm.Application.bringToFront()

6.2.2.2 Application.delay()

Availability

Windows

Usage

mdm.Application.delay(delay:Number):Void

Parameters

delay:Number Time in milliseconds to wait

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)

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 107

6.2.2.3 Application.doEvents()

Availability

Windows

Usage

mdm.Application.doEvents():Void

Parameters

None

Returns

Nothing

Description

Processes any system messages in the system message queue.

Notes

None

Example

mdm.Application.doEvents()

6.2.2.4 Application.enableExitHandler()

Availability

Windows, Mac OSX

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

To enable the Exit Handler:

mdm.Application.enableExitHandler()

©2006 Multidmedia Limited {mdm}


108 ZINC™ v2.5 Help Manual

6.2.2.5 Application.exit()

Availability

Windows, Mac OSX

Usage

mdm.Application.exit():Void

or

mdm.Application.exit(opt:String, message:String):Void

Parameters

opt:String Constant optional parameter of value "ask"

sourceFile:String Optional message string - required with "ask" parameter

Returns

Nothing

Description

Exits the Projector.

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

To exit the Application with no confirmations:

mdm.Application.exit()

To exit the Application with a custom confirmation:

mdm.Application.exit("ask","Are you sure you want to Exit?")

6.2.2.6 Application.exitWithCode()

Availability

Windows

Usage

mdm.Application.exitWithCode(exitCode:Number):Void

Parameters

exitCode:Number An Integer Value between 0 and 255

Returns

Nothing

Description

Exits the Projector and sets the System Exit Code to the value defined in exitCode

Notes

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 109

This command should only be used by experienced developers who need to set a System Exit Code when their Projector
Exits.

Example

To exit the Application with a System Exit Code of "25":

mdm.Application.exitWithCode(25)

6.2.2.7 Application.exitWithModalResult()

Availability

Windows

Usage

mdm.Application.exitWithModalResult(modalResult:String):Void

Parameters

modalResult:String reference to the Modal Result Message

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

©2006 Multidmedia Limited {mdm}


110 ZINC™ v2.5 Help Manual

cmdID:Number An Integer reference to the Command Line Parameter ID

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

To request the first 2 Command Line Parameters executed:

cmdParam1 = mdm.Application.getCMDParams(1)
cmdParam2 = mdm.Application.getCMDParams(2)

To request the remaining 3 Command Line Parameters executed:

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

varName:String reference to the Environmental Variable Name

Returns

A String

Description

Returns a previously set Environment Variable.

Notes

For use after mdm.Application.setEnvVar() - This command is available for advanced users, and certain software
protection packages.

Example

To retrieve a previously set Environmental Variable called myEnvVar :

Result = mdm.Application.getEnvVar("myEnvVar");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 111

6.2.2.10 Application.getSecureVar()

Availability

Windows

Usage

mdm.Application.getSecureVar(varName:String):String

Parameters

varName:String A String reference to the Secure Variable Name

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

To retrieve a Secure Variable called mySecureVar :

Result = mdm.Application.getSecureVar("mySecureVar");

6.2.2.11 Application.maximize()

Availability

Windows, Mac OSX

Usage

mdm.Application.maximize():Void

Parameters

None

Returns

Nothing

Description

Maximizes the Projector to Full Screen.

Notes

None

Example

To Maximize the Application:

mdm.Application.maximize()

©2006 Multidmedia Limited {mdm}


112 ZINC™ v2.5 Help Manual

6.2.2.12 Application.minimize()

Availability

Windows, Mac OSX

Usage

mdm.Application.minimize():Void

Parameters

None

Returns

Nothing

Description

Minimizes the Projector.

Notes

None

Example

To Minimize the Application:

mdm.Application.minimize()

6.2.2.13 Application.minimizeToTray()

Availability

Windows

Usage

mdm.Application.minimizeToTray(enable:Boolean):Void

Parameters

enable:Boolean A boolean value which enables or disbales the behavior

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.

The Tray Icon must be enabled for this command to function.

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

To Minimize an Application to the Tray, you must first use:

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 113

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

varToPrint:String Variable or String to Print

showPrintDialog:Boolean Boolean value to determine presence of the Print Dialog

Returns

Nothing

Description

Prints the contents of the variable varToPrint.

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:

mdm.Application.printVar("Print this Text", false)

6.2.2.15 Application.restore()

Availability

Windows, Mac OSX

Usage

mdm.Application.restore():Void

Parameters

None

Returns

Nothing

Description

©2006 Multidmedia Limited {mdm}


114 ZINC™ v2.5 Help Manual

Restores the Projector to it's original default size.

Notes

None

Example

To Restore the Application:

mdm.Application.restore()

6.2.2.16 Application.say()

Availability

Windows, Mac OSX

Usage

mdm.Application.say(text2speech:String):Void

Parameters

text2speech:String A String value which contains the message

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 115

Description

Sends the application behind any system windows.

Notes

None

Example

mdm.Application.sendToBack()

6.2.2.18 Application.setEnvVar()

Availability

Windows

Usage

mdm.Application.setEnvVar(varName:String, varValue:String):Void

Parameters

varName:String A String reference to the Environmental Variable Name

varValue:String A String reference to the Environmental Variable Value

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

To Set an Environmental Variable called myEnVar with the value "Zinc":

mdm.Application.setEnvVar("myEnvVar", "Zinc")

6.2.2.19 Application.shake()

Availability

Windows, Mac OSX

Usage

mdm.Application.shake(shakeTime:Number):Void

Parameters

shakeTime:Number An Integer reference to the number of times to shake

Returns

©2006 Multidmedia Limited {mdm}


116 ZINC™ v2.5 Help Manual

Nothing

Description

Shakes the Projector the amount of times specified.

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

tips:String A delimited String

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 a Tips Window which contains 3 "tips":

mdm.Application.showTips("Zinc is Awesome!;Zinc Rocks!;Zinc kicks a**!");

To display the same Window, but with a result to the checked status of "Show Tips on Startup":

Result = mdm.Application.showTips("Zinc is Awesome!;Zinc Rocks!;Zinc kicks a**!");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 117

6.2.2.21 Application.textAreaEnhance()

Availability

Windows

Usage

mdm.Application.textAreaEnhance(enhance:Boolean):Void

Parameters

enhance:Boolean Reference to the Main Application

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

Windows, Mac OSX

Usage

mdm.Application.filename:String

Description

Contains the Application File Name.

Notes

Mac OSX returns the full Path and File Name. Read Only.

Example

Simple Usage:

var myApp = mdm.Application.filename;

Prompt the value directly:

mdm.Dialogs.prompt(mdm.Application.filename);

6.2.3.2 Application.filenameUnicode

Availability

©2006 Multidmedia Limited {mdm}


118 ZINC™ v2.5 Help Manual

Windows

Usage

mdm.Application.filenameUnicode:String

Description

Gets the Application File Name.

Notes

Unicode Compliant. Read Only

Example

Simple Usage:

var myApp = mdm.Application.filenameUnicode;

Prompt the value directly:

mdm.Dialogs.prompt(mdm.Application.filenameUnicode);

6.2.3.3 Application.filenameUnix

Availability

Mac OSX

Usage

mdm.Application.filenameUnix:String

Description

Gets the Application File Name.

Notes

Unix Format for Mac OSX.

Example

Simple Usage:

var myApp = mdm.Application.filenameUnix;

Prompt the value directly:

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).

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 119

Notes

None

Example

Simple Return:

Result = mdm.Application.isMinimized()

Used within IF Statement:

if (mdm.Application.isMinimized() == true){
mdm.Dialogs.prompt("Application is Minimized");
}

6.2.3.5 Application.path

Availability

Windows, Mac OSX

Usage

mdm.Application.path:String

Description

Contains the Application Path

Notes

Read Only.

Example

Simple Usage:

var myAppPath = mdm.Application.path;

To construct a path to a file located in the same directory as your Application:

var path = mdm.Application.path+"myImage.jpg";

6.2.3.6 Application.pathUnicode

Availability

Windows

Usage

mdm.Application.pathUnicode:String

Description

Contains the Application Path

Notes

Unicode Compliant. Read Only.

Example

©2006 Multidmedia Limited {mdm}


120 ZINC™ v2.5 Help Manual

Simple Usage:

var myAppPath = mdm.Application.pathUnicode;

To construct a path to a file located in the same directory as your Application:

var path = mdm.Application.pathUnicode+"myImage.jpg";

6.2.3.7 Application.pathUnix

Availability

Mac OSX

Usage

mdm.Application.pathUnix:String

Description

Contains the Application Path

Notes

Unix Format for Mac OSX.

Example

Simple Usage:

var myAppPath = mdm.Application.pathUnix;

To construct a path to a file located in the same directory as your Application:

var path = mdm.Application.pathUnix+"myImage.jpg";

6.2.3.8 Application.title

Availability

Windows

Usage

mdm.Application.title:String

Description

Sets the Application title.

Notes

Write Only.

Example

mdm.Application.title = "My New Title";

6.2.4 Events
6.2.4.1 onAppChangeFocus

Availability

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 121

Windows

Usage

mdm.Application.onAppChangeFocus:Function

Parameters

None

Description

Executes a function upon a change in Focus of the Main Application

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

Windows, Mac OSX

Usage

mdm.Application.onAppExit:Function

Parameters

None

Description

Executes a function when the User attempts to Exit the Application.

Notes

This function will only execute when enabled with mdm.Application.enableExitHandler()

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

©2006 Multidmedia Limited {mdm}


122 ZINC™ v2.5 Help Manual

Description

Executes a function when the Projector is Minimized.

Notes

Not supported on Transparent Projectors.

Example

The following code displays a prompt when the Application is Minimized:

mdm.Application.onAppMinimize = function(){
mdm.Dialogs.prompt("Application Minimized")
}

6.2.4.4 onAppRestore

Availability

Windows

Usage

mdm.Application.onAppRestore:Function

Parameters

None

Description

Executes when the Application Restores.

Notes

Not supported on Transparent Projectors.

Example

The following code displays a prompt when the Application is restored:

mdm.Application.onAppRestore = function(){
mdm.Dialogs.prompt("Application restored")
}

6.2.4.5 onArrowKeyPress

Availability

Windows

Usage

mdm.Application.onArrowKeyPress:Function

Parameters

status:String A reference to the Key State.

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 123

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

Applicable to Transparent Form Only.

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

Applicable to Transparent Form Only.

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

Windows, Mac OSX

Usage

©2006 Multidmedia Limited {mdm}


124 ZINC™ v2.5 Help Manual

mdm.Application.onDragDrop:Function

Parameters

files:Array An array containing file(s) dropped on the Projector.

Description

Executes when the user drags and drops a file or files onto the Projector.

Notes

This event must is activated with mdm.Forms.dndEnable()

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

Windows, Mac OSX

Usage

mdm.Application.onFormChangeFocus:Function

Parameters

status:Boolean If form is in focus.

Description

Executes a function upon a change in Form Focus.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 125

Description

Executes when the specific Form is Closed.

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

clientWidth:Number Flash content width in pixels.

clientHeight:Number Flash content height in pixels.

width:Number Window hosting flash content width in pixels.

height:Number Window hosting flash content height in pixels.

Description

Executes when the specific Form is Maximized.

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

clientWidth:Number Flash content width in pixels.

clientHeight:Number Flash content height in pixels.

©2006 Multidmedia Limited {mdm}


126 ZINC™ v2.5 Help Manual

width:Number Window hosting flash content width in pixels.

height:Number Window hosting flash content height in pixels.

Description

Executes when the specific Form is Minimized.

Notes

None

Example

mdm.Application.onFormMinimize = function(myObject){
mdm.Dialogs.prompt(myObject.width)
mdm.Dialogs.prompt(myObject.height)
}

6.2.4.12 onFormReposition

Availability

Windows, Mac OSX

Usage

mdm.Application.onFormReposition:Function

Parameters

x:Number Form X position on screen in pixels.

y:Number Form Y position on screen in pixels

Description

Executes when the specific Form is repositioned.

Notes

None

Example

mdm.Application.onFormReposition = function(myObject){
var xPos = myObject.x
var yPos = myObject.y
}

6.2.4.13 onFormResize

Availability

Windows, Mac OSX

Usage

mdm.Application.onFormResize:Function

Parameters

clientWidth:Number Flash content width in pixels.

clientHeight:Number Flash content height in pixels.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 127

width:Number Window hosting flash content width in pixels.

height:Number Window hosting flash content height in pixels.

Description

Executes when the specific Form is resized.

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

clientWidth:Number Flash content width in pixels.

clientHeight:Number Flash content height in pixels.

width:Number Window hosting flash content width in pixels.

height:Number Window hosting flash content height in pixels.

Description

Executes when the specific Form is restored.

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

©2006 Multidmedia Limited {mdm}


128 ZINC™ v2.5 Help Manual

Description

Executes when the specific Form touches the Left side of the Desktop Area.

Notes

Applicable to Transparent Form Only.

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

formType:String Form Type - "Standard" or "Transparent"

command:String Command at which the Exception occured

message:String Error Message.

frameNumber:Number Frame Number where error occured.

parameter:Number Parameter where error occured.

value:String Value of Paramater where error occured.

Description

Executes a function when an {mdm}Script Exception Occurs.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 129

mdm.Application.onMDMScriptExceptionOSX:Function

Parameters

command:String Command at which the Exception occured

paramX:String Parameter value of the Command where X is 1-12

Description

Executes a function when an {mdm}Script Exception Occurs.

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

Applicable to Transparent Form Only.

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

©2006 Multidmedia Limited {mdm}


130 ZINC™ v2.5 Help Manual

None

Description

Executes a function once a Custom Splash Screen Closes.

Example

The following code displays a prompt when the Splash Closes:

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

Applicable to Transparent Form Only.

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

Zinc 2.5 (Mac OSX)

ActionScript Class Name

mdm.AppleScript

Method Summary for the AppleScript Class

The following table lists methods of the AppleScript class

Method Description
AppleScript.compileScript() Compiles a previously defined AppleScript.
AppleScript.getCompilationError() Returns error details if a compilation error occured.

AppleScript.getLastError() Returns error details if a runtime error occured.

Used to retrieve the value of the specified Property (if


AppleScript.getProperty()
applicable).

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 131

AppleScript.getResult() Used to retrieve the AppleScript result value (if applicable).

AppleScript.run() Will run the previously set and compiled AppleScript.

AppleScript.runEvent() This command will execute an AppleScript Event.


Used to set the value of the specified Property (if
AppleScript.setProperty()
applicable).
AppleScript.setScript() Used to set the AppleScript Function.

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

For use after an AppleScript has been set using mdm.AppleScript.setScript()

Example

To compile previously set script:

var compiled = mdm.AppleScript.compileScript()

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

©2006 Multidmedia Limited {mdm}


132 ZINC™ v2.5 Help Manual

Notes

For use after mdm.AppleScript.compileScript()

Example

To return a Compilation Error:

var errorDetails = mdm.AppleScript.getCompilationError();

Or to prompt the details directly:

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

For use after mdm.AppleScript.run()

Example

To return the Last Error Details:

var lastError = mdm.AppleScript.getLastError();

Or to prompt the details directly:

mdm.Dialogs.prompt(mdm.AppleScript.getLastError());

6.3.1.4 AppleScript.getProperty()

Availability

Mac OSX

Usage

mdm.AppleScript.getProperty(propertyName:String):String

Parameters

propertyName:String Reference to the Property Name

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 133

Returns

A String

Description

Used to retrieve the value of the specified Property (if applicable).

Notes

For use after mdm.AppleScript.compileScript()

Example

To return the value of a property called myProperty:

var propertyValue = mdm.AppleScript.getProperty("myProperty");

Or to prompt the value directly:

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

Used to retrieve the AppleScript result value (if applicable).

Notes

For use after mdm.AppleScript.run()

Example

var myResults = mdm.AppleScript.getResult();

6.3.1.6 AppleScript.run()

Availability

Mac OSX

Usage

mdm.AppleScript.run():Boolean

Parameters

None

©2006 Multidmedia Limited {mdm}


134 ZINC™ v2.5 Help Manual

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

To run a previously set and compiled AppleScript:

mdm.AppleScript.run()

To run the same AppleScript, but check for a true/false return:

var success = mdm.AppleScript.run();

To use the same AppleScript in a IF Statement:

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

eventName:String Reference to the Event Name

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

Let's assume we have set the following AppleScript using mdm.AppleScript.setScript():

on showDialog (message)
display dialog message

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 135

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:

mdm.AppleScript.runEvent("showDialog", "Hello World");

To run the same AppleScript, but check for a return (if applicable):

var myResult = mdm.AppleScript.runEvent("showDialog", "Hello World");

6.3.1.8 AppleScript.setProperty()

Availability

Mac OSX

Usage

mdm.AppleScript.setProperty(propertyName:String, propertyValue:String):String

Parameters

propertyName:String Reference to the Property Name

propertyValue:String Reference to the Property Value

Returns

A String

Description

Used to set the value of the specified Property (if applicable).

Notes

For use after mdm.AppleScript.compileScript()

Example

To set the value of a property called myProperty:

mdm.AppleScript.setProperty("myProperty", "This is my Value");

6.3.1.9 AppleScript.setScript()

Availability

Mac OSX

Usage

mdm.AppleScript.setScript(script:String):Void

Parameters

script:String Contains the AppleScript to be set

Returns

Nothing

©2006 Multidmedia Limited {mdm}


136 ZINC™ v2.5 Help Manual

Description

Used to set the AppleScript Function.

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

Below is an example of a simple AppleScript:

tell application "Finder"


empty trash
end tell

To set this Script:

mdm.AppleScript.setScript("tell application \"Finder\" empty trash end tell")

6.4 mdm.Audio

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Audio

Method Summary for the Audio Class

The following table lists methods of the Audio class

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.

Audio.startRecordingWithAutoOff() Will Capture Audio using a Microphone or Line In and


Automatically switch Off when silence is detected.
Audio.stopRecording() Will Stop a Recording Session.

6.4.1 Methods
6.4.1.1 Audio.isRecording()

Availability

Windows

Usage

mdm.Audio.isRecording():Boolean

Parameters

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 137

Returns

A Boolean

Description

Returns "true" or "false" based upon the the current audio recording state.

Notes

None

Example

Simple Usage:

var isRecording = mdm.Audio.isRecording();

Prompt the value directly:

mdm.Dialogs.prompt(mdm.Audio.isRecording());

6.4.1.2 Audio.startRecording()

Availability

Windows

Usage

mdm.Audio.startRecording(filename:String, sampleRate:Number, recordingMode:Number)


:Void

Parameters

filename:String The Filename and Path to save the Output WAV

sampleRate:Number The Sample Rate to Use

recordingMode:Number Stereo or Mono Recording Mode

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

©2006 Multidmedia Limited {mdm}


138 ZINC™ v2.5 Help Manual

mdm.Audio.startRecordingWithAutoOff(filename:String, sampleRate:Number,
recordingMode:Number, silenceThreshold:Number, silenceDuration:Number):Void

Parameters

filename:String The Filename and Path to save the Output WAV

sampleRate:Number The Sample Rate to Use

recordingMode:Number Stereo or Mono Recording Mode

silenceThreshold:Number A percentage of volume of noise that will be discounted as silence

silenceDuration:Number Amount of seconds of silence before automatically switching recording off

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

This command will stop a recording session.

Notes

None

Example

mdm.Audio.stopRecording()

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 139

6.5 mdm.Browser

Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Browser

Constructor Summary for the Browser Class

The following table lists constructors for the Browser class

Constructor Description
Inserts an Internet Explorer Browser Instance using the
mdm.Browser()
specified parameters.

Method Summary for the Browser Class

The following table lists methods of the Browser class

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.close() Closes the specified Browser Instance loaded.

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.

Browser.print() Prints the contents of the specified Browser Instance.

Browser.printCopies() Sets the number of Copies to Print.

Browser.printFooter() Sets the Footer Text of the Print out.

Browser.printHeader() Sets the Header Text of the Print out.


Browser.printHTMLHeader() Sets the Header HTML of the Print out.

Browser.printMargins() Sets the page margins of the Browser Print Job.

Browser.printOrientation() Sets the Page orientation of the Print Job.

Browser.printPreview() Shows a Print Preview of the specified Browser Instance.


Use to refresh the content inside a specified Browser
Browser.refresh()
Instance.
Sets the HTML content of a specific Frame in the specified
Browser.setSourceInTarget()
browser Instance.
Browser.show() Will show the specified Browser Instance.
Use to stop loading the content inside a specified Browser
Browser.stop()
Instance.

Property Summary for the Browser Class

©2006 Multidmedia Limited {mdm}


140 ZINC™ v2.5 Help Manual

The following table lists properties of the Browser class

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.

Browser.isBusy Contains current state of activity of the Browser Instance.

Browser.source Property which contains loaded page content.


Text property with current title of the page in the specified
Browser.title
Browser Instance
Browser.url Current path to page loaded into browser instance.

Browser.userAgent Sets the Browser Instance User Agent

Browser.visible Browser Instance Visibility.

Browser.width Integer value of pixel width of browser instance.

Browser.x Integer value which determines the X Position.

Browser.y Integer value which determines the Y Position.

Event Summary for the Browser Class

The following table lists events of the Browser class

Event Description
Executes when a Browser Instance has finished loading its
onDocumentComplete
URL.

6.5.1 Constructor
6.5.1.1 mdm.Browser()

Availability

Windows, Mac OSX

Constructor

mdm.Browser(x:Number, y:Number, width:Number, height:Number, object:String,


border:Boolean):Void

Parameters

x:Number X position

y:Number Y Position

width:Number Width of Instance in Pixels

height:String Height if Instance in Pixels

url:String Initial URL to load

border:Boolean Show/Hide Browser Borders

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 141

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 absolute positioning:

myBrowser = new mdm.Browser(0, 0, 400, 350, "http://www.multidmedia.com", true)

Create a new Instance called myBrowser with relative positioning (Windows Only):

// t = top
// b = bottom
// l = left
// r = right
// c = center

myBrowser = new mdm.Browser("c", "c", "50%", "50%", "http://www.multidmedia.com",


true)

6.5.2 Methods
6.5.2.1 Browser.addFavorite()

Availability

Windows

Usage

browserInstance.addFavorite(url:String, description:String):Void

Parameters

url:String Rreference to the URL

description:String Description of the URL

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

©2006 Multidmedia Limited {mdm}


142 ZINC™ v2.5 Help Manual

myBrowser.addFavorite("http://www.multidmedia.com", "MDM Homepage");

6.5.2.2 Browser.back()

Availability

Windows, Mac OSX

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

Windows, Mac OSX

Usage

browserInstance.close():Void

Parameters

None

Returns

Nothing

Description

Closes the specified Browser Instance loaded.

Notes

None

Example

closeButton.onRelease = function(){
myBrowser.close();
}

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 143

6.5.2.4 Browser.forward()

Availability

Windows, Mac OSX

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

Windows, Mac OSX

Usage

browserInstance.goto(url:String):Void

Parameters

url:String A String reference to a Target URL

Returns

Nothing

Description

Instructs the specified Browser instance to go to the specific domain or webpage.

Notes

None

Example

visitHomePageButton.onRelease = function(){
myBrowser.goto("http://www.multidmedia.com");
}

©2006 Multidmedia Limited {mdm}


144 ZINC™ v2.5 Help Manual

6.5.2.6 Browser.gotoTarget()

Availability

Windows

Usage

browserInstance.gotoTarget(url:String, target:String):Void

Parameters

url:String A String reference to a Target URL

url:String A String reference to a Target Frame

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

Windows, Mac OSX

Usage

browserInstance.hide():Void

Parameters

None

Returns

Nothing

Description

Will hide the specified Browser Instance.

Notes

None

Example

hideBrowserButton.onRelease = function(){
myBrowser.hide();
}

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 145

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

copies:Number Reference to the number of copies required

Returns

Nothing

Description

Sets the number of copies to print before using Browser.print()

Notes

None

Example

browserInstance.printCopies(3)

©2006 Multidmedia Limited {mdm}


146 ZINC™ v2.5 Help Manual

6.5.2.10 Browser.printFooter()

Availability

Windows

Usage

browserInstance.printFooter(footerText:String):Void

Parameters

footerText:String Text to be set as footer

Returns

Nothing

Description

Allows you to set the Footer Text of the Print out.

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

headerText:String text to be set as header

Returns

Nothing

Description

Allows you to set the Header Text of the Print out.

Notes

None

Example

printCurrentPageButton.onRelease = function(){
var headerText = "my header";
myBrowser.printHeader(headerText);
myBrowser.print(false);

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 147

6.5.2.12 Browser.printHTMLHeader()

Availability

Windows

Usage

browserInstance.printHTMLHeader(htmlText:String):Void

Parameters

htmlText:String Text to be set as header

Returns

Nothing

Description

Allows you to set the Header HTML of the Print out.

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

browserInstance.printMargins(left:Number, right:Number, top:Number, bottom:Number)


:Void

Parameters

left:Number Integer value of left margin (in inches)

right:Number Integer value of right margin (in inches)

top:Number Integer value of top margin (in inches)

bottom:Number Integer value of bottom margin (in inches)

Returns

Nothing

Description

Sets the page margins of the Browser Print Job. Values are in Inches.

Notes

©2006 Multidmedia Limited {mdm}


148 ZINC™ v2.5 Help Manual

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

orientation:String Reference to the print orientation (portrait or landscape)

Returns

Nothing

Description

Sets the orientation of the paper to print before using Browser.print()

Notes

None

Example

browserInstance.printOrientation("landscape")

6.5.2.15 Browser.printPreview()

Availability

Windows

Usage

browserInstance.printPreview():Void

Parameters

None

Returns

Nothing

Description

Shows a Print Preview of the specified Browser Instance

Notes

None

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 149

previewPrintPageButton.onRelease = function(){
myBrowser.printPreview();
}

6.5.2.16 Browser.refresh()

Availability

Windows

Usage

browserInstance.refresh():Void

Parameters

None

Returns

Nothing

Description

Use to refresh the content inside a specified Browser Instance.

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

content:String Reference to the URL

target:String Description of the URL

Returns

Nothing

Description

Sets the HTML content of a specific Frame in the specified browser Instance.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


150 ZINC™ v2.5 Help Manual

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

Windows, Mac OSX

Usage

browserInstance.show():Void

Parameters

None

Returns

Nothing

Description

Will show the specified Browser Instance.

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

Use to stop loading the content inside a specified Browser Instance.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 151

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

var favoritesList = myBrowser.favorites;

// favoritesList[0][0] = Favorite Name


// favoritesList[0][1] = Favorite Link

6.5.3.2 Browser.height

Availability

Windows, Mac OSX

Usage

browserInstance.height:Number

Description

Integer value of pixel height of browser instance.

Example

Simple Usage:

myBrowser.height = 200;

resizeBrowserButton.onRelase = function(){
myBrowser.height = 400;
myBrowser.width = 400;
}

Prompt the value directly:

mdm.Dialogs.prompt(myBrowser.height);

©2006 Multidmedia Limited {mdm}


152 ZINC™ v2.5 Help Manual

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:

var isBusy = myBrowser.isBusy;

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);

Prompt the value directly:

mdm.Dialogs.prompt(myBrowser.isBusy);

6.5.3.4 Browser.source

Availability

Windows, Mac OSX

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>";

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 153

Prompt the value directly:

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:

var myBrowserTitle = myBrowser.title;

Prompt the value directly:

mdm.Dialogs.prompt(myBrowser.title);

6.5.3.6 Browser.url

Availability

Windows, Mac OSX

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;

Prompt the value directly:

mdm.Dialogs.prompt(myBrowser.url);

6.5.3.7 Browser.userAgent

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


154 ZINC™ v2.5 Help Manual

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

For a list of User Agents, please see http://en.wikipedia.org/wiki/User_agent

Example

myBrowser.userAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)


Gecko/20041107 Firefox/1.0";

6.5.3.8 Browser.visible

Availability

Windows

Usage

browserInstance.visible:Boolean

Description

Sets the visibility of the Browser Instance.

Example

Simple Usage:

// get property
var isVisible = myBrowser.visible;

// set property
myBrowser.visible = true;

Prompt the value directly:

mdm.Dialogs.prompt(myBrowser.visible);

6.5.3.9 Browser.width

Availability

Windows, Mac OSX

Usage

browserInstance.width:Number

Description

Pixel width of browser instance.

Example

Simple Usage:

myBrowser.width = 200;

resizeBrowserButton.onRelase = function(){
browserInstance.height = 400;

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 155

browserInstance.width = 400;
}

Prompt the value directly:

mdm.Dialogs.prompt(myBrowser.width);

6.5.3.10 Browser.x

Availability

Windows, Mac OSX

Usage

browserInstance.x:Number

Description

Integer value which determines position of left edge of browser.

Example

Simple Usage:

// get property
var myBrowserLeftEdge = myBrowser.x;

// set property
myBrowser.x = 150;

Prompt the value directly:

mdm.Dialogs.prompt(myBrowser.x);

6.5.3.11 Browser.y

Availability

Windows, Mac OSX

Usage

browserInstance.y:Number

Description

Integer value which determines position of top edge of browser.

Example

Simple Usage:

// get property
var myBrowserTopEdge = myBrowser.y;

// set property
myBrowser.y = 130;

Prompt the value directly:

mdm.Dialogs.prompt(myBrowser.y);

©2006 Multidmedia Limited {mdm}


156 ZINC™ v2.5 Help Manual

6.5.4 Events
6.5.4.1 onDocumentComplete

Availability

Windows, Mac OSX

Usage

browserInstance.onDocumentComplete:Function

Parameters

url:String URL of the Page loaded.

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

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Clipboard

Method Summary for the Clipboard Class

The following table lists methods of the Clipboard class

Method Description
Clipboard.clear() Will clear the selected item(s) from the Clipboard.
Clipboard.copy() Will copy the selected item(s) to the Clipboard.

Clipboard.copyString() Sets the clipboard to the specified string value.

Clipboard.cut() Will cut the selected item(s) to the Clipboard.


Will paste the item(s) from the Clipboard to the selected
Clipboard.paste()
input box.

6.6.1 Methods
6.6.1.1 Clipboard.clear()

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 157

mdm.Clipboard.clear():Void

Parameters

None

Returns

Nothing

Description

Will clear the selected item(s) from the Clipboard

Notes

None

Example

mdm.Clipboard.clear()

6.6.1.2 Clipboard.copy()

Availability

Windows

Usage

mdm.Clipboard.copy():Void

Parameters

None

Returns

Nothing

Description

Will copy the selected item(s) to the Clipboard.

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

©2006 Multidmedia Limited {mdm}


158 ZINC™ v2.5 Help Manual

Windows

Usage

mdm.Clipboard.copyString(value:String):Void

Parameters

value:String Value to copy to the Clipboard

Returns

Nothing

Description

Sets the clipboard to the specified string value.

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

Will cut the selected item(s) to the Clipboard.

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()

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 159

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

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.COMPort

Method Summary for the COMPort Class

The following table lists methods of the COMPort class

Method Description
COMPort.close() Closes the comport.
COMPort.open() This command opens the serial port for communication.

COMPort.send() Will send a string through the comport.

COMPort.sendFileContents() Will send the contents of the specified file.


COMPort.sendHEXData() Will send the specified HEX data via the comport.

©2006 Multidmedia Limited {mdm}


160 ZINC™ v2.5 Help Manual

Suspends transmission and places the line in a break


COMPort.setBreak()
state.
Sets the DTR state to high (on) after the comport has
COMPort.setDTR()
opened.
COMPort.setEcho() Enables echo.
Sets the RTS state to high (on) after the comport has
COMPort.setRTS()
opened.
COMPort.setXON() Causes transmission to act as if XON has been received.

COMPort.setXOFF() Causes transmission to act as if XOFF has been received.

COMPort.unsetBreak() Restores transmission and places the line in a nonbreak.


Unsets the DTR state to low (off) after the comport has
COMPort.unsetDTR()
opened.
Unsets the RTS state to low (off) after the comport has
COMPort.unsetRTS()
opened.
When enabled, the component will fire the receive event
COMPort.useLinemode()
only when the LineEnd characters are received
COMPort.useThreshold() When enabled, the component will fire the receive event
only if the certain amount of bytes (or more) is arrived in the
Rx buffer.

Property Summary for the COMPort Class

The following table lists properties of the COMPort class

Property Description
COMPort.initialDTR The variable contains Initialdtrstate (DTR)
COMPort.initialRTS The variable contains Initialdtrstate (RTS)

The variable contains delimited list by comma "," containing


COMPort.ports
all the com ports that are found on the system.
COMPort.rxBuffer Number of bytes to use for receiving data.

COMPort.txBuffer Number of bytes to use for sending data.

Event Summary for the COMPort Class

The following table lists events of the COMPort class

Event Description
onCOMPortCTSChanged Executes when the CTS line changes status.
onCOMPortDSRChanged Executes when the DSR line changes status.

onCOMPortData Executes when COM Port receives Incoming Data.

onCOMPortHEXData Executes when COM Port receives Incoming Hex Data.


Executes when sending has completed and the buffers
onCOMPortDataSent
emptied.
onCOMPortError Executes when an error occurs.

onCOMPortSendProgress Returns the number of bytes sent. Intended for large data.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 161

6.7.1 Methods
6.7.1.1 COMPort.close()

Availability

Windows

Usage

mdm.COMPort.close():Void

Parameters

None

Returns

Nothing

Description

Closes the comport.

Notes

None

Example

mdm.COMPort.close();

6.7.1.2 COMPort.open()

Availability

Windows

Usage

mdm.COMPort.open(port:Number, baudRate:Number, dataBits:Number, parity:String,


stopBits:Number, flowControl:String):Void

Parameters

port:Number Value of port can be 1,2,3,4,5 etc.

baudRate:Number Value of baudrate supported by your hardware.

dataBits:Number Value of datasize can be: 8,7,6 or 5

parity:String Value can be N,O,E,M,S for none,odd,even,mark,space respectively.

stopBits:Number Value can be 1, 1.5 or 2.

flowControl:String Value OFF, XONXOFF, HARDWARE.

Returns

Nothing

Description

This command opens the Serial Port for communication with the specified settings.

©2006 Multidmedia Limited {mdm}


162 ZINC™ v2.5 Help Manual

Notes

The event onCOMPortSendProgress can be used to return the number of bytes sent.

Example

mdm.COMPort.open(1, 110, 8, "N", 1, "OFF");

6.7.1.3 COMPort.send()

Availability

Windows

Usage

mdm.COMPort.send(value:String):Void

Parameters

value:String Value which will be send through comport.

Returns

Nothing

Description

Will send a string through the comport.

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

Will send the contents of the specified file.

Notes

None

Example

mdm.COMPort.sendFileContents(mdm.Application.path+"myFile.txt");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 163

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

Will send the specified HEX data via the comport.

Notes

None

Example

Hex Data:

mdm.COMPort.sendHEXData("FF0067EA349F");

Pipe Delimited Decimal:

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

Suspends transmission and places the line in a break state.

Notes

None

Example

mdm.COMPort.setBreak();

©2006 Multidmedia Limited {mdm}


164 ZINC™ v2.5 Help Manual

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

enable:Boolean Value specifying if echo is enabled.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 165

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

Causes transmission to act as if XON has been received.

Notes

None

Example

mdm.COMPort.setXON();

6.7.1.11 COMPort.setXOFF()

Availability

Windows

Usage

mdm.COMPort.setXOFF():Void

Parameters

None

©2006 Multidmedia Limited {mdm}


166 ZINC™ v2.5 Help Manual

Returns

Nothing

Description

Causes transmission to act as if XOFF has been received.

Notes

None

Example

mdm.COMPort.setXOFF();

6.7.1.12 COMPort.unsetBreak()

Availability

Windows

Usage

mdm.COMPort.unsetBreak():Void

Parameters

None

Returns

Nothing

Description

Restores transmission and places the line in a nonbreak.

Notes

None

Example

mdm.COMPort.unsetBreak();

6.7.1.13 COMPort.unsetDTR()

Availability

Windows

Usage

mdm.COMPort.unsetDTR():Void

Parameters

None

Returns

Nothing

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 167

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

enable:Boolean Boolean Reference to enable/disbale.

lineStr:String Reference to Line String.

Returns

Nothing

Description

When enabled, the component will fire the receive event only when the LineEnd characters are received.

Notes

None

©2006 Multidmedia Limited {mdm}


168 ZINC™ v2.5 Help Manual

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

enable:Boolean Boolean Reference to enable/disbale.

threshold:Number Received bytes to use as a threshold.

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.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 169

Notes

None

Example

Simple Usage:

var myComportState = mdm.COMPort.initialDTR;

Prompt the value directly:

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:

var myComportState = mdm.COMPort.initialRTS;

Prompt the value directly:

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:

var myComportsArray = mdm.COMPort.ports.split(",")[0]);

Prompt the value directly:

©2006 Multidmedia Limited {mdm}


170 ZINC™ v2.5 Help Manual

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

timeCode:Number Value of time code.

state:String Boolean Reference to the State.

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 171

Executes when the CTS line changes status. A "true" or "false" value is returned to the state parameter.

Example

Simple Usage:

function onCOMPortCTSChanged(timeCode, state){


mdm.Dialogs.Prompt(timeCode)
mdm.Dialogs.Prompt(state)
}

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

timeCode:Number Value of time code.

state:String Boolean Reference to the State.

Description

Executes when the DSR line changes status. A "true" or "false" value is returned to the state parameter.

Example

Simple Usage:

function onCOMPortDSRChanged(timeCode, state){


mdm.Dialogs.Prompt(timeCode)
mdm.Dialogs.Prompt(state)
}

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

©2006 Multidmedia Limited {mdm}


172 ZINC™ v2.5 Help Manual

mdm.COMPort.onCOMPortData:Function

Parameters

timeCode:Number Value of time code.

data:String Value of incoming data.

Description

Executes when COM Port receives Incoming Data

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

timeCode:Number Value of time code.

hexData:String Value of incoming data formatted as HEX values delimited by '|'

Description

Executes when COM Port receives Incoming Hex Data

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 173

Parameters

timeCode:Number Value of time code.

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

timeCode:Number Value fo time code.

error:String Value of error code returned.

Description

Executes when an error occurs. The error code returned will be one of he following:

CE_FRAME - The hardware detected a framing error.


CE_OVERRUN - A character-buffer overrun has occurred.
CE_RXPARITY - meaning: The hardware detected a parity error.

Example

Simple Usage:

function onCOMPortError(timeCode, error){


mdm.Dialogs.Prompt(timeCode)
mdm.Dialogs.Prompt(error)
}

Advanced Usage:

mdm.COMPort.onCOMPortError = function(myObject){
mdm.Dialogs.Prompt(myObject.timeCode)
mdm.Dialogs.Prompt(myObject.error)
}

©2006 Multidmedia Limited {mdm}


174 ZINC™ v2.5 Help Manual

6.7.3.7 onCOMPortSendProgress

Availability

Windows

Usage

mdm.COMPort.onCOMPortSendProgress:Function

Parameters

timeCode:Number Value of time code.

bytes:Number Value of bytes sent.

Description

Returns the number of bytes sent. Intended for large data.

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

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Database

Object Summary for the Database Class

The following table lists objects of the Database class

Object Description
ADO ADO Database Object
MSAccess MSAccess Database Object

MySQL MySQL Database Object

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 175

6.8.1 Objects
6.8.1.1 Database.ADO
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Applciation.ADO

Method Summary for the ADO Class

The following table lists methods of the ADO class

Method Description
Database.ADO.close() Closes the database connection.
Database.ADO.connect() Establishes a connection with any ADO Database

Returns a true or false statement based upon a database


Database.ADO.error()
error.
Database.ADO.errorDetails() Will return the error details of the last query.

Database.ADO.getBlob() Saves the contents of a BLOB or OLE Variant field.

Database.ADO.getData() Returns the Full Query Data to a 2 Dimensional Array.

Database.ADO.getField() Retrieves data from a Database

Database.ADO.getHTML() Returns the contents of a result set as html text.

Database.ADO.getRecordCount() Returns the number of rows in a result set.

Database.ADO.getXML() Returns the contents of a result set as XML formatted text.


Runs INSERT, UPDATE or DELETE SQL statement on the
Database.ADO.runQuery()
database.
Database.ADO.select() Runs a SELECT statement on the database.
Returns a true or false statement based upon the presence
Database.ADO.success()
of a database connection.

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

Closes the database connection.

©2006 Multidmedia Limited {mdm}


176 ZINC™ v2.5 Help Manual

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

adoString:String Reference to ADO Connection Statement

Returns

Nothing

Description

Establishes a connection with any ADO Database specified in adoString.

Notes

None

Example

Simple Usage:

var adoString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=d:\\dbtutor.mdb";


mdm.Database.ADO.connect(adoString);

Advanced ADO String Usage:

var adoString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data


Source=mydb.mdb;Mode=Share Deny Write;Extended Properties="";Jet OLEDB:System
database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="mypassword";Jet
OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk
Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet
OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet
OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
mdm.Database.ADO.connect(adoString);

6.8.1.1.1.3 Database.ADO.error()

Availability

Windows

Usage

mdm.Database.ADO.error():Boolean

Parameters

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 177

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

var success = !(mdm.Database.ADO.error());


mdm.Dialogs.prompt("Last query execution status: "+success);

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

©2006 Multidmedia Limited {mdm}


178 ZINC™ v2.5 Help Manual

Parameters

fieldName:String Field name in table which holds blob data

fieldRow:Number Integer which denotes the row containing blob field in the recordset.

fileName:String File path where content of BLOB is to be saved.

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

A Query must first be executed with mdm.Database.ADO.runQuery()

Example

Simple Usage:

mdm.Database.ADO.runQuery("SELECT * FROM mytable")


var dataSet = mdm.Database.ADO.getData()

// To Prompt the Data in Row 1, Feld 4

mdm.Dialogs.prompt(dataSet[0][3])

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 179

Advanced Usage:

mdm.Database.ADO.runQuery("SELECT * FROM mytable")


var dataSet = mdm.Database.ADO.getData()

// To Prompt all of the Data (assuming the Database has 3 Fields)

for (i=0; i < dataSet.length; i++){


mdm.Dialogs.prompt("Field1: " + dataSet[i][0]+" Field2: " + dataSet[i][1]+"
Field3: " + dataSet[i][2]);
}

6.8.1.1.1.7 Database.ADO.getField()

Availability

Windows

Usage

mdm.Database.ADO.getField(rowIndex:Number, columnIndex:Number):String

Parameters

rowIndex:Number Reference to Row Index

columnIndex:Number Reference to Column Index.

Returns

A String

Description

Retrieves data from a Database from the specified Row and Field Index.

Notes

None

Example

var customerName = mdm.Database.ADO.getField(1, 1);


6.8.1.1.1.8 Database.ADO.getHTML()

Availability

Windows

Usage

mdm.Database.ADO.getHTML():String

Parameters

None

Returns

A String

Description

Returns the contents of a result set as html text.

©2006 Multidmedia Limited {mdm}


180 ZINC™ v2.5 Help Manual

Notes

None

Example

var myResults = mdm.Database.ADO.getHTML();


6.8.1.1.1.9 Database.ADO.getRecordCount()

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

var numberOfRows = mdm.Database.ADO.getRecordCount();


6.8.1.1.1.10 Database.ADO.getXML()

Availability

Windows

Usage

mdm.Database.ADO.getXML():String

Parameters

None

Returns

A String

Description

Returns the contents of a result set as XML formatted text.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 181

var myResults = mdm.Database.ADO.getXML();


// convert to xml object
var myXML = new XML();
myXML.parseXML(myResults);
6.8.1.1.1.11 Database.ADO.runQuery()

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

Runs INSERT, UPDATE or DELETE SQL statement on the database.

Notes

This command will not run a SELECT statement.

Example

mdm.Database.ADO.runQuery("DELETE * FROM myTable WHERE maxNumber > 0");


6.8.1.1.1.12 Database.ADO.select()

Availability

Windows

Usage

mdm.Database.ADO.select(query:String):Void

Parameters

query:String Correct SQL string with SELECT statement.

Returns

Nothing

Description

Runs a SELECT statement on the database after a successful connection.

Notes

This command will ONLY run a SELECT statement. For running INSERT, DELETE or UPDATE queries, use
mdm.ADO.runQuery()

Example

3 Different SQL Statements are shown below:

©2006 Multidmedia Limited {mdm}


182 ZINC™ v2.5 Help Manual

mdm.Database.ADO.select("SELECT * FROM myTable");


mdm.Database.ADO.select("SELECT firstName, lastName, nickName FROM myTable");
mdm.Database.ADO.select("SELECT * FROM myTable WHERE maxNumber > 0");
6.8.1.1.1.13 Database.ADO.success()

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

var isConnected = mdm.Database.ADO.success();

6.8.1.2 Database.MSAccess
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Database.MSAccess

Method Summary for the MSAccess Class

The following table lists methods of the MSAccess class

Method Description
Database.MSAccess.close() Closes the database connection.
Database.MSAccess.compact() Compacts and Repairs the Access Databases.

Database.MSAccess.connect() Establishes a connection with the Access Database.


Establishes a connection with the Access Database at an
Database.MSAccess.connectAbs()
absolute position or network path.
Establishes a connection with the Access Database
Database.MSAccess.connectReadOnly()
specified in db in READ ONLY mode.
Database.MSAccess.connectReadOnlyAbs( Establishes a connection with the Access Database at an
) absolute position or network path in READ ONLY mode
Returns a true or false statement based upon a database
Database.MSAccess.error()
error.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 183

Database.MSAccess.errorDetails() Will return the error details of the last query.

Database.MSAccess.getBlob() Saves the contents of a BLOB or OLE Variant field.

Database.MSAccess.getData() Returns the Full Query Data to a 2 Dimensional Array.

Database.MSAccess.getField() Retrieves data from a Database from the specified Field.

Database.MSAccess.getHTML() Returns the contents of a result set as html text.

Database.MSAccess.getRecordCount() Returns the number of rows in a result set.

Database.MSAccess.getXML() Returns the contents of a result set as XML formatted text.


Runs INSERT, UPDATE or DELETE SQL statement on the
Database.MSAccess.runQuery()
database.
Database.MSAccess.select() Runs a SELECT statement on the database.
Returns a true or false statement based upon the presence
Database.MSAccess.success()
of a database connection.

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

Closes the connection with database.

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

©2006 Multidmedia Limited {mdm}


184 ZINC™ v2.5 Help Manual

fileName:String Path to database .mdb file.

databaseVersion:String Database file version to be compacted. It can be: "2000" or "97".

databasePassword:String Password to database.

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

If no Password is required, an empty parameter should be used (ie. "").

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

filename:String Path to database .mdb file.

databasePassword:String Optional Parameter with password to database.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 185

mdm.Database.MSAccess.connectAbs(filename:String, [databasePassword:String]):Void

Parameters

filename:String Path to database .mdb file.

databasePassword:String Optional parameter with password to database.

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

Network paths can also be entered eg. "\\myserver\myshare\database\mydb.mdb".

Example

mdm.Database.MSAccess.connectAbs("d:\\dbtutor.mdb", "myPassword");

If your Database does not require a Password:

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

filename:String Path to database .mdb file.

databasePassword:String Optional parameter with password to database.

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");

©2006 Multidmedia Limited {mdm}


186 ZINC™ v2.5 Help Manual

6.8.1.2.1.6 Database.MSAccess.connectReadOnlyAbs()

Availability

Windows

Usage

mdm.Database.MSAccess.connectReadOnlyAbs(filename:String, [databasePassword:String
]):Void

Parameters

filename:String Path to database .mdb file.

databasePassword:String Optional parameter with password to database.

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

Network paths can also be entered eg. "\\myserver\myshare\database\mydb.mdb".

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

var success = !(mdm.Database.MSAccess.error());

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 187

mdm.Dialogs.prompt("Last query execution status: "+success);

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

mdm.Database.MSAccess.getBlob(fieldName:String, fieldRow:Number, fileName:String)


:Void

Parameters

fieldName:String Field name in table which holds blob data.

fieldRow:Number Integer which denotes row containing blob field in recordset.

fileName:String File path where content of BLOB is to be saved.

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

©2006 Multidmedia Limited {mdm}


188 ZINC™ v2.5 Help Manual

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

A Query must first be executed with mdm.Database.MSAccess.runQuery()

Example

Simple Usage:

mdm.Database.MSAccess.select("SELECT * FROM mytable")


var dataSet = mdm.Database.MSAccess.getData()

// To Prompt the Data in Row 1, Feld 4

mdm.Dialogs.prompt(dataSet[0][3])

Advanced Usage:

mdm.Database.MSAccess.select("SELECT * FROM mytable")


var dataSet = mdm.Database.MSAccess.getData()

// To Prompt all of the Data (assuming the Database has 3 Fields)

for (i=0; i < dataSet.length; i++){


mdm.Dialogs.prompt("Field1: " + dataSet[i][0]+" Field2: " + dataSet[i][1]+"
Field3: " + dataSet[i][2]);
}

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 189

6.8.1.2.1.11 Database.MSAccess.getField()

Availability

Windows

Usage

mdm.Database.MSAccess.getField(rowIndex:Number, columnIndex:Number):String

Parameters

rowIndex:Number Reference to Row Index

columnIndex:Number Reference to Column Index.

Returns

A String

Description

Retrieves data from a Database from the specified Row and Field Index.

Notes

None

Example

var customerName = mdm.Database.MSAccess.getField(1, 1);


6.8.1.2.1.12 Database.MSAccess.getHTML()

Availability

Windows

Usage

mdm.Database.MSAccess.getHTML():String

Parameters

None

Returns

A String

Description

Returns the contents of a result set as HTML text.

Notes

None

Example

var myResults = mdm.Database.MSAccess.getHTML();


6.8.1.2.1.13 Database.MSAccess.getRecordCount()

Availability

©2006 Multidmedia Limited {mdm}


190 ZINC™ v2.5 Help Manual

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

var numberOfRows = mdm.Database.MSAccess.getRecordCount();


6.8.1.2.1.14 Database.MSAccess.getXML()

Availability

Windows

Usage

mdm.Database.MSAccess.getXML():String

Parameters

None

Returns

A String

Description

Returns the contents of a result set as XML formatted text.

Notes

None

Example

var myResults = mdm.Database.MSAccess.getXML();


// convert to xml object
var myXML = new XML();
myXML.parseXML(myResults);
6.8.1.2.1.15 Database.MSAccess.runQuery()

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 191

mdm.Database.MSAccess.runQuery(query:String):Void

Parameters

query:String SQL string with INSERT, UPDATE or DELETE statement to be executed.

Returns

Nothing

Description

Runs INSERT, UPDATE or DELETE SQL statement on the database.

Notes

This command will not run a SELECT statement.

Example

mdm.Database.MSAccess.runQuery("DELETE * FROM myTable WHERE maxNumber > 0");


6.8.1.2.1.16 Database.MSAccess.select()

Availability

Windows

Usage

mdm.Database.MSAccess.select(query:String):Void

Parameters

query:String Correct SQL string with SELECT statement.

Returns

Nothing

Description

Runs a SELECT statement on the database after a successful connection.

Notes

This command will ONLY run a SELECT statement. For running INSERT, DELETE or UPDATE queries, use
mdm.MSAccess.runQuery()

Example

3 Different SQL Statements are shown below:

mdm.Database.MSAccess.select("SELECT * FROM myTable");


mdm.Database.MSAccess.select("SELECT firstName, lastName, nickName FROM myTable");
mdm.Database.MSAccess.select("SELECT * FROM myTable WHERE maxNumber > 0");
6.8.1.2.1.17 Database.MSAccess.success()

Availability

Windows

Usage

mdm.Database.MSAccess.success():Boolean

©2006 Multidmedia Limited {mdm}


192 ZINC™ v2.5 Help Manual

Parameters

None

Returns

A Boolean

Description

Returns a True or False statement based upon the presence of a database connection.

Notes

None

Example

var isConnected = mdm.Database.MSAccess.success();

6.8.1.3 Database.MySQL
Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Database.Mysql

Method Summary for the Mysql Class

The following table lists methods of the Msql class

Method Description
Database.MySQL.close() Closes the database connection.
Database.MySQL.connect() Open a connection to a MySQL server.

Database.MySQL.getData() Returns the Full Query Data to a 2 Dimensional Array.


Returns a single result from a MySQL by specifying the row
Database.MySQL.getField()
and column variable.
Database.MySQL.getLastError() Returns the last error made (if any) in text form.

Database.MySQL.getLastInsertedId() Returns the id of the last inserted field.

Database.MySQL.getRecordCount() Returns the number of rows in a MySQL resultset.

Database.MySQL.getStatus() Returns the status of a server after a MySQL connection.

Database.MySQL.isConnected() Returns true if the MySQL database is still connected.

Database.MySQL.runQuery() Executes a SQL statement query on a MySQL database.

6.8.1.3.1 Methods

6.8.1.3.1.1 Database.MySQL.close()

Availability

Windows, Mac OSX

Usage

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 193

mdm.Database.MySQL.close():Void

Parameters

None

Returns

Nothing

Description

Closes the MySQL database connection.

Notes

None

Example

mdm.Database.MySQL.close();
6.8.1.3.1.2 Database.MySQL.connect()

Availability

Windows, Mac OSX

Usage

mdm.Database.MySQL.connect(host:String, port:String, compression:Boolean,


userName:String, password:String, databaseName:String):Boolean

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.

compression:Boolean Specifies if compression is to be used between client-server communication. Set to false to


disable transfer compression.

username:String Username specified in access table in MySQL server.

password:String Password specified in access table in MySQL server.

databaseName:String Name of MySQL database to connect with.

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

var success = mdm.Database.MySQL.connect("localhost", "3306", true, "root", "",


"test");

©2006 Multidmedia Limited {mdm}


194 ZINC™ v2.5 Help Manual

6.8.1.3.1.3 Database.MySQL.getData()

Availability

Windows, Mac OSX

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

A Query must first be executed with mdm.Database.MySQL.runQuery()

Example

Simple Usage:

mdm.Database.MySQL.runQuery("SELECT * FROM mytable")


var dataSet = mdm.Database.MySQL.getData()

// To Prompt the Data in Row 1, Feld 4

mdm.Dialogs.prompt(dataSet[0][3])

Advanced Usage:

mdm.Database.MySQL.runQuery("SELECT * FROM mytable")


var dataSet = mdm.Database.MySQL.getData()

// To Prompt all of the Data (assuming the Database has 3 Fields)

for (i=0; i < dataSet.length; i++){


mdm.Dialogs.prompt("Field1: " + dataSet[i][0]+" Field2: " + dataSet[i][1]+"
Field3: " + dataSet[i][2]);
}

6.8.1.3.1.4 Database.MySQL.getField()

Availability

Windows, Mac OSX

Usage

mdm.Database.MySQL.getField(rowIndex:Number, columnIndex:Number):String

Parameters

rowIndex:Number Reference to Row Index

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 195

columnIndex:Number Reference to Column Index.

Returns

A String

Description

Returns a single result from a MySQL by specifying the row and column.

Notes

None

Example

var customerName = mdm.Database.MySQL.getField(1, 1);


6.8.1.3.1.5 Database.MySQL.getLastError()

Availability

Windows, Mac OSX

Usage

mdm.Database.MySQL.getLastError():String

Parameters

None

Returns

A String

Description

Returns the last error made (if any) in text form.

Notes

None

Example

var errorDetails = mdm.Database.MySQL.getLastError();


6.8.1.3.1.6 Database.MySQL.getLastInsertedId()

Availability

Windows, Mac OSX

Usage

mdm.Database.MySQL.getLastInsertedId():Number

Parameters

None

Returns

An Integer

Description

©2006 Multidmedia Limited {mdm}


196 ZINC™ v2.5 Help Manual

Returns the id of the last inserted field.

Notes

None

Example

var lastRowID = mdm.Database.MySQL.getLastInsertedId();


6.8.1.3.1.7 Database.MySQL.getRecordCount()

Availability

Windows, Mac OSX

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

var rowsCounter = mdm.Database.MySQL.getRecordCount();


6.8.1.3.1.8 Database.MySQL.getStatus()

Availability

Windows

Usage

mdm.Database.MySQL.getStatus():String

Parameters

None

Returns

A String

Description

Returns the status of a server after a MySQL connection.

Notes

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 197

Example

var serverStatus = mdm.Database.MySQL.getStatus();


6.8.1.3.1.9 Database.MySQL.isConnected

Availability

Windows, Mac OSX

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

var isConnected = mdm.Database.MySQL.isConnected();


6.8.1.3.1.10 Database.MySQL.runQuery

Availability

Windows, Mac OSX

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

Boolean statement upon successful query execution.

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

var querySuccess = mdm.Database.MySQL.runQuery("SELECT * FROM myTable");

©2006 Multidmedia Limited {mdm}


198 ZINC™ v2.5 Help Manual

6.9 mdm.Dialogs

Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Dialogs

Object Summary for the Dialogs Class

The following table lists objects of the Dialogs class

Object Description
BrowseFile BrowseFile Object
BrowseFileUnicode BrowsFileUnicode Object

BrowseFolder BrowseFolder Object

BrowseFileToSave BrowseFileToSave Object

Method Summary for the Dialogs Class

The following table lists methods of the Dialogs class

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

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Dialogs.BrowseFile

Method Summary for the BrowseFile Class

The following table lists methods of the BrowseFile class

Method Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 199

Dialogs.BrowseFile.show() Displays a Browse File Dialog.


Dialogs.BrowseFile.showCreatorCode() Displays a Browse File Dialog filtered by the Creator Code.

Property Summary for the BrowseFile Class

The following table lists properties of the BrowseFile class

Property Description
Dialogs.BrowseFile.allowMultiple Enables or Disables Multiple Select.
Dialogs.BrowseFile.buttonText Sets the Initial default button text.

Dialogs.BrowseFile.creatorCode Filters the Files shown by Creator Code

Dialogs.BrowseFile.defaultDirectory Sets the initial default directory to Browse.

Dialogs.BrowseFile.defaultExtension Sets the default extension to Browse.

Dialogs.BrowseFile.defaultFilename Sets the default Filename.

Dialogs.BrowseFile.dialogText Sets the Browse File Dialog Text.

Dialogs.BrowseFile.filterList Sets the filter(s) of Browse Dialog.


Dialogs.BrowseFile.filterText Sets the text label in front of the filter selector in the Browse
Dialog
Dialogs.BrowseFile.title Sets the Title of the Dialog box.

6.9.1.1.1 Methods

6.9.1.1.1.1 Dialogs.BrowseFile.show()

Availability

Windows, Mac OSX

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

var myFile = mdm.Dialogs.BrowseFile.show();

©2006 Multidmedia Limited {mdm}


200 ZINC™ v2.5 Help Manual

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

var myFile = mdm.Dialogs.BrowseFile.showCreatorCode();

6.9.1.1.2 Properties

6.9.1.1.2.1 Dialogs.BrowseFile.allowMultiple

Availability

Windows, Mac OSX

Usage

mdm.Dialogs.BrowseFile.allowMultiple:Void

Parameters

None

Returns

Nothing

Description

Enables or Disables Multiple Select for mdm.Dialogs.BrowseFile.show().

Notes

None

Example

Simple Usage:

mdm.Dialogs.BrowseFile.allowMultiple = true;

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 201

6.9.1.1.2.2 Dialogs.BrowseFile.buttonText

Availability

Windows, Mac OSX

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:

mdm.Dialogs.BrowseFile.buttonText = "Open file";


6.9.1.1.2.3 Dialogs.BrowseFile.creatorCode

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";

©2006 Multidmedia Limited {mdm}


202 ZINC™ v2.5 Help Manual

6.9.1.1.2.4 Dialogs.BrowseFile.defaultDirectory

Availability

Windows, Mac OSX

Usage

mdm.Dialogs.BrowseFile.defaultDirectory:Void

Parameters

None

Returns

Nothing

Description

Sets the initial default directory of the Browse File Dialog.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 203

Windows

Usage

mdm.Dialogs.BrowseFile.defaultFilename:Void

Parameters

None

Returns

Nothing

Description

Sets the default filename of a file to the value specified.

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

mdm.Dialogs.BrowseFile.dialogText = "Select a File to Use";


6.9.1.1.2.8 Dialogs.BrowseFile.filterList

Availability

Windows, Mac OSX

Usage

mdm.Dialogs.BrowseFile.filterList:Void

Parameters

©2006 Multidmedia Limited {mdm}


204 ZINC™ v2.5 Help Manual

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

mdm.Dialogs.BrowseFile.filterList = "Executable Files|*.exe|SWF Files|*.swf|AVI


Videos|*.avi";
6.9.1.1.2.9 Dialogs.BrowseFile.filterText

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

mdm.Dialogs.BrowseFile.filterText = "Executable Files|*.exe|SWF Files|*.swf|AVI


Videos|*.avi";
6.9.1.1.2.10 Dialogs.BrowseFile.title

Availability

Windows, Mac OSX

Usage

mdm.Dialogs.BrowseFile.title:Void

Parameters

None

Returns

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 205

Nothing

Description

Sets the Title of the Browse File Dialog.

Notes

None

Example

mdm.Dialogs.BrowseFile.title = "Please select a file to open";

6.9.1.2 Dialogs.BrowseFileUnicode

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Dialogs.BrowseFileUnicode

Method Summary for the BrowseFileUnicode Class

The following table lists methods of the BrowseFileUnicode class

Method Description
Dialogs.BrowseFileUnicode.show() Displays a Browse File Dialog. Unicode Compliant.

Property Summary for the BrowseFileUnicode Class

The following table lists properties of the BrowseFileUnicode class

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

©2006 Multidmedia Limited {mdm}


206 ZINC™ v2.5 Help Manual

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

var myFile = mdm.Dialogs.BrowseFileUnicode.show();


6.9.1.2.2 Properties

6.9.1.2.2.1 Dialogs.BrowseFileUnicode.allowMultiple

Availability

Windows

Usage

mdm.Dialogs.BrowseFileUnicode.allowMultiple:Void

Parameters

None

Returns

Nothing

Description

Enables or Disables Multiple Select for mdm.Dialogs.BrowseFileUnicode.show().

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 207

None

Returns

Nothing

Description

Sets the initial default directory of the Browse File Dialog.

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

©2006 Multidmedia Limited {mdm}


208 ZINC™ v2.5 Help Manual

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:

mdm.Dialogs.BrowseFileUnicode.filterList = "Executable Files|*.exe|SWF


Files|*.swf|AVI Videos|*.avi";
6.9.1.2.2.6 Dialogs.BrowseFileUnicode.title

Availability

Windows

Usage

mdm.Dialogs.BrowseFileUnicode.title:Void

Parameters

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 209

Returns

Nothing

Description

Sets the Title of the Browse File Dialog.

Notes

Unicode Compliant.

Example

Simple Usage:

mdm.Dialogs.BrowseFileUnicode.title = "Please select a file to open";

6.9.1.3 Dialogs.BrowseFileToSave

Availability

Zinc 2.5 (Mac OSX)

ActionScript Class Name

mdm.Dialogs.BrowseFileToSave

Method Summary for the BrowseFileToSave Class

The following table lists methods of the BrowseFileToSave class

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

Returns a Boolean 'false' when the user cancels the Dialog.

Example

©2006 Multidmedia Limited {mdm}


210 ZINC™ v2.5 Help Manual

var myFile = mdm.Dialogs.BrowseFileToSave.show();

6.9.1.4 Dialogs.BrowseFolder

Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Dialogs.BrowseFolder

Method Summary for the BrowseFolder Class

The following table lists methods of the BrowseFolder class:

Method Description
Dialogs.BrowseFolder.show() Allows the user to select any folder from their system.

Property Summary for the BrowseFolder Class

The following table lists properties of the BrowseFolder class:

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

Windows, Mac OSX

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

var myFolder = mdm.Dialogs.BrowseFolder.show();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 211

6.9.1.4.2 Properties

Enter topic text here.

6.9.1.4.2.1 Dialogs.BrowseFolder.defaultDirectory

Availability

Windows, Mac OSX

Usage

mdm.Dialogs.BrowseFolder.defaultDirectory:Void

Parameters

None

Returns

Nothing

Description

Sets the initial default directory of the Browse Folder Dialog.

Notes

None

Example

mdm.Dialogs.BrowseFolder.defaultDirectory = mdm.Application.path;
6.9.1.4.2.2 Dialogs.BrowseFolder.title

Availability

Windows, Mac OSX

Usage

mdm.Dialogs.BrowseFolder.title:Void

Parameters

None

Returns

Nothing

Description

Sets the Title of the Browse Folder Dialog.

Notes

None

Example

mdm.Dialogs.BrowseFolder.title = "Please select a Folder";

©2006 Multidmedia Limited {mdm}


212 ZINC™ v2.5 Help Manual

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

caption:String Dialog Window Title

defaultText:String Default Input Text

Returns

A String

Description

Executes an Input Box Dialog, which allows the user to type a string.

Notes

None

Example

var myResult = mdm.Dialogs.inputBox("Enter Password", "Type Password Here...")

6.9.2.2 Dialogs.prompt()

Availability

Windows, Mac OSX

Usage

mdm.Dialogs.prompt(message:String):Void

Parameters

message:String Message to display in Prompt Dialog

Returns

Nothing

Description

Executes a standard Prompt Dialog displaying the custom message.

Notes

None

Example

mdm.Dialogs.prompt("Zinc Rocks!")

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 213

6.9.2.3 Dialogs.promptUnicode()

Availability

Windows

Usage

mdm.Dialogs.promptUnicode(message:String):Void

Parameters

message:String Message to display in Prompt Dialog

Returns

Nothing

Description

Executes a standard Prompt Dialog displaying the custom message.

Notes

Unicode Compliant.

Example

mdm.Dialogs.promptUnicode("Zinc Rocks!")

6.9.2.4 Dialogs.promptAdv()

Availability

Windows, Mac OSX

Usage

mdm.Dialogs.promptAdv(message:String, promptStyle:String):Boolean

Parameters

message:String Message to display in Prompt Dialog

promptStyle:String Prompt Style to Display

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.

©2006 Multidmedia Limited {mdm}


214 ZINC™ v2.5 Help Manual

Example

var Result = mdm.Dialogs.promptAdv("Does Zinc Rock?", "alert")

6.9.2.5 Dialogs.promptAdvUnicode()

Availability

Windows

Usage

mdm.Dialogs.promptAdvUnicode(message:String, promptStyle:String):Boolean

Parameters

message:String Message to display in Prompt Dialog

promptStyle:String Prompt Style to Display

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

var Result = mdm.Dialogs.promptAdvUnicode("Does Zinc Rock?", "alert")

6.9.2.6 Dialogs.promptModal()

Availability

Windows, Mac OSX

Usage

mdm.Dialogs.promptModal(message:String, promptType:String, promptStyle:String)


:Boolean

Parameters

message:String Message to display in Prompt Dialog

promptType:String Prompt Type to Display

promptStyle:String Prompt Style to Display

Returns

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 215

A Boolean

Description

Executes a Modal Prompt Dialog with the specified parameters. The Prompt Type can be:

yesno
okcancel
abortignore

The Prompt Style can be:

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

var Result = mdm.Dialogs.promptModal("Does Zinc Rock?", "yesno", "alert")

6.9.2.7 Dialogs.promptModalUnicode()

Availability

Windows

Usage

mdm.Dialogs.promptModalUnicode(message:String, promptType:String,
promptStyle:String):Boolean

Parameters

message:String Message to display in Prompt Dialog

promptType:String Prompt Type to Display

promptStyle:String Prompt Style to Display

Returns

A Boolean

Description

Executes a Modal Prompt Dialog with the specified parameters. The Prompt Type can be:

yesno
okcancel
abortignore

The Prompt Style can be:

alert
error
info
confirm
empty

©2006 Multidmedia Limited {mdm}


216 ZINC™ v2.5 Help Manual

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

var Result = mdm.Dialogs.promptModalUnicode("Does Zinc Rock?", "alert")

6.10 mdm.DLL

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.DLL

Constructor Summary for the DLL Class

The following table lists constructors for the Browser class

Constructor Description
Creates a new DLL Instance and loads the DLL Library
mdm.DLL()
specified.

Method Summary for the DLL Class

The following table lists methods of the DLL class

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

dll:String DLL File to Load

Returns

A Boolean

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 217

Description

Creates a new DLL Instance and loads the DLL Library specified.

Notes

None

Example

Create a new Instance called myDLL:

myDLL = new mdm.DLL("myFunctions.dll")

6.10.2 Methods
6.10.2.1 DLL.addParameter()

Availability

Windows

Usage

dllInstance.addParameter(parameterType:String, parameterValue:String):Number

Parameters

parameterType:String String reference to Parameter Type (Please See Notes).

parameterValue:String String with parameter value.

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().

The value of parameterType can be:

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*

©2006 Multidmedia Limited {mdm}


218 ZINC™ v2.5 Help Manual

float
float*
wchar*

Example

var parameterIndex = myDLL.addParameter("string", "myValue");

6.10.2.2 DLL.call()

Availability

Windows

Usage

dllInstance.call(returnType:String, procedureName:String)

Parameters

returnType:String String reference to Return Type (Please See Notes).

procedureName:String String with name of procedure to execute.

Returns

An Integer, String or Boolean

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()

The value of returnType can be:

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");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 219

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

This command will attempt to unload the DLL instance.

Notes

None

Example

myDLL.close();

6.11 mdm.Encryption

Availability

©2006 Multidmedia Limited {mdm}


220 ZINC™ v2.5 Help Manual

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Encryption

Method Summary for the Encryption Class

The following table lists methods of the Encryption class

Method Description
Encryption.decryptFile() Decrypts a previously encrypted File.
Encryption.decryptString() Decrypts a previously encrypted String

Encryption.encryptFile() Encrypts a FIle.

Encryption.encryptString() Encrypts a String.

6.11.1 Methods
6.11.1.1 Encryption.decryptFile()

Availability

Windows, Mac OSX

Usage

mdm.Encryption.decryptFile(key:String, inputFile:String, outputFile:String):Void

Parameters

key:String Key to use with decryption.

inputFile:String Path to file to be decrypted.

outputFile:String Path to file to be created (decrypted file).

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

mdm.Encryption.decryptFile("My Key", "c:\\myEncryptedFile.txt",


"c:\\myDecryptedFile");

6.11.1.2 Encryption.decryptString()

Availability

Windows, Mac OSX

Usage

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 221

mdm.Encryption.decryptString(key:String, dataToDecrypt:String):String

Parameters

key:String Key to use with decryption.

dataToDecrypt:String Encrypted data to decrypt.

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

var myDecryptedData = mdm.Encryption.decryptString("My


Key","qU3qOPKIOWMjx3Rbk3qkMLc=");

6.11.1.3 Encryption.encryptFile()

Availability

Windows, Mac OSX

Usage

mdm.Encryption.encryptFile(key:String, inputFile:String, outputFile:String):Void

Parameters

key:String Key to use with decryption.

inputFile:String Path to file to be encrypted.

outputFile:String Path to file to be created (encrypted file).

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

mdm.Encryption.encryptFile("My Key", "c:\\myFile.txt", "c:\\myEncryptedFile");

6.11.1.4 Encryption.encryptString()

Availability

Windows, Mac OSX

©2006 Multidmedia Limited {mdm}


222 ZINC™ v2.5 Help Manual

Usage

mdm.Encryption.encryptString(key:String, dataToEncrypt:String):String

Parameters

key:String Key to use with decryption.

dataToEncrypt:String Encrypted data to decrypt.

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

var myEncryptedData = mdm.Encryption.encryptString("My Key","My secret message");

6.12 mdm.Exception

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Exception

Object Summary for the Exception Class

The following table lists Objects of the Exception class

Object Description
DebugWindow DebugWindow Object

Method Summary for the Exception Class

The following table lists methods of the Exception class

Method Description
Exception.disableHandler() Disables internal exception handling.
Exception.enableHandler() Enables the internal exception handler.

Exception.resetHandler() Resets the internal exception handler to a clear status.

Exception.showErrors() Enables error window.

Exception.trapErrors() Disables error window.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 223

6.12.1 Objects
6.12.1.1 Exception.DebugWindow
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Exception.DebugWindow

Method Summary for the DebugWindow Class

The following table lists methods of the DebugWindow class

Method Description
Exception.DebugWindow.hide() Hides the runtime debugging window.
Exception.DebugWindow.show() Enables runtime debugging window.

Exception.DebugWindow.trace() Traces to the debug 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

Hides the runtime debugging window.

Notes

None

Example

mdm.Exception.DebugWindow.hide()
6.12.1.1.1.2 Exception.DebugWindow.show()

Availability

Windows

Usage

mdm.Exception.DebugWindow.show():Void

©2006 Multidmedia Limited {mdm}


224 ZINC™ v2.5 Help Manual

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

trace:String Item to Trace

Returns

Nothing

Description

Traces to the debug window.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 225

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();

©2006 Multidmedia Limited {mdm}


226 ZINC™ v2.5 Help Manual

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 227

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

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.FileExplorer

Object Summary for the FileExplorer Class

The following table lists Objects of the FileExplorer class

Object Description
ComboBox ComboBox Object
ListView ListView Object

TreeView TreeView Object

Method Summary for the FileExplorer Class

The following table lists methods of the FileExplorer class

Method Description
FileExplorer.init() Initializes the FileExplorer components.

Event Summary for the FileExplorer Class

The following table lists events of the FileExplorer class

Method Description
Executes when a user double clicks an entry in the
onFileListViewDblClick
ListView.

©2006 Multidmedia Limited {mdm}


228 ZINC™ v2.5 Help Manual

6.13.1 Objects
6.13.1.1 FileExplorer.ComboBox
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.FileExplorer.ComboBox

Method Summary for the FileExplorer.ComboBox Class

The following table lists methods of the FileExplorer.ComboBox class

Method Description
FileExplorer.ComboBox.getPath() Returns the current path/root of the control.
FileExplorer.ComboBox.hide() Hides the loaded control.

Changes the root of the loaded control to the specified


FileExplorer.ComboBox.setPath()
value.
FileExplorer.ComboBox.show() Loads the Control Instance.

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

Returns the current path/root of the control.

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

var currentRootFolder = mdm.FileExplorer.ComboBox.getPath();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 229

6.13.1.1.1.2 FileExplorer.ComboBox.hide()

Availability

Windows

Usage

mdm.FileExplorer.ComboBox.hide():Void

Parameters

None

Returns

Nothing

Description

Hides the loaded control.

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

basePath:String Base path to be used in control.

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

©2006 Multidmedia Limited {mdm}


230 ZINC™ v2.5 Help Manual

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

mdm.FileExplorer.ComboBox.show(x:Number, y:Number, width:Number, height:Number,


basePath:String):Void

Parameters

x:Number Horizontal position of control.

y:Number Vertical position of control.

width:Number Width of control.

height:Number Height of control.

basePath:String Base path to be used in control.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 231

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.show(0, 0, 300, 400, "c:\\");

6.13.1.2 FileExplorer.ListView
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.FileExplorer.ListView

Method Summary for the FileExplorer.ListView Class

The following table lists methods of the FileExplorer.ListViewclass

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.

FileExplorer.ListView.getSelected() Returns the selected item of the control.

FileExplorer.ListView.hide() Hides the loaded control.


FileExplorer.ListView.hideHiddenFiles
Hides hidden files in the control.
()
FileExplorer.ListView.showHiddenFiles Shows hidden files in the control.
()
FileExplorer.ListView.setViewStyle() Changes the listing method style in the ListView control.
FileExplorer.ListView.show() Loads the Control Instance.

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

©2006 Multidmedia Limited {mdm}


232 ZINC™ v2.5 Help Manual

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

Returns an array which contains all items in the control.

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

var selectedItems = mdm.FileExplorer.TreeView.getItems();


mdm.Dialogs.prompt(selectedItems[0])
mdm.Dialogs.prompt(selectedItems[1])
// ... and so on

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 233

6.13.1.2.1.3 FileExplorer.ListView.getSelected()

Availability

Windows

Usage

mdm.FileExplorer.ListView.getSelected():String

Parameters

None

Returns

A String

Description

Returns the selected item of the control.

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

var selectedItem = mdm.FileExplorer.ListView.getSelected();


6.13.1.2.1.4 FileExplorer.ListView.hide()

Availability

Windows

Usage

mdm.FileExplorer.ListView.hide():Void

Parameters

None

Returns

Nothing

Description

Hides the loaded control.

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

©2006 Multidmedia Limited {mdm}


234 ZINC™ v2.5 Help Manual

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

Hides hidden files in the control.

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

Shows hidden files in the control.

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.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 235

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

viewType:String View Method to Use.

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

mdm.FileExplorer.ListView.show(x:Number, y:Number, width:Number, height:Number,


basePath:String):Void

Parameters

x:Number Horizontal position of control.

y:Number Vertical position of control.

width:Number Width of control.

©2006 Multidmedia Limited {mdm}


236 ZINC™ v2.5 Help Manual

height:Number Height of control.

basePath:String Base path to be used in control.

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

mdm.FileExplorer.ListView.show(0, 0, 300, 400, "c:\\");

6.13.1.3 FileExplorer.TreeView
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.FileExplorer.TreeView

Method Summary for the FileExplorer.TreeView Class

The following table lists methods of the FileExplorer.TreeView class

Method Description
FileExplorer.TreeView.getSelected() Returns the selected item of the control.

FileExplorer.TreeView.getPath() Returns the current path/root of the control.

FileExplorer.TreeView.hide() Hides the loaded control.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 237

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

Returns the selected item of the control.

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

var selectedItem = mdm.FileExplorer.TreeView.getSelected();


6.13.1.3.1.2 FileExplorer.TreeView.getPath()

Availability

Windows

Usage

mdm.FileExplorer.TreeView.getPath():String

Parameters

None

Returns

A String

©2006 Multidmedia Limited {mdm}


238 ZINC™ v2.5 Help Manual

Description

Returns the current path/root of the control.

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

var currentRootFolder = mdm.FileExplorer.TreeView.getPath();


6.13.1.3.1.3 FileExplorer.TreeView.hide()

Availability

Windows

Usage

mdm.FileExplorer.TreeView.hide():Void

Parameters

None

Returns

Nothing

Description

Hides the loaded control.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 239

Nothing

Description

Hides hidden files in the control.

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

basePath:String Base path to be used in control.

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.

©2006 Multidmedia Limited {mdm}


240 ZINC™ v2.5 Help Manual

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

mdm.FileExplorer.TreeView.show(x:Number, y:Number, width:Number, height:Number,


basePath:String):Void

Parameters

x:Number Horizontal position of control.

y:Number Vertical position of control.

width:Number Width of control.

height:Number Height of control.

basePath:String Base path to be used in control.

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.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 241

Example

mdm.FileExplorer.TreeView.show(0, 0, 400, 500, "C:\\");


6.13.1.3.1.7 FileExplorer.TreeView.showHiddenFiles()

Availability

Windows

Usage

mdm.FileExplorer.TreeView.showHiddenFiles():Void

Parameters

None

Returns

Nothing

Description

Shows hidden files in the control.

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

Initializes the FileExplorer components.

Notes

This command must be executed once before using any other FileExplorer objects methods.

©2006 Multidmedia Limited {mdm}


242 ZINC™ v2.5 Help Manual

Example

mdm.FileExplorer.init();

6.13.3 Events
6.13.3.1 onFileListViewDblClick

Availability

Windows

Usage

mdm.FileExplorer.onFileListViewDblClick:Function

Parameters

type:String File or Folder.

name:String Value of incoming data.

association:String Value of incoming data.

Description

Executes when a user double clicks an entry in the FileExplorer ListView control.

Example

Simple Usage:

function onFileListViewDblClick(type, name, association){


mdm.Dialogs.Prompt(type)
mdm.Dialogs.Prompt(name)
mdm.Dialogs.Prompt(association)
}

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

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.FileSystem

Object Summary for the FileSystem Class

The following table lists Objects of the FileSystem class

Object Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 243

BinaryFile BinaryFile Object

Method Summary for the FileSystem Class

The following table lists methods of the FileSystem class

Method Description
FileSystem.appendFile() Appends data to a File.
FileSystem.appendFileUnicode() Appends data to a File. Unicode Compliant.

FileSystem.copyFile() Copies a File from one location to another.


Copies a File from one location to another. Unicode
FileSystem.copyFileUnicode()
Compliant
FileSystem.copyFolder() Copies a Folder from one location to another.

FileSystem.createShortcut() Creates a Shortcut on the System.

FileSystem.deleteFile() Deletes a File.

FileSystem.deleteFileUnicode() Deletes a File. Unicode Compliant.

FileSystem.deleteFolder() Deletes a Folder.

FileSystem.deleteFolderUnicode() Deletes a Folder. Unicode Compliant.


FileSystem.fileExists() Returns a true or false statement to the variable return
based upon the existence of file.
Returns a true or false statement to the variable return
FileSystem.fileExistsUnicode()
based upon the existence of file.
Finds and list the specified files by looking in the specified
FileSystem.findFile()
folder and subdirectories.
FileSystem.folderExists() Checks if a Folder Exists.

FileSystem.folderExistsUnicode() Checks if a Folder Exists. Unicode Compliant.


Returns the the system associated executable for loading
FileSystem.getAssociation()
the specified extension.
FileSystem.getCurrentDir() Returns the application current directory.

FileSystem.getCurrentDirUnicode() Returns the application current directory. Unicode


FileSystem.getFileAttribs() Returns File Properties.

FileSystem.getFileCreator() Returns the File Creator Code.

FileSystem.getFileDate() Returns the last modified date of the file.

FileSystem.getFileSize() Returns the size of the file.

FileSystem.getFileTime() Returns the last modified time of the file.


FileSystem.getFileType() Returns the File Type.

Will perform a search in folder against the preferences in


FileSystem.getFileList()
search mask.
Returns a list of sub folders that exist in the folder specified
FileSystem.getFolderList()
as argument.
FileSystem.getFolderSize() Returns the size of a specified Folder.
Converts the string in the variable path to a non 8.3
FileSystem.getLongPathName()
pathname. ie. c:\documents and settings\temp.
Converts the string in the variable path to a valid 8.3
FileSystem.getShortPathName()
pathname. ie. c:\docum~1\temp.
FileSystem.loadFile() Load data from Files.

©2006 Multidmedia Limited {mdm}


244 ZINC™ v2.5 Help Manual

Load HEX or a Pipe delimited Decimal string from the


FileSystem.loadFileHEX()
specified file.
FileSystem.loadFileUnicode() Load data from Files. Unicode Compliant.

FileSystem.makeFolder() Creates a new folder as specified in argument.


Creates a new folder as specified in argument. Unicode
FileSystem.makeFolderUnicode()
Compliant.
FileSystem.nativePathToUnixPath() Converts a Standard Macintosh OS Path to a Unix Path.

FileSystem.saveFile() Saves text data to the file specified.


FileSystem.saveFileHEX() Saves HEX data to the file specified.

FileSystem.saveFileUnicode() Saves text data to the file specified. Unicode Compliant.

FileSystem.setCurrentDir() Changes the application current directory.


FileSystem.setCurrentDirUnicode() Changes the application current directory. Unicode
Compliant.
FileSystem.setFileAttribs() Sets/Unsets the attributes of the specified file.

6.14.1 Objects
6.14.1.1 FileSystem.BinaryFile
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.FileSystem.BinaryFile

Method Summary for the BinaryFile Class

The following table lists methods of the BinaryFile class

Method Description
FileSystem.BinaryFile.appendData() Appends the data specified.
FileSystem.BinaryFile.setData() Saves the specified data to the filename provided.

FileSystem.BinaryFile.writeData() Writes the data specified.

6.14.1.1.1 FileSystem.BinaryFile.appendData()

Availability

Windows

Usage

mdm.BinaryFile.appendData(filePath:String):Void

Parameters

filePath:String File path to file where data will be appended.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 245

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

dataToAppend:String Data to save in HEX format or a pipe delimited list of bytes(decimal)

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");

Decimal Pipe Delimited :

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

filePath:String File path to file where data will be saved.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


246 ZINC™ v2.5 Help Manual

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

Windows, Mac OSX

Usage

mdm.FileSystem.appendFile(filePath:String, dataToAdd:String):Void

Parameters

filePath:String File path to file where data will be appended.

dataToAdd:String Data to be added to file.

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

mdm.FileSystem.appendFile("c:\\myData.txt", "This is my text");

6.14.2.2 FileSystem.appendFileUnicode()

Availability

Windows

Usage

mdm.FileSystem.appendFileUnicode(filePath:String, dataToAdd:String):Void

Parameters

filePath:String File path to file where data will be appended.

dataToAdd:String Data to be added to file.

Returns

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 247

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

mdm.FileSystem.appendFileUnicode("c:\\myData.txt", "This is my text");

6.14.2.3 FileSystem.copyFile()

Availability

Windows, Mac OSX

Usage

mdm.FileSystem.copyFile(copyFrom:String, copyTo:String):Void

Parameters

copyFrom:String File path to file to be copied.

copyTo:String File path to file to be created.

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

copyFrom:String File path to file to be copied.

copyTo:String File path to file to be created.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


248 ZINC™ v2.5 Help Manual

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

Windows, Mac OSX

Usage

mdm.FileSystem.copyFolder(copyFrom:String, copyTo:String):Void

Parameters

copyFrom:String Folder path to be copied.

copyTo:String Folder path where source folder is to be created.

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

targetPath:String Shortcut target location.

startInFolder:String Shortcut target start folder.

description:String Shortcut description.

iconFilePath:String Shortcut icon source path.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 249

iconID:Number Shortcut icon identifier within icon source file.

shorcutLinkPath:String Shorcut file location.

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

Windows, Mac OSX

Usage

mdm.FileSystem.deleteFile(pathToFile:String):Void

Parameters

pathToFile:String Path to a file to be deleted.

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

pathToFile:String Path to a file to be deleted.

©2006 Multidmedia Limited {mdm}


250 ZINC™ v2.5 Help Manual

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

Windows, Mac OSX

Usage

mdm.FileSystem.deleteFolder(dir:String, prompt:String):Void

Parameters

dir:String Path to a Folder to be deleted.

prompt:String Warning Prompt Visibility.

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

dir:String Path to a Folder to be deleted.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 251

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

Windows, Mac OSX

Usage

mdm.FileSystem.fileExists(filePath:String):Boolean

Parameters

filePath:String Path to a file to check.

Returns

Boolean statement depending on file existence.

Description

Returns a true or false statement to the variable return based upon the existence of file.

Notes

None

Example

var exists = mdm.FileSystem.fileExists("c:\\myText.txt");

6.14.2.12 FileSystem.fileExistsUnicode()

Availability

Windows

Usage

mdm.FileSystem.fileExistsUnicode(filePath:String):Boolean

Parameters

filePath:String Path to a file to check.

Returns

Boolean statement depending on file existence.

Description

Returns a true or false statement to the variable return based upon the existence of file.

Notes

©2006 Multidmedia Limited {mdm}


252 ZINC™ v2.5 Help Manual

Unicode compliant

Example

var exists = mdm.FileSystem.fileExistsUnicode("c:\\myText.txt");

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

var myResults = mdm.FileSystem.findFile("d:\\myTextA\\*.exe");

6.14.2.14 FileSystem.folderExists()

Availability

Windows, Mac OSX

Usage

mdm.FileSystem.folderExists(folder:String):Boolean

Parameters

folder:String Path to folder to check.

Returns

A Boolean

Description

Returns a true or false statement based upon the existence of folder.

Notes

None

Example

var exists = mdm.FileSystem.folderExists("c:\\myFolder");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 253

6.14.2.15 FileSystem.folderExistsUnicode()

Availability

Windows

Usage

mdm.FileSystem.folderExistsUnicode(folder:String):Boolean

Parameters

folder:String Path to folder to check.

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

var exists = mdm.FileSystem.folderExistsUnicode("c:\\myFolder");

6.14.2.16 FileSystem.getAssociation()

Availability

Windows, Mac OSX

Usage

mdm.FileSystem.getAssociation(extension:String):String

Parameters

extension:String File extension to check for association with applications.

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

var myApplicationPath = mdm.FileSystem.getAssociation(".html");

6.14.2.17 FileSystem.getCurrentDir()

Availability

Windows, Mac OSX

©2006 Multidmedia Limited {mdm}


254 ZINC™ v2.5 Help Manual

Usage

mdm.FileSystem.getCurrentDir():String

Parameters

None

Returns

A String

Description

Returns the application current directory.

Notes

None

Example

var currentPath = mdm.FileSystem.getCurrentDir();

6.14.2.18 FileSystem.getCurrentDirUnicode()

Availability

Windows

Usage

mdm.FileSystem.getCurrentDirUnicode():String

Parameters

None

Returns

A String

Description

Returns the application current directory. Use after mdm.FileSystem.changeDir().

Notes

Unicode Complaint.

Example

var currentPath = mdm.FileSystem.getCurrentDirUnicode();

6.14.2.19 FileSystem.getFileAttribs()

Availability

Windows

Usage

mdm.FileSystem.getFileAttribs(filePath:String):Array

Parameters

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 255

filePath:String File path to check.

Returns

An Array

Description

Returns array of items holding file properties.

Notes

None

Example

var myFileAttribs = mdm.FileSystem.getFileAttribs("c:\\myText.txt");

// 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

filename:String Path to a file to check.

Returns

A String

Description

Returns the the File Creator Code.

Notes

None

Example

var fileCreator = mdm.FileSystem.getFileCreator("myFile.html");

6.14.2.21 FileSystem.getFileDate()

Availability

Windows

Usage

mdm.FileSystem.getFileDate(pathToFile:String):String

Parameters

pathToFile:String Path to a file to check.

©2006 Multidmedia Limited {mdm}


256 ZINC™ v2.5 Help Manual

Returns

A String

Description

Returns the last modified date of the file.

Notes

None

Example

var fileDate = mdm.FileSystem.getFileDate("c:\\myText.txt");

6.14.2.22 FileSystem.getFileSize()

Availability

Windows

Usage

mdm.FileSystem.getFileSize(pathToFile:String):Number

Parameters

pathToFile:String Path to a file to check.

Returns

An Integer

Description

Returns the date of the file.

Notes

None

Example

var fileSize = mdm.FileSystem.getFileSize("c:\\myText.txt");

6.14.2.23 FileSystem.getFileTime()

Availability

Windows

Usage

mdm.FileSystem.getFileTime(pathToFile:String):String

Parameters

pathToFile:String Path to a file to check.

Returns

A String

Description

Returns the last modified time of the file.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 257

Notes

None

Example

var fileModified = mdm.FileSystem.getFileTime("c:\\myText.txt");

6.14.2.24 FileSystem.getFileType()

Availability

Mac OSX

Usage

mdm.FileSystem.getFileType(filename:String):String

Parameters

filename:String Path to a file to check.

Returns

A String

Description

Returns the the File Type.

Notes

None

Example

var fileType = mdm.FileSystem.getFileType("myFile.html");

6.14.2.25 FileSystem.getFileList()

Availability

Windows, Mac OSX

Usage

mdm.FileSystem.getFileList(folderPath:String, searchMask:String):Array

Parameters

folderPath:String Path to a folder.

searchMask:String Search mask.

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 "*.*"

©2006 Multidmedia Limited {mdm}


258 ZINC™ v2.5 Help Manual

Example

var myFiles = mdm.FileSystem.getFileList("c:\\", "*.txt");


mdm.Dialogs.prompt(myFiles[0])
mdm.Dialogs.prompt(myFiles[1])
// ... and so on

6.14.2.26 FileSystem.getFolderList()

Availability

Windows, Mac OSX

Usage

mdm.FileSystem.getFolderList(folderPath:String):Array

Parameters

folderPath:String Path to a folder.

Returns

An Array

Description

Returns a list of sub folders that exist in the folder specified.

Notes

None

Example

var myFolders = mdm.FileSystem.getFolderList("c:\\");


mdm.Dialogs.prompt(myFolders[0])
mdm.Dialogs.prompt(myFolders[1])
// ... and so on

6.14.2.27 FileSystem.getFolderSize()

Availability

Windows

Usage

mdm.FileSystem.getFolderSize(folderPath:String):Number

Parameters

folderPath:String Path to a file to check.

Returns

An Integer

Description

Returns the size of the folder specified in argument.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 259

var myFolderSize = mdm.FileSystem.getFolderSize("c:\\");

6.14.2.28 FileSystem.getLongPathName()

Availability

Windows

Usage

mdm.FileSystem.getLongPathName(path:String):String

Parameters

path:String Path to a file or folder to convert.

Returns

A String

Description

Converts the string to a non 8.3 pathname. ie. c:\documents and settings\temp.

Notes

None

Example

var myLongFileName = mdm.FileSystem.getLongPathName("c:\\docume~1\\temp");

6.14.2.29 FileSystem.getShortPathName()

Availability

Windows

Usage

mdm.FileSystem.getShortPathName(path:String):String

Parameters

path:String Path to a file or folder to convert.

Returns

A String

Description

Converts the string to a valid 8.3 pathname. ie. c:\docum~1\temp.

Notes

None

Example

var myLongFileName = mdm.FileSystem.getShortPathName("C:\\Documents and


Settings\\All Users");

©2006 Multidmedia Limited {mdm}


260 ZINC™ v2.5 Help Manual

6.14.2.30 FileSystem.loadFile()

Availability

Windows, Mac OSX

Usage

mdm.FileSystem.loadFile(filePath:String):String

Parameters

filePath:String Path to a file to load data from.

Returns

A String

Description

Load data from files.

Notes

None

Example

var mySavedData = mdm.FileSystem.loadFile("c:\\myText.txt");

6.14.2.31 FileSystem.loadFileHEX()

Availability

Windows

Usage

mdm.FileSystem.loadFileHEX(filePath:String):String

Parameters

filePath:String Path to a file to load data from.

Returns

A String

Description

Load HEX or a Pipe delimited Decimal string from the specified file.

Notes

None

Example

var mySavedData = mdm.FileSystem.loadFileHEX("c:\\myText.txt");

6.14.2.32 FileSystem.loadFileUnicode()

Availability

Windows, Mac OSX

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 261

Usage

mdm.FileSystem.loadFileUnicode(filePath:String):String

Parameters

filePath:String Path to a file to load data from.

Returns

A String

Description

Load data from files.

Notes

Unicode compliant

Example

var mySavedData = mdm.FileSystem.loadFileUnicode("c:\\myText.txt");

6.14.2.33 FileSystem.makeFolder()

Availability

Windows, Mac OSX

Usage

mdm.FileSystem.makeFolder(folderPath:String):Void

Parameters

folderPath:String Path to a folder to be created.

Returns

Nothing

Description

Creates a new folder as specified in argument.

Notes

None

Example

mdm.FileSystem.makeFolder("c:\\myFolder");

6.14.2.34 FileSystem.makeFolderUnicode()

Availability

Windows

Usage

mdm.FileSystem.makeFolderUnicode(folderPath:String):Void

Parameters

folderPath:String Path to a folder to be created.

©2006 Multidmedia Limited {mdm}


262 ZINC™ v2.5 Help Manual

Returns

Nothing

Description

Creates a new folder as specified in argument.

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

nativePath:String Path to be converted into Unix Format.

Returns

A String

Description

Converts a Standard Macintosh OS Path to a Unix Path.

Notes

None

Example

var UnixPath = mdm.FileSystem.nativePathToUnixPath("MacOSX:Users:User1:Desktop");

// The Unix Path Returned for this example would be /Users/User1/Desktop

6.14.2.36 FileSystem.saveFile()

Availability

Windows, Mac OSX

Usage

mdm.FileSystem.saveFile(filePath:String, dataToSave:String):Void

Parameters

filePath:String Path to a file where data will be saved.

dataToSave:String Data to save to a file.

Returns

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 263

Nothing

Description

Saves text data to the file specified.

Notes

None

Example

mdm.FileSystem.saveFile("c:\\myText.txt", "My text data");

6.14.2.37 FileSystem.saveFileHEX()

Availability

Windows

Usage

mdm.FileSystem.saveFileHEX(filePath:String, dataToSave:String):Void

Parameters

filePath:String Path to a file where data will be saved.

dataToSave:String Data to save to a file in HEX format or a pipe delimited list of bytes(decimal).

Returns

Nothing

Description

Saves HEX data to the file specified.

Notes

None

Example

Hex Data:

mdm.FileSystem.saveFileHEX("c:\\myText.txt", "FF0067EA349F");

Pipe Delimited Decimal:

mdm.FileSystem.saveFileHEX("c:\\myText.txt", "255|0|103|234|52|159");

6.14.2.38 FileSystem.saveFileUnicode()

Availability

Windows, Mac OSX

Usage

mdm.FileSystem.saveFileUnicode(filePath:String, dataToSave:String):Void

Parameters

filePath:String Path to a file where data will be saved.

©2006 Multidmedia Limited {mdm}


264 ZINC™ v2.5 Help Manual

dataToSave:String Data to save to a file.

Returns

Nothing

Description

Saves text data to the file specified.

Notes

Unicode compliant

Example

mdm.FileSystem.saveFileUnicode("c:\\myText.txt", "My text data");

6.14.2.39 FileSystem.setCurrentDir()

Availability

Windows

Usage

mdm.FileSystem.setCurrentDir(newPath:String):Void

Parameters

newPath:String Path to be set as new application directory.

Returns

Nothing

Description

Changes the application current directory.

Notes

None

Example

mdm.FileSystem.setCurrentDir("c:\\");

6.14.2.40 FileSystem.setCurrentDirUnicode()

Availability

Windows

Usage

mdm.FileSystem.setCurrentDirUnicode(newPath:String):Void

Parameters

newPath:String Path to be set as new application directory.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 265

Description

Changes the application current directory.

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

filePath:String Path to a file which attribute is to be set.

attribute:String Attribute identifier.

Returns

Nothing

Description

Sets/Unsets the attribute of a file to one of possible values:

+A sets the archive attribute


+H sets the hidden attribute
+R sets the read only attribute
+S sets the system attribute
-A unsets the archive attribute
-H unsets the hidden attribute
-R unsets the read only attribute
-S unsets the system attribute

Notes

None

Example

mdm.FileSystem.setFileAttribs("c:\\myText.txt", "+A");

6.15 mdm.Flash

Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Flash

Method Summary for the Flash Class

The following table lists methods of the Flash class

©2006 Multidmedia Limited {mdm}


266 ZINC™ v2.5 Help Manual

Method Description
Flash.allowScale() Sets the scale of the SWF during runtime
Flash.baseURL() Sets the Base URL of the SWF file in projector.

Flash.callFunction() Will execute a function in your SWF movie.


Will execute a function in your SWF movie. Unicode
Flash.callFunctionUnicode()
Compliant.
Flash.getVar() Retrieves the value of a ActionScript variable.

Flash.getVarUnicode() Retrieves the value of a ActionScript variable.

Flash.loadMovie() Loads an external SWF movie into a level.


Expands Flash Movie to cover the entire spread of the
Flash.setShowAllMode()
Projector.
Flash.setSWFDir() Sets the virtual SWF directory to the Application Directory.

Flash.setSWFDirAdv() Sets the virtual SWF directory to the Specified Directory

Flash.setVar() Sets or creates a variable on the _root of the SWF.


Sets or creates a variable on the _root of the SWF.
Flash.setVarUnicode()
Unicode Compliant.

6.15.1 Methods
6.15.1.1 Flash.allowScale()

Availability

Windows

Usage

mdm.Flash.allowScale(scaleContent:Boolean, keepAspectRatio:Boolean):Void

Parameters

scaleContent:Boolean Scale switch.

keepAspectRatio:Boolean Aspect ratio switch.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 267

Windows

Usage

mdm.Flash.baseURL(baseURLPath:String):Void

Parameters

baseURLPath:String Path to folder.

Returns

Nothing

Description

Sets the Base URL of the SWF file in projector.

Notes

None

Example

mdm.Flash.baseURL("c:\\myFolder");

6.15.1.3 Flash.callFunction()

Availability

Windows, Mac OSX

Usage

mdm.Flash.callFunction(functionName:String, parametersString:String,
delimiter:String):Void

Parameters

functionName:String Function name to be executed.

parametersString:String Path Parameters as delimited string.

delimiter:String Used delimited.

Returns

Nothing

Description

Will execute a function in your SWF movie.

Notes

None

Example

mdm.Flash.callFunction("myFunction", "abc|123", "|");

6.15.1.4 Flash.callFunctionUnicode()

Availability

Windows

©2006 Multidmedia Limited {mdm}


268 ZINC™ v2.5 Help Manual

Usage

mdm.Flash.callFunctionUnicode(functionName:String, parametersString:String,
delimiter:String):Void

Parameters

functionName:String Function name to be executed.

parametersString:String Path Parameters as delimited string.

delimiter:String Used delimited.

Returns

Nothing

Description

Will execute a function in your SWF movie.

Notes

Unicode compliant

Example

mdm.Flash.callFunctionUnicode("myFunction", "abc|123", "|");

6.15.1.5 Flash.getVar()

Availability

Windows

Usage

mdm.Flash.getVar(variableName:String):String

Parameters

variableName:String Variable name.

Returns

A String

Description

Retrieves the value of an ActionScript variable.

Notes

This command can also retrieve a variable values from a subform.

Example

Simple Usage:

var myVariable = mdm.Flash.getVar("myName");

Retrive a var from a SubForm:

var myVariable = mdm.Flash.getVar("SubForm1:myName");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 269

6.15.1.6 Flash.getVarUnicode()

Availability

Windows

Usage

mdm.Flash.getVarUnicode(variableName:String):String

Parameters

variableName:String Variable name.

Returns

A String

Description

Retrieves the value of a ActionScript variable.

Notes

This command can also retrieve a variable values from a subform.

Unicode compliant

Example

Simple Usage:

var myVariable = mdm.Flash.getVarUnicode("myName");

Retrive a var from a SubForm:

var myVariable = mdm.Flash.getVarUnicode("SubForm1:myName");

6.15.1.7 Flash.loadMovie()

Availability

Windows

Usage

mdm.Flash.loadMovie(targetLevel:Number, moviePath:String):Void

Parameters

targetLevel:Number Target level where movie is to be loaded.

moviePath:String Path to movie to be loaded.

Returns

Nothing

Description

Alternative to LoadMovieNum command. Loads an external SWF movie into a level.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


270 ZINC™ v2.5 Help Manual

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

Sets the virtual SWF directory to the Application Directory.

Notes

This command is executed by default on first frame of all projectors.

Example

mdm.Flash.setSWFDir();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 271

6.15.1.10 Flash.setSWFDirAdv()

Availability

Windows

Usage

mdm.Flash.setSWFDirAdv(swfDirectory:String):Void

Parameters

swfDirectory:String Path to folder.

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

Windows, Mac OSX

Usage

mdm.Flash.setVar(variableName:String, variableValue:String):Void

Parameters

variableName:String Variable name.

variableValue:String Variable value.

Returns

Nothing

Description

Sets or creates a variable in the main timeline (_root) of the SWF to the specified value.

Notes

This command can also retrieve variable values from a subform.

Example

Simple Usage:

mdm.Flash.setVar("myVariable", "myName");

Set a var in a SubForm:

©2006 Multidmedia Limited {mdm}


272 ZINC™ v2.5 Help Manual

mdm.Flash.setVar("myVariable", "SubForm1:myName");

6.15.1.12 Flash.setVarUnicode()

Availability

Windows

Usage

mdm.Flash.setVarUnicode(variableName:String, variableValue:String):Void

Parameters

variableName:String Variable name.

variableValue:String Variable value.

Returns

Nothing

Description

Sets or creates a variable in the main timeline (_root) of the SWF to the specified value.

Notes

This command can also set variable values in a subform.

Unicode compliant

Example

Simple Usage:

mdm.Flash.setVarUnicode("myVariable", "myName");

Set a var in a SubForm:

mdm.Flash.setVarUnicode("myVariable", "SubForm1:myName");

6.16 mdm.Forms

Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Forms

Method Summary for the Forms Class

The following table lists methods of the Forms class

Method Description
Forms.addMask() Applies a transparency sub-mask to the projector.
Forms.callFunction() Executes a function in the specified form.

Forms.callFunctionUnicode() Executes a function in the specified form.


Sets maximum and minimum constraints for the specified
Forms.constraints()
form.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 273

Forms.dndDisable() Disables Drag and Drop functionality.

Forms.dndEnable() Enables Drag and Drop functionality.


Sets the playhead of the specified Form to the frame
Forms.goToFrame()
specified.
Sets the playhead of the specified Form to the label
Forms.goToLabel()
specified.
Forms.hide() Hides the specified Form.

Forms.hideMask() Hides a previously applied mask.

Forms.hideCaption() Hides the Caption on the specified Form.

Forms.maximize() Maximizes the specified Form.

Forms.minimize() Minimizes the specified Form.

Forms.restore() Restores the specified Form.

Forms.setFocus() Will set the specified Form to be in focus.


Forms.setStatusBarText() Will set the text of the Status Bar.

Forms.shake() Shakes the specified form.

Forms.show() Shows the specified form.


Forms.showFullScreen() Sets the specified Form to FullScreen. Mac OSX Only.

Forms.showInScreen() Shows the specified form in specified display.


Applies a Transparency Mask to the projector based upon
Forms.showMask()
a BMP image.
Forms.showModal() Will show the specified Form in Modal Mode.

Forms.showStatusBar() Will display a Status Bar on the specified Form.


When activated, LEFT mouse button can be used to drag
Forms.startDrag()
the form.
Forms.stopDrag() Disables LEFT mouse button drag function.

Property Summary for the Forms Class

The following table lists properties of the Forms class

Property Description
Forms.alpha Will set the Alpha level of the Specified Form.
Forms.baseURL Will set the Base URL of the specified Form.

Forms.bgColor Will set the Background Color of the specified Form.

Forms.height Sets the Form Height in Pixels


Contains information if form is already created (rendered)
Forms.isCreated
on screen.
Forms.title Sets the Form Window Title.

Forms.titleUnicode Sets the Form Window Title. Unicode Compliant.

Forms.visible Form Visibility

Forms.width Sets the Form Width in Pixels

Forms.windowState Holds the Window state of the specified Form.

Forms.x Sets the Form X Position.

©2006 Multidmedia Limited {mdm}


274 ZINC™ v2.5 Help Manual

Forms.y Sets the Form Y Position.

6.16.1 Methods
6.16.1.1 Forms.addMask()

Availability

Windows

Usage

mdm.Forms.formName.addMask(xPosition:Number, yPosition:Number, imageMaskPath:String


):Void

Parameters

xPosition:Number Mask starting left position.

yPosition:Number Mask starting top position.

imageMaskPath:String Path to file to be used as mask.

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

mdm.Forms.MainForm.addMask(10, 10, "c:\\myFolder\\myMask.bmp");

6.16.1.2 Forms.callFunction()

Availability

Windows

Usage

mdm.Forms.formName.callFunction(functionName:String, parametersString:String,
delimiter:String):Void

Parameters

functionName:String Function name to be executed.

parametersString:String Path Parameters as delimited string.

delimiter:String Used delimited.

Returns

Nothing

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 275

Executes a function in the specified form.

Notes

None

Example

mdm.Forms.MainForm.callFunction("myFunction", "abc|123", "|");

6.16.1.3 Forms.callFunctionUnicode()

Availability

Windows

Usage

mdm.Forms.formName.callFunctionUnicode(functionName:String,
parametersString:String, delimiter:String):Void

Parameters

functionName:String Function name to be executed.

parametersString:String Path Parameters as delimited string.

delimiter:String Delimiter to use

Returns

Nothing

Description

Executes a function in the specified form.

Notes

Unicode compliant

Example

mdm.Forms.MainForm.callFunctionUnicode("myFunction", "abc|123", "|");

6.16.1.4 Forms.constraints()

Availability

Windows

Usage

mdm.Forms.formName.constraints(maxWidth:Number, maxHeight:Number, minWidth:Number,


minHeight:Number):Void

Parameters

maxWidth:Number Maximum form width.

maxHeight:Number Maximum form height.

minWidth:Number Minimum form height.

minHeight:Number Minimum form height.

©2006 Multidmedia Limited {mdm}


276 ZINC™ v2.5 Help Manual

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

mdm.Forms.MainForm.constraints(400, 400, 200, 200);

6.16.1.5 Forms.dndDisable()

Availability

Windows, Mac OSX

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

Windows, Mac OSX

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 277

projector, and the path and filename will be sent to the event function.

Notes

For use with the event onDragDrop

Example

mdm.Forms.MainForm.dndEnable();

6.16.1.7 Forms.goToFrame()

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.goToFrame(frameNumber:Number):Void

Parameters

frameNumber:Number Target frame number.

Returns

Nothing

Description

Sets the playhead of the specified Form to the frame specified.

Notes

None

Example

mdm.Forms.MainForm.goToFrame(10);

6.16.1.8 Forms.goToLabel()

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.goToLabel(frameLabel:Number):Void

Parameters

frameLabel:String Target frame label.

Returns

Nothing

Description

Sets the playhead of the specified Form to the label specified.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


278 ZINC™ v2.5 Help Manual

mdm.Forms.MainForm.goToLabel("intro");

6.16.1.9 Forms.hide()

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.hide():Void

Parameters

None

Returns

Nothing

Description

Hides the specified form.

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

Hides a previously applied mask.

Notes

None

Example

mdm.Forms.MainForm.hideMask();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 279

6.16.1.11 Forms.hideCaption()

Availability

Windows

Usage

mdm.Forms.formName.hideCaption(flag:Boolean):Void

Parameters

flag:Boolean Value to hide or show the Caption

Returns

Nothing

Description

Hides the Caption on the specified Form.

Notes

This command will not work on Skinned Forms.

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

Hides a previously created status bar.

Notes

None

Example

mdm.Forms.MainForm.hideStatusBar()

6.16.1.13 Forms.maximize()

Availability

Windows, Mac OSX

©2006 Multidmedia Limited {mdm}


280 ZINC™ v2.5 Help Manual

Usage

mdm.Forms.formName.maximize():Void

Parameters

None

Returns

Nothing

Description

Maximizes the specified Form.

Notes

None

Example

mdm.Forms.MainForm.maximize();

6.16.1.14 Forms.minimize()

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.minimize():Void

Parameters

None

Returns

Nothing

Description

Minimizes the specified Form.

Notes

None

Example

mdm.Forms.MainForm.minimize();

6.16.1.15 Forms.restore()

Availability

Windows

Usage

mdm.Forms.formName.restore():Void

Parameters

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 281

Returns

Nothing

Description

Restores the specified Form.

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

Will set the specified Form to be in focus.

Notes

None

Example

mdm.Forms.MainForm.setFocus();

6.16.1.17 Forms.setStatusBarText()

Availability

Windows

Usage

mdm.Forms.formName.setStatusBarText(statusBarText:String):Void

Parameters

statusBarText:String Text to display on status bar.

Returns

Nothing

Description

©2006 Multidmedia Limited {mdm}


282 ZINC™ v2.5 Help Manual

Sets the text of the Status Bar.

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

Windows, Mac OSX

Usage

mdm.Forms.formName.shake(shakeTime:Number):Void

Parameters

shakeTime:Number Number of times to shake the form.

Returns

Nothing

Description

Shakes the specified form.

Notes

None

Example

mdm.Forms.MainForm.shake(10);

6.16.1.19 Forms.show()

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.show():Void

Parameters

None

Returns

Nothing

Description

Shows the specified form.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 283

mdm.Forms.MainForm.show();

6.16.1.20 Forms.showFullScreen()

Availability

Mac OSX

Usage

mdm.Forms.formName.showFullScreen(state:Boolean):Void

Parameters

state:Boolean True or False value to determine FullScreen State

Returns

Nothing

Description

Sets or Unsets the specified Form to FullScreen.

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

screenID:Number Target display ID.

Returns

Nothing

Description

Shows the specified form in specified display.

Notes

None

Example

mdm.Forms.MainForm.showInScreen(1);

©2006 Multidmedia Limited {mdm}


284 ZINC™ v2.5 Help Manual

6.16.1.22 Forms.showMask()

Availability

Windows

Usage

mdm.Forms.formName.showMask(formName:String):Void

Parameters

formName:String Target form name.

Returns

Nothing

Description

Applies a Transparency Mask to the projector based upon a BMP image.

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

var exitCode = mdm.Forms.MainForm.showModal();

6.16.1.24 Forms.showStatusBar()

Availability

Windows

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 285

Usage

mdm.Forms.formName.showStatusBar():Void

Parameters

None

Returns

Nothing

Description

Creates/shows a status bar at the bottom of your Projector.

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

©2006 Multidmedia Limited {mdm}


286 ZINC™ v2.5 Help Manual

None

Returns

Nothing

Description

Disables LEFT mouse button drag function.

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

Will set the Alpha level of the Specified Form.

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

Will set the Base URL of the specified Form.

Notes

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 287

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

Will set the Background Color of the specified Form.

Notes

None

Example

mdm.Forms.MainForm.bgColor = "CCCCCC";

6.16.2.4 Forms.height

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.height:Number

Returns

An Integer

Description

Sets height of current form in pixels

Notes

None

Example

Get the Height:

var Height = mdm.Forms.MainForm.height;

Set the Height:

mdm.Forms.MainForm.height = 200;

©2006 Multidmedia Limited {mdm}


288 ZINC™ v2.5 Help Manual

6.16.2.5 Forms.isCreated

Availability

Windows

Usage

mdm.Forms.formName.isCreated:Boolean

Returns

A Boolean

Description

Contains information if form is already created (rendered) on screen.

Notes

Will return "true" if the form is created, and "undefned" if the form has not been created.

Example

var isCreated = mdm.Forms.MainForm.isCreated;

6.16.2.6 Forms.title

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.title:String

Returns

A String

Description

Sets the Form Window Title.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 289

Description

Sets the form Window Title.

Notes

Unicode Compliant. For some foreign characters to be displayed correctly, you must have supplemental language support
installed on your computer.

Example

mdm.Forms.MainForm.titleUnicode = "My Custom Title";

6.16.2.8 Forms.visible

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.visible:Boolean

Returns

A Boolean

Description

Form visibility.

Notes

None

Example

To Get the Visibility:

var isMyFormVisible = mdm.Forms.MainForm.visible;

To Set the Visibility:

mdm.Forms.MainForm.visible = true;

6.16.2.9 Forms.width

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.width:Number

Returns

An Integer

Description

Sets width of current form in pixels

Notes

None

©2006 Multidmedia Limited {mdm}


290 ZINC™ v2.5 Help Manual

Example

Get the Width:

var Width = mdm.Forms.MainForm.width;

Set the Width:

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

var myFormState = mdm.Forms.MainForm.windowState;

6.16.2.11 Forms.x

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.x:Number

Returns

An Integer

Description

Sets the X position of current form in pixels

Notes

None

Example

Get the X Position:

var xPos = mdm.Forms.MainForm.x;

Set the X Position:

mdm.Forms.MainForm.x = 200;

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 291

6.16.2.12 Forms.y

Availability

Windows, Mac OSX

Usage

mdm.Forms.formName.y:Number

Returns

An Integer

Description

Sets the Y position of current form in pixels

Notes

None

Example

Get the Y Position:

var xPos = mdm.Forms.MainForm.x;

Set the Y Position:

mdm.Forms.MainForm.y = 200;

6.17 mdm.FTP

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.FTP

Constructor Summary for the FTP Class

The following table lists constructors for the FTP class

Constructor Description
Will create a new FTP Instance using the specified
mdm.FTP()
parameters.

Method Summary for the FTP Class

The following table lists methods of the FTP class

Method Description
FTP.abort() Will abort transfer operation for the specified FTP Instance.
FTP.chDir() Sets the current FTP directory to the one specified.

Will close the specified FTP Instance and remove it from


FTP.close()
Memory.
FTP.deleteDir() Deletes the Directory Specified from the FTP Server.

©2006 Multidmedia Limited {mdm}


292 ZINC™ v2.5 Help Manual

FTP.deleteFile() Deletes the File Specified from the FTP Server.


Will return "true" or "false" depending on the existence of
FTP.dirExists()
the specified directory.
Will return "true" or "false" depending on the existence of
FTP.fileExists()
the specified file.
FTP.getDirAttribs() Will return the FTP attributes of the specified directory.

FTP.getDirDateTime() Will return the Date and Time of the specified directory.

FTP.getFile() Will download the a Remote File.


Will return a 2 dimensional array which contains all of the
FTP.getFileList()
files in the current FTP Directory.
FTP.getFileAttribs() Will return the FTP attributes of the specified filename.

FTP.getFileDateTime() Will return the Date and Time of the specified filename.

FTP.getFileSize() Will return the size in bytes of the specified filename.


Will return a 2 dimensional array which contains all of the
FTP.getFolderList()
folders in the current FTP Directory.
FTP.login() Logs into the FTP Account.
Creates a new Directory with the name specified on the
FTP.makeDir()
FTP Server.
Moves the specified File to the specified Folder on the FTP
FTP.moveFile()
Server.
Will refresh the lists of files and folders in the current FTP
FTP.refresh()
folder.
FTP.renameFile() Will rename the Specified File.
Will return the position in bytes where the transfer started
FTP.resumePosition()
when resuming is supported.
FTP.sendCommand() Will send a specified command to the FTP server.

FTP.sendFile() Will Upload a File to the Remote Server.


Sets the type of FTP connection to use if the connection is
FTP.setProxy()
behind a proxy server.

Property Summary for the FTP Class

The following table lists properties of the FTP class

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.

Will return the number of bytes transferred since last


FTP.bytesTransferred
transfer operation started.
FTP.currentDir Will get or set the current directory on FTP server.
This command will return a string describing the last error
FTP.error
occurred.
Sets the initial directory to change to, immediately after
FTP.initialDir
login.
Will return "true" or "false" depending if the FTP connection
FTP.isBusy
is busy or not.
Will return "true" or "false" depending if the FTP connection
FTP.isConnected
is connected or not.
Will return a string containing the last response line from
FTP.lastReply
the FTP server.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 293

FTP.loggerData Returns all text from the FTP logger (if available).

FTP.NOOP Enable or Disable an automatic NOOP Process.


Set mode to "true" to enable passive mode or "false" to
FTP.passive
disable.
FTP.serverType Sets the FTP Server Type.
Will return "true" if last command was successful or "false"
FTP.success
otherwise.
Will return "true" or "false" based upon whether the FTP
FTP.supportsResume
server supports resuming.
Will set the time in seconds that the FTP connection will
FTP.timeout
wait to connect to a socket.
FTP.transferMode Sets the Transfer mode to "binary" or "ascii".
Will return the time elapsed since last transfer operation for
FTP.transferTime
the specified connection.

Event Summary for the FTP Class

The following table lists events of the FTP class

Event Description
onAborted Executes when an FTP transfer is aborted.
onBusy Executes when an FTP connection is busy.

onConnected Executes when an FTP Connection occurs successfully.

onDirChanged Executes when an FTP directory is changed.

onDirCreated Executes when an FTP directory is created.

onDirDeleted Executes when an FTP directory is deleted.

onError Executes when an FTP error occurs.

onFileDeleted Executes when an FTP file is deleted.

onFileReceived Executes when an FTP file is received.

onFileRenamed Executes when an FTP file is renamed.

onFileSent Executes when an FTP file is sent.

onFileTransferred Executes when an FTP file is transferred.

onIndexFileReceived Executes when an FTP Index File is received.

onListingDone Executes when an FTP Listing Procedure completes.

onLoggedIn Executes when an FTP Log In occurs successfully.

onQuit Executes when the connection to the FTP server is lost

onReady Executes when an FTP connection is ready.

onResolveLinks Executes when an FTP Resolved Link action occurs.

6.17.1 Constructor
6.17.1.1 mdm.FTP()

Availability

Windows

©2006 Multidmedia Limited {mdm}


294 ZINC™ v2.5 Help Manual

Constructor

mdm.FTP(server:String, port:Number):Void

Parameters

server:String FTP Server

port:Number Port Number

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.

c) "21" is the standard FTP Port

Example

Create a new Instance called myFTP :

myFTP = new mdm.FTP("ftp.mydomain.com", 21)

6.17.2 Methods
6.17.2.1 FTP.abort()

Availability

Windows

Usage

ftpInstance.abort():Void

Parameters

None

Returns

Nothing

Description

Will abort transfer operation for the specified FTP Instance.

Notes

None

Example

myFTP.abort();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 295

6.17.2.2 FTP.chDir()

Availability

Windows

Usage

ftpInstance.chDir(dir:String):Void

Parameters

dir:String Name of Directory

Returns

Nothing

Description

Sets the current FTP directory to the one specified.

Notes

None

Example

To change the FTP Folder to a Directory called "Images":

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();

©2006 Multidmedia Limited {mdm}


296 ZINC™ v2.5 Help Manual

6.17.2.4 FTP.deleteDir()

Availability

Windows

Usage

ftpInstance.deleteDir(dir:String):Void

Parameters

dir:String Name of Directory

Returns

Nothing

Description

Deletes the Directory Specified from the FTP Server.

Notes

To delete multiple directories, delimit directory names with a pipe charcter "|".

Example

To Delete the FTP Folder "Images":

myFTP.deleteDir("Images");

To Delete the FTP Folders "Images" and "Users":

myFTP.deleteDir("Images|Users");

6.17.2.5 FTP.deleteFile()

Availability

Windows

Usage

ftpInstance.deleteFile(filename:String):Void

Parameters

filename:String Name of File(s)

Returns

Nothing

Description

Deletes the File Specified from the FTP Server.

Notes

To delete multiple files, delimit filenames with a pipe charcter "|".

Example

To Delete the FTP File "myFile.txt":

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 297

myFTP.deleteFile("myFile.txt");

To Delete the Files "myFile.txt", "myImage.jpg" and "myDatabase.mdb":

myFTP.deleteFile("myFile.txt|myImage.jpg|myDatabase.mdb");

6.17.2.6 FTP.dirExists()

Availability

Windows

Usage

ftpInstance.dirExists(dir:String):Boolean

Parameters

dir:String Name of Directory

Returns

A Boolean

Description

Will return "true" or "false" depending on the existence of the specified directory.

Notes

None

Example

Simple Usage:

var exists = myFTP.dirExists("Images");

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

filename:String Name of File

Returns

A Boolean

Description

Will return "true" or "false" depending on the existence of the specified file.

©2006 Multidmedia Limited {mdm}


298 ZINC™ v2.5 Help Manual

Notes

If the Directory contains many files, this command can take up to 20 seconds to return a result.

Example

Simple Usage:

var exists = myFTP.fileExists("myFile.txt");

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

dir:String Name of Directory

Returns

A String

Description

Will return the FTP attributes of the specified directory.

Notes

None

Example

var attribs = myFTP.getDirAttribs("Images");

6.17.2.9 FTP.getDirDateTime()

Availability

Windows

Usage

ftpInstance.getDirDateTime(dir:String):String

Parameters

dir:String Name of Directory

Returns

A String

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 299

Will return the Date and Time of the specified directory.

Notes

None

Example

var dateTime = myFTP.getDirDateTime("Images");

6.17.2.10 FTP.getFile()

Availability

Windows

Usage

ftpInstance.getFile(remoteFile:String, localFile:String):Void

Parameters

remoteFile:String Name of File(s) to Download

localFile:String Local Path and Filename(s) to Save To

Returns

Nothing

Description

Will download the file specified in remoteFile and save it to localFile.

Notes

To download multiple files, delimit filenames with a pipe charcter "|".

Example

Simple Usage:

myFTP.getFile("myFile.txt", "C:\\myDownloadedFile.txt");

To download multiple Files:

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

©2006 Multidmedia Limited {mdm}


300 ZINC™ v2.5 Help Manual

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:

var myArray = myFTP.getFileList();

// 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

filename:String Name of File

Returns

A String

Description

Will return the FTP attributes of the specified filename.

Notes

None

Example

var attribs = myFTP.getFileAttribs("myFile.txt");

6.17.2.13 FTP.getFileDateTime()

Availability

Windows

Usage

ftpInstance.getFileDateTime(filename:String):String

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 301

Parameters

filename:String Name of File

Returns

A String

Description

Will return the Date and Time of the specified filename.

Notes

None

Example

var dateTime = myFTP.getFileDateTime("myFile.txt");

6.17.2.14 FTP.getFileSize()

Availability

Windows

Usage

ftpInstance.getFileSize(filename:String):Number

Parameters

filename:String Name of File

Returns

An Integer

Description

Will return the size in bytes of the specified filename.

Notes

None

Example

var fileSize = myFTP.getFileSize("myFile.txt");

6.17.2.15 FTP.getFolderList()

Availability

Windows

Usage

ftpInstance.getFolderList():Array

Parameters

None

©2006 Multidmedia Limited {mdm}


302 ZINC™ v2.5 Help Manual

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:

var myArray = myFTP.getFolderList();

// myArray[0][0] = Folder Name


// myArray[0][1] = Date & Time
// myArray[0][2] = Size
// myArray[0][3] = Attribs
// myArray[0][4] = Owner
// myArray[0][5] = Group

6.17.2.16 FTP.login()

Availability

Windows

Usage

ftpInstance.login(username:String, password:String):Void

Parameters

username:String Name of User

password:String Name of Password

Returns

Nothing

Description

Logs in using the specified username and password.

Notes

None

Example

myFTP.login("myUsername", "myPassword");

6.17.2.17 FTP.makeDir()

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 303

ftpInstance.makeDir(dir:String):Void

Parameters

dir:String Name of Directory to Create

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

To create a new directory called "MDM":

myFTP.makeDir("MDM");

To create 3 directories called "User1", "User2" and "User3":

myFTP.makeDir("User1|User2|User3");

6.17.2.18 FTP.moveFile()

Availability

Windows

Usage

ftpInstance.moveFile(filename:String, dir:String):Void

Parameters

filename:String Name of File(s) to Move

dir:String Name of Directory to Move File To

Returns

Nothing

Description

Moves the specified File to the specified Folder on the FTP Server.

Notes

To move multiple files, delimit filenames with a pipe charcter "|".

Example

To move the file "myFile.txt" to the Folder "Files":

myFTP.moveFile("myFile.txt", "Files");

To move the files "myFileA.txt" and "myFileB.txt" to the Folder "Files":

myFTP.moveFile("myFileA.txt|myFileB.txt", "Files");

©2006 Multidmedia Limited {mdm}


304 ZINC™ v2.5 Help Manual

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

currentFilename:String Current Name of File(s) to Rename

newFilename:String New name(s) to assign

Returns

Nothing

Description

Will rename the file specified in currentFilename to the value newFilename.

Notes

To rename multiple files, delimit filenames with a pipe charcter "|".

Example

To rename the file "myFile.txt":

myFTP.renameFile("myFile.txt", "myRenamedFile.txt");

To rename the files "a.txt", "b.txt" and "c.txt":

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 305

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

var resumed = myFTP.resumePosition();

6.17.2.22 FTP.sendCommand()

Availability

Windows

Usage

ftpInstance.sendCommand(command:String):String

Parameters

command:String Current Name of File to Rename

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

var Result = myFTP.sendCommand("EXEC");

©2006 Multidmedia Limited {mdm}


306 ZINC™ v2.5 Help Manual

6.17.2.23 FTP.sendFile()

Availability

Windows

Usage

ftpInstance.sendFile(localFile:String, remoteFile:String):Void

Parameters

localFile:String Local Path and Filename to Upload

remoteFile:String Name of File to Save To on the Remote Server

Returns

Nothing

Description

Will upload the file specified in localFile and save it to Remote Server with the name specified in remoteFile.

Notes

To upload multiple files, delimit filenames with a pipe charcter "|".

Example

To upload a single file:

myFTP.sendFile("C:\\myLocalFile.txt", "myRemoteFile.txt");

To upload multiple files:

myFTP.sendFile("C:\\A.txt|C:\\B.txt", "A.txt|B.txt");

6.17.2.24 FTP.setProxy()

Availability

Windows

Usage

ftpInstance.setProxy(proxyType:String, proxyServer:String, proxyPort:Number,


proxyUsername:String, proxyPassword:String):Void

Parameters

proxyType:String Name of Source File to transfer

proxyServer:String Name of File to Save To on the destination Server

proxyPort:Number ???

proxyUsername:String ???

proxyPassword:String ???

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 307

Description

Sets the type of FTP connection to use if the connection is behind a proxy server.

Notes

Valid values for proxyType are (case sensitive): "None","Host","HostUser","Open","Site","UserSite"

Example

myFTP.setProxy("None", "ftp.mydomain.com", "4000", "myUsername", "myPassword");

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;

©2006 Multidmedia Limited {mdm}


308 ZINC™ v2.5 Help Manual

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

var transferredBytes = myFTP.bytesTransferred;

6.17.3.4 FTP.currentDir

Availability

Windows

Usage

ftpInstance.currentDir:Void

Returns

Nothing

Description

Will get or set the current directory on FTP server.

Notes

None

Example

myFTP.currentDir = "images";

or

var currentDirectory = myFTP.currentDir;

6.17.3.5 FTP.error

Availability

Windows

Usage

ftpInstance.error:String

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 309

Returns

A string

Description

This command will return a string describing the last error occurred (If applicable).

Notes

The possible return values are (Case Sensitive):

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

var lastError = myFTP.error;

6.17.3.6 FTP.initialDir

Availability

Windows

Usage

ftpInstance.initialDir:Void

Returns

©2006 Multidmedia Limited {mdm}


310 ZINC™ v2.5 Help Manual

Nothing

Description

Sets the initial directory to change to, immediately after login.

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

var isBusy = myFTP.isBusy;

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

var isConnected = myFTP.isConnected;

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 311

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

var lastServerReply = myFTP.lastReply;

6.17.3.10 FTP.loggerData

Availability

Windows

Usage

ftpInstance.loggerData:String

Returns

A String

Description

Returns all text from the FTP logger (if available).

Notes

None

Example

var myLog = myFTP.loggerData;

6.17.3.11 FTP.NOOP

Availability

Windows

Usage

ftpInstance.NOOP:Void

Returns

Nothing

©2006 Multidmedia Limited {mdm}


312 ZINC™ v2.5 Help Manual

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

Set mode to "true" to enable passive mode or "false" to disable.

Notes

None

Example

myFTP.passive = true;

6.17.3.13 FTP.serverType

Availability

Windows

Usage

ftpInstance.serverType:Void

Returns

Nothing

Description

Sets the FTP Server Type.

Notes

The Server Type must be one of the following values (Case Sensitive):

AutoDetect
UNIX
ULTRIX
Clix
Chameleon
NCSA

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 313

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

Will return "true" if last command was successful or "false" otherwise.

Notes

None

Example

var success = myFTP.success;

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

©2006 Multidmedia Limited {mdm}


314 ZINC™ v2.5 Help Manual

Example

var suportsResume = myFTP.supportsResume();

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

Used to improve connectivity in very slow or busy servers.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 315

Returns

An Integer

Description

Will return the time elapsed since last transfer operation for the specified connection.

Notes

None

Example

var fileTransferTime = myFTP.transferTime();

6.17.4 Events
6.17.4.1 onAborted

Availability

Windows

Usage

ftpInstance.onAborted:Function

Parameters

None

Description

Executes when an FTP transfer is aborted.

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

Executes when an FTP connection is busy.

Notes

None

©2006 Multidmedia Limited {mdm}


316 ZINC™ v2.5 Help Manual

Example

myFTP.onBusy = function(){
mdm.Dialogs.Prompt("FTP connection busy");
}

6.17.4.3 onConnected

Availability

Windows

Usage

ftpInstance.onConnected:Function

Parameters

None

Description

Executes when an FTP Connection occurs successfully.

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

Executes when an FTP directory is changed.

Notes

None

Example

myFTP.onDirChanged = function(){
mdm.Dialogs.Prompt("Directory changed");
}

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 317

6.17.4.5 onDirCreated

Availability

Windows

Usage

ftpInstance.onDirCreated:Function

Parameters

None

Description

Executes when an FTP directory is created.

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

Executes when an FTP directory is deleted.

Notes

None

Example

myFTP.onDirDeleted = function(){
mdm.Dialogs.Prompt("Directory Deleted");
}

6.17.4.7 onError

Availability

Windows

Usage

ftpInstance.onError:Function

©2006 Multidmedia Limited {mdm}


318 ZINC™ v2.5 Help Manual

Parameters

None

Description

Executes when an FTP error occurs.

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

Executes when an FTP file is deleted.

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

Executes when an FTP file is received.

Notes

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 319

Example

myFTP.onFileReceived = function(){
mdm.Dialogs.Prompt("File received");
}

6.17.4.10 onFileRenamed

Availability

Windows

Usage

ftpInstance.onFileRenamed:Function

Parameters

None

Description

Executes when an FTP file is renamed.

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

Executes when an FTP file is sent.

Notes

None

Example

myFTP.onFileSent = function(){
mdm.Dialogs.Prompt("File sent");
}

©2006 Multidmedia Limited {mdm}


320 ZINC™ v2.5 Help Manual

6.17.4.12 onFileTransferred

Availability

Windows

Usage

ftpInstance.onFileTransferred:Function

Parameters

None

Description

Executes when an FTP file is transferred between 2 FTP Servers.

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

Executes when an FTP Index File is received.

Notes

None

Example

myFTP.onIndexFileReceived = function(){
mdm.Dialogs.Prompt("Index File Received");
}

6.17.4.14 onListingDone

Availability

Windows

Usage

ftpInstance.onListingDone:Function

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 321

Parameters

None

Description

Executes when an FTP Listing Procedure completes.

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

Executes when an FTP Log In occurs successfully.

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()

©2006 Multidmedia Limited {mdm}


322 ZINC™ v2.5 Help Manual

Example

myFTP.onQuit = function(){
mdm.Dialogs.Prompt("Quit from server");
}

6.17.4.17 onReady

Availability

Windows

Usage

ftpInstance.onReady:Function

Parameters

None

Description

Executes when an FTP connection is ready.

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

Executes when an FTP Resolved Link action occurs.

Notes

None

Example

myFTP.onResolvedLinks = function(){
mdm.Dialogs.Prompt("Resolved link action");
}

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 323

6.18 mdm.HTTP

Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.HTTP

Constructor Summary for the HTTP Class

The following table lists constructors for the HTTP class

Constructor Description
Will create a new HTTP Instance using the specified
mdm.HTTP()
parameters.

Method Summary for the HTTP Class

The following table lists methods of the HTTP class

Method Description
HTTP.abort() Aborts the HTTP transfer.
HTTP.close() Closes the HTTP connection.

HTTP.getFile() Silently downloads any HTTP file in binary mode.

HTTP.getString() Silently downloads a text document in text mode.

Event Summary for the HTTP Class

The following table lists events of the HTTP class

Event Description
onBinaryTransferComplete Executes when http transfer completes.
onError Executes when a HTTP Error occurs.

onProgress Executes when a http transfer is in progress.

onTransferComplete Executes when http transfer in text mode completes.

6.18.1 Constructor
6.18.1.1 mdm.HTTP()

Availability

Windows, Mac OSX

Constructor

mdm.HTTP():Void

Parameters

None

©2006 Multidmedia Limited {mdm}


324 ZINC™ v2.5 Help Manual

Returns

Nothing

Description

Will create a new HTTP Instance. Multiple Instances can be created on Windows only.

Notes

Mac OSX only supports a single instance.

Example

Create a new Instance called myHTTP :

myHTTP = new mdm.HTTP()

6.18.2 Methods
6.18.2.1 HTTP.abort()

Availability

Windows, Mac OSX

Usage

httpInstance.abort():Void

Parameters

None

Returns

Nothing

Description

Aborts the HTTP transfer.

Notes

None

Example

myHTTP.abort();

6.18.2.2 HTTP.close()

Availability

Windows, Mac OSX

Usage

httpInstance.close():Void

Parameters

None

Returns

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 325

Nothing

Description

Closes the HTTP connection.

Notes

None

Example

myHTTP.close();

6.18.2.3 HTTP.getFile()

Availability

Windows, Mac OSX

Usage

httpInstance.getFile(url:String, username:String, password:String,


localFilePath:String):Void

Parameters

url:String Server path to remote file.

username:String Empty string ("") or username if required on server.

password:String Empty string ("") or password if required on server.

localFilePath:String Path to local file to be created.

Returns

Nothing

Description

Silently downloads any HTTP file in binary mode with the specified parameters.

Notes

None

Example

myHTTP.getFile("http://www.mydomain.com/myFile.zip", "", "", "c:\\myFile.zip");

6.18.2.4 HTTP.getString()

Availability

Windows, Mac OSX

Usage

httpInstance.getString(url:String, username:String, password:String):String

Parameters

url:String Server path to remote file.

username:String Empty string ("") or username if required on server.

©2006 Multidmedia Limited {mdm}


326 ZINC™ v2.5 Help Manual

password:String Empty string ("") or password if required on server.

Returns

Nothing

Description

Silently downloads a text document in text mode using the specified parameters.

Notes

Downloaded data can be retrieved by using the onTransferComplete event

Example

myHTTP.getString("http://www.mydomain.com/myFile.txt", "", "");

6.18.3 Events
6.18.3.1 onBinaryTransferComplete

Availability

Windows, Mac OSX

Usage

httpInstance.onBinaryTransferComplete:Function

Parameters

filename:String Path of downloaded file.

Description

Executes when HTTP transfer completes.

Notes

None

Example

myHTTP.onBinaryTransferComplete = function(myObject){
mdm.Dialogs.Prompt(myObject.filename);
}

6.18.3.2 onError

Availability

Windows, Mac OSX

Usage

httpInstance.onError:Function

Parameters

None

Description

Executes when a HTTP Error occurs.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 327

Notes

None

Example

myHTTP.onError = function(){
mdm.Dialogs.Prompt("A HTTP Error has Occurred");
}

6.18.3.3 onProgress

Availability

Windows, Mac OSX

Usage

httpInstance.onProgress:Function

Parameters

bytesTotal:Number Total bytes of the file to download.

bytesTransferred:Number Bytes currently loaded.

Description

Executes when a http transfer is in progress.

Notes

None

Example

myHTTP.onProgress = function(myObject){
mdm.Forms.thisForm.title = "Progress: " + myObject.bytesTransferred + "of" +
myObject.bytesTotal;
}

6.18.3.4 onTransferComplete

Availability

Windows, Mac OSX

Usage

httpInstance.onTransferComplete:Function

Parameters

data:String Downloaded text data.

Description

Executes when HTTP transfer in text mode completes.

Notes

None

Example

myHTTP.onTransferComplete = function(myObject){
mdm.Dialogs.Prompt("Downloaded data = "+myObject.data);

©2006 Multidmedia Limited {mdm}


328 ZINC™ v2.5 Help Manual

6.19 mdm.Image

Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Image

Object Summary for the Image Class

The following table lists Object of the Image class

Object Description
ScreenCapture ScreenCapture Object

Method Summary for the Image Class

The following table lists methods of the Image class

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.

Image.bmpToPng() Converts a BMP image to a PNG image with transparency.

Image.getJpgSize() Returns the size of the JPG image file to an array.

Image.getSwfHeader() Returns the header information of a SWF movie.

Image.jpgToBmp() Converts a JPG image to a BMP image of the same name.

Image.jpgToSwf() Converts a JPG image to a SWF file of the same name.


Converts a sequence of JPG images to a single SWF
Image.jpgToSwfSlideShow()
slideshow.
Image.pngToSwf() Converts a PNG image to a SWF file of the same name.
Converts a PNG image to a SWF file of the same name
Image.pngToSwfTransparent()
with Transparency.
Resize's the JPG image and saves the output file to a
Image.setJpgSize()
BMP.

6.19.1 Objects
6.19.1.1 Image.ScreenCapture
Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Image.ScreenCapture

Method Summary for the ScreenCapture Class

The following table lists methods of the ScreenCapture class

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 329

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.

Image.ScreenCapture.toJpg() Saves a JPG snapshot of the defined DESKTOP area.

Image.ScreenCapture.movieAreaToBmp() Saves a BMP snapshot of the defined PROJECTOR area.


Image.ScreenCapture.movieAreaToBmpAlt Saves a BMP snapshot of the defined PROJECTOR area.
() Alt.
Saves a BMP snapshot of just the PROJECTOR SWF
Image.ScreenCapture.movieToBmp()
area.
Image.ScreenCapture.movieToBmpAlt() Saves a BMP snapshot of just the PROJECTOR SWF
area. Alt

6.19.1.1.1 Image.ScreenCapture.toBmp()

Availability

Windows

Usage

mdm.Image.ScreenCapture.toBmp(x:Number, y:Number, width:Number, height:Number,


filePath:Number):Void

Parameters

x:Number X coordinate of area to be captured.

y:Number Y coordinate of area to be captured.

width:Number Width of area to be captured in Pixels.

height:Number Height of area to be captured in Pixels.

filePath:String Location of BMP file to be created.

Returns

Nothing

Description

Saves a BMP snapshot of the defined DESKTOP area.

Notes

If alpha blending has been enabled, this command will not capture the actual Projector. Please use
mdm.Image.ScreenCapture.toBmpAlt instead.

Example

mdm.Image.ScreenCapture.toBmp(0, 0, 200, 200, "c:\\myScreenshot.bmp");


6.19.1.1.2 Image.ScreenCapture.toBmpAlt()

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


330 ZINC™ v2.5 Help Manual

mdm.Image.ScreenCapture.toBmpAlt(x:Number, y:Number, width:Number, height:Number,


filePath:Number):Void

Parameters

x:Number X coordinate of area to be captured.

y:Number Y coordinate of area to be captured.

width:Number Width of area to be captured in Pixels.

height:Number Height of area to be captured in Pixels.

filePath:String Location of BMP file to be created.

Returns

Nothing

Description

Saves a BMP snapshot of the defined DESKTOP area.

Notes

This command will not capture Transparent and Skinned Windows.

Example

mdm.Image.ScreenCapture.toBmpAlt(0, 0, 200, 200, "c:\\myScreenshot.bmp");


6.19.1.1.3 Image.ScreenCapture.toJpg()

Availability

Mac OSX

Usage

mdm.Image.ScreenCapture.toJpg(x:Number, y:Number, width:Number, height:Number,


filePath:Number):Void

Parameters

x:Number X coordinate of area to be captured.

y:Number Y coordinate of area to be captured.

width:Number Width of area to be captured in Pixels

height:Number Height of area to be captured in Pixels

filePath:String Location of JPG file to be created.

Returns

Nothing

Description

Saves a JPG snapshot of the defined DESKTOP area.

Notes

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 331

Example

mdm.Image.ScreenCapture.toJpg(0, 0, 200, 200, "myScreenshot.jpg");


6.19.1.1.4 Image.ScreenCapture.movieAreaToBmp()

Availability

Windows

Usage

mdm.Image.ScreenCapture.movieAreaToBmp(x:Number, y:Number, width:Number,


height:Number, filePath:Number):Void

Parameters

x:Number X coordinate of projector area to be captured.

y:Number Y coordinate of projector area to be captured..

width:Number Width of projector area to be captured in Pixels.

height:Number Height of area to be captured in Pixels.

filePath:String Location of BMP file to be created.

Returns

Nothing

Description

Saves a BMP snapshot of the defined PROJECTOR area.

Notes

If alpha blending has been enabled, this command will not capture the actual Projector. Please use
mdm.Image.ScreenCapture.movieAreaToBmpAlt instead

Example

mdm.Image.ScreenCapture.movieAreaToBmp(0, 0, 200, 200,


"c:\\myMovieScreenshot.bmp");
6.19.1.1.5 Image.ScreenCapture.movieAreaToBmpAlt()

Availability

Windows

Usage

mdm.Image.ScreenCapture.movieAreaToBmpAlt(x:Number, y:Number, width:Number,


height:Number, filePath:Number):Void

Parameters

x:Number X coordinate of projector area to be captured.

y:Number Y coordinate of projector area to be captured..

width:Number Width of projector area to be captured in Pixels.

height:Number Height of area to be captured in Pixels.

©2006 Multidmedia Limited {mdm}


332 ZINC™ v2.5 Help Manual

filePath:String Location of BMP file to be created.

Returns

Nothing

Description

Saves a BMP snapshot of the defined PROJECTOR area.

Notes

This command will not capture Transparent and Skinned Windows.

Example

mdm.Image.ScreenCapture.movieAreaToBmpAlt(0, 0, 200, 200,


"c:\\myMovieScreenshot.bmp");
6.19.1.1.6 Image.ScreenCapture.movieToBmp()

Availability

Windows

Usage

mdm.Image.ScreenCapture.movieToBmp(filePath:String):Void

Parameters

filePath:String Location of bitmap file to be created.

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

filePath:String Location of bitmap file to be created.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 333

Description

Takes a snapshot of just the PROJECTOR SWF window and saves it to a BMP.

Notes

This command will not capture Transparent and Skinned Windows.

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

inputFilePath:String Location of BMP file to be converted.

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

Windows, Mac OSX

Usage

mdm.Image.bmpToJpgAdv(inputFilePath:String, compressionQuality:Number):Void

Parameters

inputFilePath:String Location of BMP file to be converted.

compressionQuality:Number Quality of saved Image.

Returns

Nothing

Description

©2006 Multidmedia Limited {mdm}


334 ZINC™ v2.5 Help Manual

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

inputBmpFilePath:String Location of BMP file to be converted.

outputPngFilePath:String Location of png file to be created.

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

mdm.Image.bmpToPng("c:\\myScreenshot.bmp", "c:\\myScreenshot.png", false, "white");

6.19.2.4 Image.getJpgSize()

Availability

Windows

Usage

mdm.Image.getJpgSize(filePath:String):Array

Parameters

filePath:String Location of JPG file.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 335

Returns

An Array

Description

Returns the dimensions of the JPG image file to an Array

Notes

None

Example

var imageSize = mdm.Image.getJpgSize("c:\\myScreenshot.jpg");

//imageSize[0] = Width
//imageSize[1] = Height

6.19.2.5 Image.getSwfHeader()

Availability

Windows

Usage

mdm.Image.getSwfHeader(filePath:String):Array

Parameters

filePath:String Location of SWF file.

Returns

An Array

Description

Returns the header information of the SWF movie.

Notes

None

Example

var swfInfo = mdm.Image.getSwfHeader("c:\\myMovie.swf");

//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

©2006 Multidmedia Limited {mdm}


336 ZINC™ v2.5 Help Manual

inputJpgFilePath:String Location of JPG file to be converted.

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

inputJpgFilePath:String Location of JPG file to be converted.

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

frameRate:Number Frame rate of target movie.

inputJpgFiles:String Locations of JPG files to be converted.

frameGap:String Set of frame to insert in each slide.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 337

outputFilePath:String Location of SWF file to be created.

width:Number Width of .swf file to be created.

height:Number Height of .swf file to be created.

Returns

Nothing

Description

Converts a sequence of JPG images to a single SWF slideshow.

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

mdm.Image.jpgToSwfSlideShow(12, "c:\\myImage1.jpg|c:\\myImage2", "1|1",


"c:\\mySlideshow.swf", 480, 360);

6.19.2.9 Image.pngToSwf()

Availability

Windows

Usage

mdm.Image.pngToSwf(inputPngFilePath:String):Void

Parameters

inputPngFilePath:String Location of PNG file to be converted.

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

inputPngFilePath:String Location of PNG file to be converted.

©2006 Multidmedia Limited {mdm}


338 ZINC™ v2.5 Help Manual

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

The PNG file must be 256 colors (8bit) only.

Example

mdm.Image.pngToSwfTransparent("c:\\myImage.png");

6.19.2.11 Image.setJpgSize()

Availability

Windows, Mac OSX

Usage

mdm.Image.setJpgSize(inputFilePath:String, width:Number, height:Number,


outputFilePath:String, antialiasingRation:Number):Void

Parameters

inputFilePath:String Location of JPG file.

width:Number New out file width in pixels.

height:Number New out file height in pixels.

outputFilePath:String Location of BMP file to be created.

antialiasingRatio:Number Ratio of antialiasing to be applied.

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

mdm.Image.setJpgSize("c:\\myImage.jpg", 200, 300, "c:\\myNewImage.bmp", 2);

6.20 mdm.Input

Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Input

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 339

Object Summary for the Input Class

The following table lists objects of the Input class

Method Description
Joystick Joystick Object
Mouse Mouse Object

Tablet Tablet Object

Twain Twain Object

6.20.1 Objects
6.20.1.1 Input.Joystick
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Input.Joystick

Method Summary for the Input.Joystick Class

The following table lists methods of the Input.Joystick class

Method Description
Enables Joystick control in the form which calls the
Input.Joystick.enable()
command.
Input.Joystick.disable() Disables Joystick input.

Input.Joystick.setKey() Will assign a Joystick Button to a Keyboard Key.

Event Summary for the Input.Joystick Class

The following table lists events of the Input.Joystick class

Event Description
onJoystick1ButtonDown Executes when Joystick 1 button is pressed.
onJoystick1Move Executes when Joystick 1 is moved.

onJoystick2ButtonDown Executes when Joystick 2 button is pressed.


onJoystick2Move Executes when Joystick 2 is moved.

6.20.1.1.1 Methods

6.20.1.1.1.1 Input.Joystick.enable()

Availability

Windows

©2006 Multidmedia Limited {mdm}


340 ZINC™ v2.5 Help Manual

Usage

mdm.Input.Joystick.enable(joystickID:Number, joystickEmulationType:String):Void

Parameters

joystickID:Number Joystick Identifier.

joystickEmulationType:String Emulation Type.

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:

Fire Button 1 - simulates LEFT mouse click

Fire Button 2 - simulates SPACE key pressed

Fire Button 3 - simulates 'a' key pressed

Fire Button 4 - simulates 's' key pressed

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:

mdm_joystick1_xlevel (Contains the current X level of Joystick 1 from -100 to 100)


mdm_joystick1_ylevel (Contains the current Y level of Joystick 1 from -100 to 100)
mdm_joystick2_xlevel (Contains the current X level of Joystick 2 from -100 to 100)
mdm_joystick2_ylevel (Contains the current Y level of Joystick 2 from -100 to 100)

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

joystickID:Number Joystick Identifier.

Returns

Nothing

Description

Disables Joystick input. The parameter joystickID is either "1" or "2" for the corresponding Joystick.

Notes

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 341

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

joystickID:Number Joystick Identifier.

joystickButtonID:Number Joystick Button Identifier.

keyboardKeyCode:String String reference to keyboard Key Code.

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

©2006 Multidmedia Limited {mdm}


342 ZINC™ v2.5 Help Manual

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.

b1:String Current state of Button 1.

b2:String Current state of Button 2.

b3:String Current state of Button 3.

b4:String Current state of Button 4.

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:

function onJoystick1ButtonDown(xlevel, ylevel, b1, b2, b3, b4){


mdm.Dialogs.prompt(xlevel)
mdm.Dialogs.prompt(ylevel)
mdm.Dialogs.prompt(b1)
// ... and so on
}

Advanced Usage:

mdm.Input.Joystick.onJoystick1ButtonDown = function(myObject){
mdm.Dialogs.prompt(myObject.xlevel)
mdm.Dialogs.prompt(myObject.ylevel)

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 343

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.

b1:String Current state of Button 1.

b2:String Current state of Button 2.

b3:String Current state of Button 3.

b4:String Current state of Button 4.

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:

function onJoystick1Move(xlevel, ylevel, b1, b2, b3, b4){


mdm.Dialogs.prompt(xlevel)
mdm.Dialogs.prompt(ylevel)
mdm.Dialogs.prompt(b1)
// ... and so on
}

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

©2006 Multidmedia Limited {mdm}


344 ZINC™ v2.5 Help Manual

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.

b1:String Current state of Button 1.

b2:String Current state of Button 2.

b3:String Current state of Button 3.

b4:String Current state of Button 4.

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:

function onJoystick2ButtonDown(xlevel, ylevel, b1, b2, b3, b4){


mdm.Dialogs.prompt(xlevel)
mdm.Dialogs.prompt(ylevel)
mdm.Dialogs.prompt(b1)
// ... and so on
}

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

x:Number X level of Joystick 2 from -100 to 100.

y:Number Y level of Joystick 2 from -100 to 100.

b1:String Current state of Button 1.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 345

b2:String Current state of Button 2.

b3:String Current state of Button 3.

b4:String Current state of Button 4.

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:

function onJoystick2Move(xlevel, ylevel, b1, b2, b3, b4){


mdm.Dialogs.prompt(xlevel)
mdm.Dialogs.prompt(ylevel)
mdm.Dialogs.prompt(b1)
// ... and so on
}

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

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Input.Mouse

Method Summary for the Input.Mouse Class

The following table lists methods of the Input.Mouse class

Method Description
Input.Mouse.getPosition() Gets the Mouse Cursor position in pixels.
Input.Mouse.generateEvent() Simulate a Mouse Event.

Input.Mouse.setCursor() Sets the Mouse Cursor Type to the variable cursorType.

Input.Mouse.setPosition() Sets the Mouse position on screen.

Input.Mouse.show() Shows the Mouse Cursor.

Input.Mouse.hide() Hides the Mouse Cursor.

©2006 Multidmedia Limited {mdm}


346 ZINC™ v2.5 Help Manual

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

Gets the Mouse Cursor Screen Position in pixels.

Notes

None

Example

var myMousePosition = mdm.Input.Mouse.getPosition();

// myMousePosition[0] = x Position
// myMousePosition[1] = y Position
6.20.1.2.1.2 Input.Mouse.generateEvent()

Availability

Windows

Usage

mdm.Input.Mouse.generateEvent(event:String, x:Number, y:Number,


restorePosition:Boolean):Void

Parameters

event:String Mouse Event to Generate.

x:Number Mouse X position in pixels.

y:Number Mouse Y position in pixels.

restorePosition:Boolean Restore Original Mouse Position after Event.

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.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 347

Notes

Possible values for event are:

LC for left click

MC for middle click

RC for right click

LDC for left mouse button double click

Example

mdm.Input.Mouse.generateEvent("RC", 100, 100, true);


6.20.1.2.1.3 Input.Mouse.setCursor()

Availability

Windows

Usage

mdm.Input.Mouse.setCursor(cursorType:String):Void

Parameters

cursorType:String Mouse cursor to be set as one of possible constant value.

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");

©2006 Multidmedia Limited {mdm}


348 ZINC™ v2.5 Help Manual

6.20.1.2.1.4 Input.Mouse.setPosition()

Availability

Windows

Usage

mdm.Input.Mouse.setPosition(x:Number, y:Number):Void

Parameters

x:Number Mouse X position in pixels.

y:Number Mouse Y position in pixels.

Returns

Nothing

Description

Sets the Mouse Cursor Screen Position.

Notes

None

Example

mdm.Input.Mouse.setPosition(100, 100);
6.20.1.2.1.5 Input.Mouse.show()

Availability

Windows, Mac OSX

Usage

mdm.Input.Mouse.show(formName:String):Void

Parameters

formName:String Name of Form to Target

Returns

Nothing

Description

Shows the Mouse Cursor.

Notes

None

Example

mdm.Input.Mouse.show("MainForm");
6.20.1.2.1.6 Input.Mouse.hide()

Availability

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 349

Windows, Mac OSX

Usage

mdm.Input.Mouse.hide(formName:String):Void

Parameters

formName:String Name of Form to Target

Returns

Nothing

Description

Hides the Mouse Cursor.

Notes

None

Example

mdm.Input.Mouse.hide("MainForm");

6.20.1.3 Input.Tablet
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Input.Tablet

Method Summary for the Input.Tablet Class

The following table lists methods of the Input.Tablet class

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 Summary for the Input.Tablet Class

The following table lists events of the Input.Tablet class

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

©2006 Multidmedia Limited {mdm}


350 ZINC™ v2.5 Help Manual

Parameters

None

Returns

Nothing

Description

Enables Tablet input in the form which executes the command.

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

Disables Tablet input in the form which executes the command.

Example

mdm.Input.Tablet.disable();
6.20.1.3.2 Events

Enter topic text here.

6.20.1.3.2.1 onTabletEvent

Availability

Windows

Usage

mdm.Input.onTabletEvent:Function

Parameters

x:Number X position of the Tablet Stylus.

y:Number Y position of the Tablet Stylus.

pressure:Number Pressure of the Stylus.

buttons:Number Returns the Button Code of the Buttons Pressed.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 351

Description

Executes when a Tablet Event Occurs.

Notes

None

Example

Simple Usage:

function onTabletEvent(x, y, pressure, buttons){


mdm.Dialogs.prompt(x)
mdm.Dialogs.prompt(y)
mdm.Dialogs.prompt(pressure)
// ... and so on
}

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

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Input.Twain

Method Summary for the Input.Twain Class

The following table lists methods of the Input.Twain class

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

outputFilePath:String Location of bmp file to be created.

Returns

©2006 Multidmedia Limited {mdm}


352 ZINC™ v2.5 Help Manual

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

Zinc 2.5 (Mac OSX)

ActionScript Class Name

mdm.MacShell

Method Summary for the MacShell Class

The following table lists methods of the MacShell class

Method Description
MacShell.close() Will close or Interupt the Shell Script.
MacShell.exec() Executes one line of Shell Script.

Property Summary for the MacShell Class

The following table lists properties of the MacShell class

Property Description
MacShell.exitCode Will return
MacShell.isRunning Checks to see if a Shell Script is running.

Will return the standard output (if applicable) of the Shell


MacShell.output
Script.

6.21.1 Methods
6.21.1.1 MacShell.close()

Availability

Mac OSX

Usage

mdm.MacShell.close():Void

Parameters

None

Returns

Nothing

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 353

Will close or interrupt the Shell Script.

Notes

None

Example

mdm.MacShell.close()

6.21.1.2 MacShell.exec()

Availability

Mac OSX

Usage

mdm.MacShell.exec(:String):Void

Parameters

:String Reference to a single line of Shell Script

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

mdm.MacShell.exec("chmod 777 myFile.txt")

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

©2006 Multidmedia Limited {mdm}


354 ZINC™ v2.5 Help Manual

Simple Usage:

Result = mdm.MacShell.exitCode;

Prompt result directly:

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;

Prompt result directly:

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:

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 355

Result = mdm.MacShell.output;

Prompt result directly:

mdm.Dialogs.prompt(mdm.MacShell.output);

6.22 mdm.MediaPlayer6

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.MediaPlayer6

Constructor Summary for the MediaPlayer6 Class

The following table lists constructors for the MediaPlayer6 class

Constructor Description
Inserts a Windows Media Player Instance using the
mdm.MediaPlayer6()
specified parameters.

Method Summary for the MediaPlayer6 Class

The following table lists methods of the MediaPlayer6 class

Method Description
MediaPlayer6.close() Closes the video file loaded in the specified instance.
MediaPlayer6.fastForward() Use to Fast Forward the video clip.

MediaPlayer6.fastReverse() Use to Fast Rewind the video clip.

MediaPlayer6.fullscreen() Switches the loaded Media File to Fullscreen.

MediaPlayer6.hide() Will hide the specified Windows Media Player Instance.

MediaPlayer6.mute() Mutes the Media Player.


Disables the Media Player context menu in the specified
MediaPlayer6.noMenu()
instance.
MediaPlayer6.pause() Use to Pause the video clip.

MediaPlayer6.play() Will play the file loaded in the specified instance.

MediaPlayer6.show() Will show the specified Windows Media Player instance.

MediaPlayer6.stop() Will stop the file loaded in the specified instance.

Property Summary for the MediaPlayer6 Class

The following table lists properties of the MediaPlayer6 class

Property Description
MediaPlayer6.balance Sets the balance of the specified Instance.

MediaPlayer6.canScan Checks the Media File for Scan Functionality.


MediaPlayer6.canSeek Checks the Media File for Seek Functionality.

MediaPlayer6.duration Returns the total length of the video file in the specified
instance.

©2006 Multidmedia Limited {mdm}


356 ZINC™ v2.5 Help Manual

MediaPlayer6.height Video Instance X Height.

MediaPlayer6.isInstalled Existence of Windows Media Player 6 on the users system.

MediaPlayer6.position Current position of the video file in the specified instance

MediaPlayer6.volume Video Instance Volume.

MediaPlayer6.visible Video Instance visibility.

MediaPlayer6.width Video Instance Width.

MediaPlayer6.x Video Instance X Position.

MediaPlayer6.y Video Instance Y Position.

Event Summary for the MediaPlayer6 Class

The following table lists events of the MediaPlayer6 class

Event Description
onMPChangeState Executes when a video instance changes state.

6.22.1 Constructor
6.22.1.1 mdm.MediaPlayer6()

Availability

Windows

Constructor

mdm.MediaPlayer6(x:Number, y:Number, width:Number, height:Number, file:String):Void

Parameters

x:Number X position

y:Number Y Position

width:Number Width of Instance in Pixels

height:String Height if Instance in Pixels

file:String Initial Media File to load

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

Create a new Instance called myMP6 with absolute positioning:

myMP6 = new mdm.MediaPlayer6(0, 0, 400, 350, "myFile.avi")

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 357

Create a new Instance called myMP6 with relative positioning:

// t = top
// b = bottom
// l = left
// r = right
// c = center

myMP6 = new mdm.MediaPlayer6("c", "c", "50%", "50%", "myFile.avi")

6.22.2 Methods
6.22.2.1 MediaPlayer6.close()

Availability

Windows

Usage

mpInstance.close():Void

Parameters

None

Returns

Nothing

Description

Closes the video file loaded in the specified instance.

Notes

None

Example

myMP6.close();

6.22.2.2 MediaPlayer6.fastForward()

Availability

Windows

Usage

mpInstance.fastForward():Void

Parameters

None

Returns

Nothing

Description

Use to Fast Forward the video clip.

©2006 Multidmedia Limited {mdm}


358 ZINC™ v2.5 Help Manual

Notes

None

Example

myMP6.fastForward();

6.22.2.3 MediaPlayer6.fastReverse()

Availability

Windows

Usage

mpInstance.fastReverse():Void

Parameters

None

Returns

Nothing

Description

Use to Fast Rewind the video clip.

Notes

None

Example

myMP6.fastReverse();

6.22.2.4 MediaPlayer6.fullscreen()

Availability

Windows

Usage

mpInstance.fullscreen():Void

Parameters

None

Returns

Nothing

Description

Sets the view mode of the Media Player Instance to fullscreen

Notes

To return to window mode, right click on the fullscreen window and deselect the fullscreen option.

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 359

myMP6.fullscreen();

6.22.2.5 MediaPlayer6.hide()

Availability

Windows

Usage

mpInstance.hide():Void

Parameters

None

Returns

Nothing

Description

Will hide the specified Windows Media Player Instance.

Notes

None

Example

myMP6.hide();

6.22.2.6 MediaPlayer6.mute()

Availability

Windows

Usage

mpInstance.mute(muteFlag:Boolean):Void

Parameters

muteFlag:Boolean Boolean reference to Mute Flag

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

©2006 Multidmedia Limited {mdm}


360 ZINC™ v2.5 Help Manual

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

Use to Pause the video clip.

Notes

None

Example

myMP6.pause();

6.22.2.9 MediaPlayer6.play()

Availability

Windows

Usage

mpInstance.play():Void

Parameters

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 361

None

Returns

Nothing

Description

Will play the file loaded in the specified instance.

Notes

None

Example

myMP6.play();

6.22.2.10 MediaPlayer6.show()

Availability

Windows

Usage

mpInstance.show():Void

Parameters

None

Returns

Nothing

Description

Will show the specified Windows Media Player instance.

Notes

None

Example

myMP6.show();

6.22.2.11 MediaPlayer6.stop()

Availability

Windows

Usage

mpInstance.stop():Void

Parameters

None

Returns

Nothing

©2006 Multidmedia Limited {mdm}


362 ZINC™ v2.5 Help Manual

Description

Will stop playback of the loaded file.

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

To Get the Balance:

var currentBalance = myMP6.balance;

To Set the Balance:

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 363

Example

var canScan = myMP6.canScan;

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

var canSeek = myMP6.canSeek;

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

var videoLength = myMP6.duration;

6.22.3.5 MediaPlayer6.height

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


364 ZINC™ v2.5 Help Manual

mpInstance.height:Number

Returns

An Integer

Description

Height of player instance.

Notes

None

Example

To Get the Height:

var playerInstanceHeight = myMP6.height;

To Set the Height:

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

var isInstalled = myMP6.isInstalled;

6.22.3.7 MediaPlayer6.position

Availability

Windows

Usage

mpInstance.position:Number

Returns

An Integer

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 365

Current position of the video file.

Notes

None

Example

To Get the Position:

var currentPosition = myMP6.position;

To Set the Position:

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

To Get the Volume:

var currentVolume = myMP6.volume;

To Set the Volume:

myMP6.volume = 0;

6.22.3.9 MediaPlayer6.visible

Availability

Windows

Usage

mpInstance.visible:Boolean

Returns

An Boolean

Description

Instance visibility.

Notes

©2006 Multidmedia Limited {mdm}


366 ZINC™ v2.5 Help Manual

None

Example

To Get the Visibility:

var isVisible = myMP6.visible;

To Set the Visibility:

myMP6.visible = true;

6.22.3.10 MediaPlayer6.width

Availability

Windows

Usage

mpInstance.width:Number

Returns

An Integer

Description

The width of player instance.

Notes

None

Example

To Get the Width:

var playerInstanceWidth = myMP6.width;

To Set the Width:

myMP6.width = 200;

6.22.3.11 MediaPlayer6.x

Availability

Windows

Usage

mpInstance.x:Number

Returns

An Integer

Description

The current X position of player instance.

Notes

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 367

Example

To Get the X Position:

var currentX = myMP6.x;

To Set the X Position:

myMP6.x = 200;

6.22.3.12 MediaPlayer6.y

Availability

Windows

Usage

mpInstance.x:Number

Returns

An Integer

Description

The current Y position of player instance.

Notes

None

Example

To Get the Y Position:

var currentY = myMP6.y;

To Set the Y Position:

myMP6.y = 200;

6.22.4 Events
6.22.4.1 onMPChangeState

Availability

Windows

Usage

mpInstance.onMPChangeState:Function

Parameters

oldState:Number Previous state of player.

newState:Number Current state of player.

Description

Executes when a video instance changes state. The states returned are as follows:

0 = stopped
1 = paused

©2006 Multidmedia Limited {mdm}


368 ZINC™ v2.5 Help Manual

2 = playing

Notes

None

Example

myMP6.onMPChangeState = function(myObject){
mdm.Dialogs.prompt(myObject.newState);
}

6.23 mdm.MediaPlayer9

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.MediaPlayer9

Constructor Summary for the MediaPlayer9 Class

The following table lists constructors for the MediaPlayer9 class

Constructor Description
Inserts a Windows Media Player 9 Instance using the
mdm.MediaPlayer9()
specified parameters.

Method Summary for the MediaPlayer9 Class

The following table lists methods of the MediaPlayer9 class

Method Description
MediaPlayer9.close() Closes the video file loaded in the specified instance.
MediaPlayer9.fastForward() Use to Fast Forward the video clip.

MediaPlayer9.fastReverse() Use to Fast Rewind the video clip.


Checks the loaded Media File to see if specific WMP9
MediaPlayer9.featureAvailable()
Features are supported.
MediaPlayer9.hide() Will hide the specified Windows Media Player Instance.

MediaPlayer9.mute() Mutes the Media Player.

MediaPlayer9.pause() Use to Pause the video clip.

MediaPlayer9.play() Will play the file loaded in the specified instance.

MediaPlayer9.show() Will show the specified Windows Media Player instance.

MediaPlayer9.stop() Will stop the file loaded in the specified instance.

Property Summary for the MediaPlayer9 Class

The following table lists properties of the MediaPlayer9 class

Property Description
Sets the balance of the specified Instance to the value of
MediaPlayer9.balance
balance.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 369

MediaPlayer9.canScan Checks the Media File for Scan Functionality.


MediaPlayer9.canSeek Checks the Media File for Seek Functionality.

MediaPlayer9.currentMarker Sets the current marker in the specified Instance.

Returns the total length of the media file in the specified


MediaPlayer9.duration
instance.
MediaPlayer9.height Height of Player Instance.

MediaPlayer9.isInstalled Existence of Windows Media Player 9 on the users system.


Returns the number of markers inside the media file
MediaPlayer9.markerCount
specified.
MediaPlayer9.mediaName Loaded media name in the Windows Media Player Instance

MediaPlayer9.mediaHeight Returns the loaded Media Height.

MediaPlayer9.mediaWidth Returns the loaded Media Width.

MediaPlayer9.position Current position of the video file in the specified instance.

MediaPlayer9.source The Source URL of the loaded Media File.


Volume of the specified Instance to the value of vol. The
MediaPlayer9.volume
volume is a value from 0 to 100.
MediaPlayer9.visible Instance visibility.

MediaPlayer9.width Width of Player Instance.

MediaPlayer9.x X position of Player Instance.

MediaPlayer9.y Y position of Player Instance.

Event Summary for the MediaPlayer9 Class

The following table lists events of the MediaPlayer9 class

Event Description
onWMP9ChangeState Executes when a video instance changes state.
onWMP9Buffering Returns true or false based upon the buffering state.

onWMP9Error Executes when an error occurs.

onWMP9PositionChanged Executes when a video file Position changes.

6.23.1 Constructor
6.23.1.1 mdm.MediaPlayer9()

Availability

Windows

Constructor

mdm.MediaPlayer9(x:Number, y:Number, width:Number, height:Number, uiMode:String,


contextMenu:Boolean, stretch:Boolean, file:String):Void

Parameters

x:Number X position

y:Number Y Position

©2006 Multidmedia Limited {mdm}


370 ZINC™ v2.5 Help Manual

width:Number Width of Instance in Pixels

height:String Height if Instance in Pixels

uiMode:String Initial Media File to load

contextMenu:Boolean Show/Hide Context Menu

stretch:Boolean Stretch Media File to Instance Dimensions

file:String Initial Media File to load

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.

b) Valid values for uiMode are:

invisible - The Player is not Visible


none - The Player does not show a Control Bar
mini - The Player shows a Mini Control Bar
full - The Player shows a Full Control Bar

Example

Create a new Instance called myMP9 with absolute positioning:

myMP9 = new mdm.MediaPlayer9(0, 0, 400, 350, "none", false, true, "myFile.avi")

Create a new Instance called myMP9 with relative positioning:

// t = top
// b = bottom
// l = left
// r = right
// c = center

myMP9 = new mdm.MediaPlayer9("c", "c", "50%", "50%", "none", false, true,


"myFile.avi")

6.23.2 Methods
6.23.2.1 MediaPlayer9.close()

Availability

Windows

Usage

mpInstance.close():Void

Parameters

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 371

Returns

Nothing

Description

Closes the video file loaded.

Notes

None

Example

myMP9.close();

6.23.2.2 MediaPlayer9.fastForward()

Availability

Windows

Usage

mpInstance.fastForward():Void

Parameters

None

Returns

Nothing

Description

Use to Fast Forward the video clip.

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

©2006 Multidmedia Limited {mdm}


372 ZINC™ v2.5 Help Manual

Use to Fast Rewind the video clip.

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

feature:String Reference to Feature Item

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

var featureResult = myMP9.featureAvailable();

6.23.2.5 MediaPlayer9.hide()

Availability

Windows

Usage

mpInstance.hide():Void

Parameters

None

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 373

Description

Will hide the specified Windows Media Player Instance.

Notes

None

Example

myMP9.hide();

6.23.2.6 MediaPlayer9.mute()

Availability

Windows

Usage

mpInstance.mute(muteFlag:Boolean):Void

Parameters

muteFlag:Boolean Boolean reference to Mute Flag

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

Use to Pause the video clip.

Notes

©2006 Multidmedia Limited {mdm}


374 ZINC™ v2.5 Help Manual

None

Example

myMP9.pause();

6.23.2.8 MediaPlayer9.play()

Availability

Windows

Usage

mpInstance.play():Void

Parameters

None

Returns

Nothing

Description

Will play the file loaded in the specified instance.

Notes

None

Example

myMP9.play();

6.23.2.9 MediaPlayer9.show()

Availability

Windows

Usage

mpInstance.show():Void

Parameters

None

Returns

Nothing

Description

Will show the specified Windows Media Player instance.

Notes

None

Example

myMP9.show();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 375

6.23.2.10 MediaPlayer9.stop()

Availability

Windows

Usage

mpInstance.stop():Void

Parameters

None

Returns

Nothing

Description

Will stop the playback of the loaded file.

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

To Get the Balance:

var currentBalance = myMP9.balance;

To Set the Balance:

myMP9.balance = 0;

©2006 Multidmedia Limited {mdm}


376 ZINC™ v2.5 Help Manual

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

var canScan = myMP9.canScan;

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

var canSeek = myMP9.canSeek;

6.23.3.4 MediaPlayer9.currentMarker

Availability

Windows

Usage

mpInstance.currentMarker:Number

Returns

An Integer

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 377

Description

Sets the currentmarker in the specified player instance.

Notes

a) To make sure that the marker is available, use mdm.MediaPlayer9.markerCount

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

Returns the Total Length of the media file loaded.

Notes

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

var duration = myMP9.duration;

6.23.3.6 MediaPlayer9.height

Availability

Windows

Usage

mpInstance.height:Number

Returns

An Integer

Description

The Height of the Player Instance.

Notes

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

To Get the Height:

©2006 Multidmedia Limited {mdm}


378 ZINC™ v2.5 Help Manual

var playerInstanceHeight = myMP9.height;

To Set the Height:

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

var isInstalled = myMP9.isInstalled;

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

a) To make sure that the marker is available, use mdm.MediaPlayer9.markerCount

b) Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

var markerCounter = myMP9.markerCount;

6.23.3.9 MediaPlayer9.mediaName

Availability

Windows

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 379

Usage

mpInstance.mediaName:String

Returns

A String

Description

Loaded media name 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

var loadedVideoName = myMP9.mediaName;

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

var videoHeight = myMP9.mediaHeight;

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

©2006 Multidmedia Limited {mdm}


380 ZINC™ v2.5 Help Manual

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

var videoWidth = myMP9.mediaWidth;

6.23.3.12 MediaPlayer9.position

Availability

Windows

Usage

mpInstance.position:Number

Returns

An Integer

Description

Current position of the video file in the specified instance.

Notes

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

To Get the Position:

var currentPosition = myMP9.position;

To Set the Position:

myMP9.position = 10;

6.23.3.13 MediaPlayer9.source

Availability

Windows

Usage

mpInstance.source:Number

Returns

An Integer

Description

The Source URL of the loaded Media File.

Notes

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

To Get the Source:

var sourceURL = myMP9.source;

To Set the Source:

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 381

myMP9.source = "http://www.mydoamin.com/myFile.wmv";

6.23.3.14 MediaPlayer9.volume

Availability

Windows

Usage

mpInstance.volume:Number

Returns

An Integer

Description

Volume of the specified instance. The volume is a value from 0 to 100.

Notes

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

To Get the Volume:

var currentVolume = myMP9.volume;

To Set the Volume:

myMP9.volume = 0;

6.23.3.15 MediaPlayer9.visible

Availability

Windows

Usage

mpInstance.visible:Boolean

Returns

A Boolean

Description

Media Player Instance visibility.

Notes

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

To Get the Visibility:

var isVisible = myMP9.visibe;

To Set the Visibility:

myMP9.visible = true;

©2006 Multidmedia Limited {mdm}


382 ZINC™ v2.5 Help Manual

6.23.3.16 MediaPlayer9.width

Availability

Windows

Usage

mpInstance.width:Number

Returns

An Integer

Description

The width of the Player Instance.

Notes

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

To Get the Width:

var playerInstanceWidth = myMP9.width;

To Set the Width:

myMP9.width = 200;

6.23.3.17 MediaPlayer9.x

Availability

Windows

Usage

mpInstance.x:Number

Returns

An Integer

Description

The current X position of player instance .

Notes

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

To Get the X Position:

var currentX = myMP9.x;

To Set the X Position:

myMP9.x = 200;

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 383

6.23.3.18 MediaPlayer9.y

Availability

Windows

Usage

mpInstance.y:Number

Returns

An Integer

Description

The current Y position of player instance .

Notes

Windows Media Player 9 must be installed on the users system for this command to function correctly.

Example

To Get the Y Position:

var currentY = myMP9.y;

To Set the Y Position:

myMP9.y = 200;

6.23.4 Events
6.23.4.1 onWMP9Buffering

Availability

Windows

Usage

mpInstance.onWMP9Buffering:Function

Parameters

status:Boolean Current buffering state.

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);
}

©2006 Multidmedia Limited {mdm}


384 ZINC™ v2.5 Help Manual

6.23.4.2 onWMP9ChangeState

Availability

Windows

Usage

mpInstance.onWMP9ChangeState:Function

Parameters

newState:Number Current state of player.

Description

Executes when a video instance changes state. The states returned are as follows:

0 = Undefined Windows Media Player is in an undefined state.


1 = Stopped Playback of the current media item is stopped.
2 = Paused Playback of the current media item is paused. When a media item is paused, resuming playback begins from the
same location.
3 = Playing The current media item is playing.
4 = ScanForward The current media item is fast forwarding.
5 = ScanReverse The current media item is fast rewinding.
6 = Buffering The current media item is getting additional data from the server.
7 = Waiting Connection is established, but the server is not sending data. Waiting for session to begin.
8 = MediaEnded Media item has completed playback.
9 = Preparing new media item.
10 = Ready to begin playing.
11 = Reconnecting to stream.

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

error:String Error message.

Description

Executes when an error occurs.

Notes

None

Example

myMP9.onWMP9Error = function(myObject){

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 385

mdm.Dialogs.prompt(myObject.error);
}

6.23.4.4 onWMP9PositionChanged

Availability

Windows

Usage

mpInstance.onWMP9PositionChanged:Function

Parameters

newPosition:Number Current position of loaded media.

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

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Application.Menu

Object Summary for the Menu Class

The following table lists Objects of the Menu class

Object Description
Context Context Menu Object
Main Main Menu Object

Tray Tray Menu Object

6.24.1 Objects
6.24.1.1 Menu.Context
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Menu.Context

Method Summary for the Context Class

©2006 Multidmedia Limited {mdm}


386 ZINC™ v2.5 Help Manual

The following table lists methods of the Menu.Context class

Method Description
Menu.Context.disable() Disables the RIGHT click menu
Menu.Context.enable() Enables the RIGHT click menu

Menu.Context.insertDivider() Inserts a menu divider in the Right Click Context menu.

Menu.Context.insertItem() Inserts a RIGHT Click Menu Item.

Menu.Context.itemChecked() Checks or unchecks a Context Menu Item.

Menu.Context.itemEnabled() Enables or Disables a Context Menu Item.

Menu.Context.itemVisible() Shows or Hides a Context Menu Item.


Menu.Context.removeItem() Removes a Context Menu Item.

Property Summary for the Context Class

The following table lists properties of the Menu.Context class

Property Description
Menu.Context.menuType Sets the method to use with custom File Menus.

Event Summary for the Context Class

The following table lists events of the Menu.Context class

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

Disables the Context Menu.

Notes

a) Menu Items are not supported in Transparent Projectors.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 387

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

Enables the Context Menu.

Notes

a) Menu Items are not supported in Transparent Projectors.

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

Inserts a Menu Divider in the Context Menu.

Notes

a) Menu Items are not supported in Transparent Projectors.

©2006 Multidmedia Limited {mdm}


388 ZINC™ v2.5 Help Manual

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

itemLabel:String Item label.

Returns

Nothing

Description

Inserts a Context Menu Item.

Notes

a) Please be sure to specify handler method for menu items.

b) Menu Items are not supported in Transparent Projectors.

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

itemLabel:String Item label.

checked:Boolean Boolean flag.

Returns

Nothing

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 389

Checks or unchecks a Context Menu Item.

Notes

a) Please be sure to specify handler method for menu items.

b) Menu Items are not supported in Transparent Projectors.

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

mdm.Menu.Context.itemChecked("Hello World", true);


6.24.1.1.1.6 Menu.Context.itemEnabled()

Availability

Windows

Usage

mdm.Menu.Context.itemEnabled(itemLabel:String, checked:Boolean):Void

Parameters

itemLabel:String Item label.

checked:Boolean Boolean flag.

Returns

Nothing

Description

Enables or Disables a Context Menu Item.

Notes

a) Please be sure to specify handler method for menu items.

b) Menu Items are not supported in Transparent Projectors.

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

mdm.Menu.Context.itemEnabled("Hello World", true);


6.24.1.1.1.7 Menu.Context.itemVisible()

Availability

Windows

Usage

mdm.Menu.Context.itemVisible(itemLabel:String, checked:Boolean):Void

Parameters

itemLabel:String Item label.

©2006 Multidmedia Limited {mdm}


390 ZINC™ v2.5 Help Manual

checked:Boolean Boolean flag.

Returns

Nothing

Description

Hides or Shows a Context Menu Item.

Notes

a) Please be sure to specify handler method for menu items.

b) Menu Items are not supported in Transparent Projectors.

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

mdm.Menu.Context.itemVisible("Hello World", true);


6.24.1.1.1.8 Menu.Context.removeItem()

Availability

Windows

Usage

mdm.Menu.Context.removeItem(itemLabel:String):Void

Parameters

itemLabel:String Item label.

Returns

Nothing

Description

Removes a Context Menu Item.

Notes

a) Please be sure to specify handler method for menu items.

b) Menu Items are not supported in Transparent Projectors.

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");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 391

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.

c) Menu Items are not supported in Transparent Projectors.

d) Mac OSX Menus support "function" only by default.

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

error:String Error message.

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()

©2006 Multidmedia Limited {mdm}


392 ZINC™ v2.5 Help Manual

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.

e) Not supported on Transparent Projectors

Example

mdm.Menu.Context.onContextMenuClick_Hello_World = function(){
mdm.Dialogs.prompt("Hello World!");
}

6.24.1.2 Menu.Main
Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Menu.Main

Method Summary for the Main Class

The following table lists methods of the Menu.Main class

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.

Menu.Main.removeHeader() Removes a previously added menu header.

Menu.Main.removeItem() Removes a previously added menu item.

Property Summary for the Main Class

The following table lists properties of the Menu.Main class

Property Description
Menu.Main.menuType Sets the method to use with custom File Menus.

Event Summary for the Main Class

The following table lists events of the Menu.Main class

Event Description
onMenuClick_* Executes when the user clicks on a menu item.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 393

6.24.1.2.1 Methods

6.24.1.2.1.1 Menu.Main.insertDivider()

Availability

Windows, Mac OSX

Usage

mdm.Menu.Main.insertDivider(headerLabel:String):Void

Parameters

headerLabel:String Menu header label.

Returns

Nothing

Description

Inserts a menu divider in the specified menu header.

Notes

a) Menu Items are not supported in Transparent Projectors.

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

Windows, Mac OSX

Usage

mdm.Menu.Main.insertHeader(headerLabel:String):Void

Parameters

headerLabel:String Menu header label.

Returns

Nothing

Description

Inserts a Title Bar Menu Header for building dynamic Menus.

Notes

a) Menu Items are not supported in Transparent Projectors.

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)

©2006 Multidmedia Limited {mdm}


394 ZINC™ v2.5 Help Manual

Example

mdm.Menu.Main.insertHeader("File");
6.24.1.2.1.3 Menu.Main.insertItem()

Availability

Windows, Mac OSX

Usage

mdm.Menu.Main.insertItem(headerLabel:String, itemLabel:String):Void

Parameters

headerLabel:String Menu header label.

itemLabel:String Item label.

Returns

Nothing

Description

Inserts a Menu Item into the specified header. A Header must first be created using mdm.Menu.Main.insertHeader()

Notes

a) Menu Items are not supported in Transparent Projectors.

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

mdm.Menu.Main.insertItem("File", "Open file");


6.24.1.2.1.4 Menu.Main.itemChecked()

Availability

Windows

Usage

mdm.Menu.Main.itemChecked(headerLabel:String, itemLabel:String, checked:Boolean)


:Void

Parameters

headerLabel:String Menu header label.

itemLabel:String Item label.

checked:Boolean If true item will be checked.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 395

Description

Checks or unchecks a Menu Item in the specified menu Header.

Notes

a) Menu Items are not supported in Transparent Projectors.

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.itemChecked("File", "Open file", true);


6.24.1.2.1.5 Menu.Main.itemEnabled()

Availability

Windows, Mac OSX

Usage

mdm.Menu.Main.itemEnabled(headerLabel:String, itemLabel:String, enabled:Boolean)


:Void

Parameters

headerLabel:String Menu header label.

itemLabel:String Item label.

enabled:Boolean If true item will be enabled.

Returns

Nothing

Description

Enables or disables a Menu Item in the specified menu Header.

Notes

a) Menu Items are not supported in Transparent Projectors.

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.itemEnabled("File", "Open file", true);


6.24.1.2.1.6 Menu.Main.itemVisible()

Availability

Windows

Usage

mdm.Menu.Main.itemVisible(headerLabel:String, itemLabel:String, visible:Boolean)


:Void

Parameters

©2006 Multidmedia Limited {mdm}


396 ZINC™ v2.5 Help Manual

headerLabel:String Menu header label.

itemLabel:String Item label.

visible:Boolean If true item will be visible.

Returns

Nothing

Description

Hides or shows a Menu Item in the specified menu Header.

Notes

a) Menu Items are not supported in Transparent Projectors.

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.itemVisible("File", "Open file", true);


6.24.1.2.1.7 Menu.Main.removeHeader()

Availability

Windows, Mac OSX

Usage

mdm.Menu.Main.removeHeader(headerLabel:String):Void

Parameters

headerLabel:String Menu header label.

Returns

Nothing

Description

Removes a previously added menu header.

Notes

a) Menu Items are not supported in Transparent Projectors.

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

Windows, Mac OSX

Usage

mdm.Menu.Main.removeItem(headerLabel:String, itemLabel:String):Void

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 397

Parameters

headerLabel:String Menu header label.

itemLabel:String Item label.

Returns

Nothing

Description

Removes a previously added menu item.

Notes

a) Menu Items are not supported in Transparent Projectors.

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.removeItem("File", "Open file");


6.24.1.2.2 Properties

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.

c) Menu Items are not supported in Transparent Projectors.

d) Mac OSX Menus support "function" only by default.

Example

mdm.Menu.Main.menuType = "function";

©2006 Multidmedia Limited {mdm}


398 ZINC™ v2.5 Help Manual

6.24.1.2.3 Events

6.24.1.2.3.1 onMenuClick_*

Availability

Windows, Mac OSX

Usage

mdm.Menu.Main.onContextMenuClick_*:Function

Parameters

None

Description

Executes when the user clicks on a menu item.

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.

e) Not supported on Transparent Projectors.

Example

mdm.Menu.Main.onMenuClick_Open_File = function(){
mdm.Dialogs.prompt("Open File");
}

6.24.1.3 Menu.Tray
vailability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Menu.Tray

Method Summary for the Tray Class

The following table lists methods of the Menu.Tray class

Method Description
Menu.Tray.hideIcon() Hides the Tray Icon.
Menu.Tray.insertDivider() Inserts a menu divider in the Tray Icon menu.

Menu.Tray.insertItem() Inserts a Menu Item into the Tray Icon.

Menu.Tray.itemChecked() Checks or unchecks a Tray Menu Item.

Menu.Tray.itemEnabled() Enables or disables a Tray Menu Item.

Menu.Tray.itemVisible() Hides or Shows a Tray Menu Item.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 399

Menu.Tray.removeItem() Removes a previously added tray menu item.

Menu.Tray.setIcon() Sets the Tray Icon to the specified ICO file.

Menu.Tray.showBalloon() Will display an XP style tray Icon Balloon.

Menu.Tray.showIcon() Shows the Tray Icon.

Property Summary for the Tray Class

The following table lists properties of the Tray class

Property Description
Menu.Tray.menuType Sets the method to use with custom File Menus.

Menu.Tray.iconHint Sets the Icon Hint.

Event Summary for the Tray Class

The following table lists events of the Tray class

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

Hides the Tray Icon.

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

©2006 Multidmedia Limited {mdm}


400 ZINC™ v2.5 Help Manual

Windows

Usage

mdm.Menu.Tray.insertDivider():Void

Parameters

None

Returns

Nothing

Description

Inserts a menu divider in the Tray Icon menu.

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

itemLabel:String Item label.

Returns

Nothing

Description

Inserts a Menu Item into the Tray Icon which can be accessed by right clicking on the icon.

Notes

a) Please be sure to specify handler method for menu items.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 401

mdm.Menu.Tray.itemChecked(itemLabel:String, checked:Boolean):Void

Parameters

itemLabel:String Item label.

checked:Boolean If true item will be checked.

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

mdm.Menu.Tray.itemChecked("Hello World", true);


6.24.1.3.1.5 Menu.Tray.itemEnabled()

Availability

Windows

Usage

mdm.Menu.Tray.itemEnabled(itemLabel:String, enabled:Boolean):Void

Parameters

itemLabel:String Item label.

enabled:Boolean If true item will be enabled.

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

mdm.Menu.Tray.itemEnabled("Hello World", true);

©2006 Multidmedia Limited {mdm}


402 ZINC™ v2.5 Help Manual

6.24.1.3.1.6 Menu.Tray.itemVisible()

Availability

Windows

Usage

mdm.Menu.Tray.itemVisible(itemLabel:String, visible:Boolean):Void

Parameters

itemLabel:String Item label.

visible:Boolean If true item will be visible.

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

mdm.Menu.Tray.itemVisible("Hello World", true);


6.24.1.3.1.7 Menu.Tray.removeItem()

Availability

Windows

Usage

mdm.Menu.Tray.removeItem(itemLabel:String):Void

Parameters

itemLabel:String Item label.

Returns

Nothing

Description

Removes a previously added tray menu item.

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.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 403

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

filePath:String Path to .ico file to be loaded into tray.

Returns

Nothing

Description

Sets the Tray Icon to the specified ICO file.

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

balloonTitle:String Title of balloon up to 64 characters.

balloonText:String Balloon title up to 255 characters.

balloonIconType:String Path Balloon icon type. One of constants: "none", "error", "warning" and "info".

balloonTimeout:Number Duration of balloon visibility: from 10 to 60 seconds.

ballonFrameLabel:String Name of flash timeline label.

Returns

Nothing

Description

will display an XP style tray icon balloon, using the specified parameters:

©2006 Multidmedia Limited {mdm}


404 ZINC™ v2.5 Help Manual

title can be up to 64 characters

text can be up to 255 characters

iconType can be any of the following values: ("none","error","warning","info")

timeout can be any value from 10 to 60 seconds (no more or less)

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.

b) The Tray Icon must be enabled for this command to function.

c) Windows 2000 and XP only.

Example

mdm.Menu.Tray.showBalloon("News", "Zinc™ v2 Rocks!", "info", 10, "myFrame");


6.24.1.3.1.10 Menu.Tray.showIcon()

Availability

Windows

Usage

mdm.Menu.Tray.showIcon():Void

Parameters

None

Returns

Nothing

Description

Shows the Tray Icon.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 405

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.

c) Mac OSX Menus support "function" only by default.

Example

mdm.Menu.Tray.menuType = "function";
6.24.1.3.2.2 Menu.Tray.iconHint

Availability

Windows

Usage

mdm.Menu.Tray.iconHint:String

Description

Sets the Hint for the Projector Tray Icon.

Notes

Menu Items are not supported in Transparent Projectors.

Example

mdm.Menu.Tray.iconHint = "This is My Projector";


6.24.1.3.3 Events

6.24.1.3.3.1 onTrayMenuClick_*

Availability

Windows

Usage

mdm.Menu.Tray.onTrayMenuClick_*:Function

Parameters

error:String Error message.

Description

Executes when the user clicks on a tray menu item.

Notes

©2006 Multidmedia Limited {mdm}


406 ZINC™ v2.5 Help Manual

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

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Net

Object Summary for the Net Class

The following table lists Objects of the Net class

Object Description
HTTPD HTTPD Object
Mail Mail Object

TCP TCP Object

UDP UDP Object

Method Summary for the Net Class

The following table lists methods of the Net class

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.

Property Summary for the Net Class

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 407

The following table lists methods of the Net class

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

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Network.HTTPD

Method Summary for the Network.HTTPD Class

The following table lists methods of the Network.HTTPD class

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 Summary for the Network.HTTPD Class

The following table lists events of the Network.HTTPD class

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

©2006 Multidmedia Limited {mdm}


408 ZINC™ v2.5 Help Manual

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

For use with HTTPD.startServer()

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

responseString:String Item label.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 409

your web browser:

http://127.0.0.1?get&info - will return the contents of the variable info to the browser

http://127.0.0.1?set&info&Hello World - will set the variable info to Hello World

http://127.0.0.1?gotoframe&1 - will move the projector to the specified frame number

http://127.0.0.1?gotolabel&myLabel - will move the projector to the specified frame label

http://127.0.0.1?gotolabel_ret&myLabel&ReturnData - will move the projector to the specified frame label


and also return the ReturnData value to the variable httpparams.

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

Enter topic text here.

6.25.1.1.2.1 onRequest

Availability

Windows

Usage

httpServerInstance.onRequest:Function

Parameters

©2006 Multidmedia Limited {mdm}


410 ZINC™ v2.5 Help Manual

document:String Document filename requested.

parameters:String Parameters submitted.

remoteIP:Number Remote server IP address.

Description

Executes when a HTTP Server Request is made.

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

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.Network.Mail

Method Summary for the Mail Class

The following table lists methods of the Network.Mail class

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

Windows, Mac OSX

Usage

mdm.Network.Mail.send(serverName:String, username:String, password:String,


from:String, to:String, bcc:String, subject:String, body:String,
attachementsPath:String):Void

Parameters

serverName:String Mail server to use.

username:String Mail account username.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 411

password:String Mail acount password.

from:String From line details.

to:String To line details.

bcc:String BCC (Blank carbon copy) line details.

subject:String Message subject.

body:String Message body text.

attachementsPath:String File paths to send with mail.

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

mdm.Network.Mail.send("mail.mydomain.com", "myUsername", "myPassword",


"sender@anotherdomain.com" ,"recipient@anotherdomain.com",
"anotherrecipient@yetanotherdomain.com", "This is my Subject","Hello
World","c:\\myfile.jpg");
6.25.1.2.1.2 Network.Mail.sendNoAuth()

Availability

Windows

Usage

mdm.Network.Mail.sendNoAuth(serverName:String, username:String, password:String,


from:String, to:String, bcc:String, subject:String, body:String,
attachementsPath:String):Void

Parameters

serverName:String Mail server to use.

username:String Mail account username.

password:String Mail acount password.

from:String From line details.

to:String To line details.

bcc:String BCC (Blank carbon copy) line details.

subject:String Message subject.

©2006 Multidmedia Limited {mdm}


412 ZINC™ v2.5 Help Manual

body:String Message body text.

attachementsPath:String File paths to send with mail.

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

mdm.Network.Mail.sendNoAuth("mail.mydomain.com", "myUsername", "myPassword",


"sender@anotherdomain.com" ,"recipient@anotherdomain.com",
"anotherrecipient@yetanotherdomain.com", "This is my Subject","Hello
World","c:\\myfile.jpg");

6.25.1.2.1.3 Network.Mail.sendClientSide()

Availability

Windows

Usage

mdm.Network.Mail.sendClientSide(to:String, subject:String, body:String,


attachementsPath:String):Void

Parameters

to:String To line details.

subject:String Message subject.

body:String Message body text.

attachementsPath:String File paths to send with mail.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 413

mdm.Network.Mail.sendClientSide("recipient@anotherdomain.com", "This is my
Subject", "Hello World", "c:\\myfile.jpg");

6.25.1.3 Network.TCP
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Network.TCP

Object Summary for the TCP Class

The following table lists Objects of the TCP class

Object Description
FileServer FileServer Object
ProxyHTTP ProxyHTTP Object

6.25.1.3.1 Objects

6.25.1.3.1.1 Network.TCP.FileServer

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Network.TCP.FileServer

Method Summary for the FileServer Class

The following table lists methods of the FileServer class

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.

Network.TCP.FileServer.startServer() Enables the internal TCP based File Server.


Network.TCP.FileServer.stopServer() Disables the internal TCP based File Server.

Availability

Windows

Usage

mdm.Network.TCP.FileServer.getFile(remoteIPAddress:String, remotePortNumber:Number,
remoteFilePath:String, localFilePath:String):Void

©2006 Multidmedia Limited {mdm}


414 ZINC™ v2.5 Help Manual

Parameters

remoteIPAddress:String Remote file server ip address.

remotePortNumber:Number Remote file server port number.

remoteFilePath:String File path to a file on remote server.

localFilePath:String File path to a file on local machine.

Returns

Nothing

Description

Will retrieve the file from the specified remote system.

Notes

None

Example

mdm.Network.TCP.FileServer.getFile("127.0.0.1", 4000, "c:\\remote.txt",


"c:\\local.txt");

Availability

Windows

Usage

mdm.Network.TCP.FileServer.getFileList(remoteIPAddress:String,
remotePortNumber:Number, remoteBaseFolder:String):Array

Parameters

remoteIPAddress:String Remote file server ip address.

remotePortNumber:Number Remote file server port number.

remoteBaseFolder:String Folder on remote machine.

Returns

An Array

Description

Retrieves an Array of all files in the Folder specified on the remote computer.

Notes

None

Example

var fileList = mdm.Network.TCP.FileServer.getFileList("127.0.0.1", 4000, "c:\\");


mdm.Dialogs.prompt(fileList[0]);
mdm.Dialogs.prompt(fileList[1]);
// ... etc

Availability

Windows

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 415

Usage

mdm.Network.TCP.FileServer.getFolderList(remoteIPAddress:String,
remotePortNumber:Number, remoteBaseFolder:String):String

Parameters

remoteIPAddress:String Remote file server ip address.

remotePortNumber:Number Remote file server port number.

remoteBaseFolder:String Folder on remote machine.

Returns

An Array

Description

Retrieves an Array of all folders in the Folder Specified on the remote computer.

Notes

None

Example

var folderList = mdm.Network.TCP.FileServer.getFolderList("127.0.0.1", 4000,


"c:\\");
mdm.Dialogs.prompt(folderList[0]);
mdm.Dialogs.prompt(folderList[1]);
// ... etc

Availability

Windows

Usage

mdm.Network.TCP.FileServer.sendFile(remoteIPAddress:String,
remotePortNumber:Number, localIPAddress:String, localPortNumber:Number,
localFilePath:String, remoteFilePath:String):Void

Parameters

remoteIPAddress:String Remote file server ip address.

remotePortNumber:Number Remote file server port number.

localIPAddress:String Local file server ip address.

localPortNumber:Number Local file server port number.

localFilePath:String File path to a file on local machine.

remoteFilePath:String File path to a file on remote server.

Returns

Nothing

Description

Will transfer a file from the local system to the remote system using the TCP protocol.

Notes

©2006 Multidmedia Limited {mdm}


416 ZINC™ v2.5 Help Manual

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

mdm.Network.TCP.FileServer.sendFile("127.0.0.1", 4000, "127.0.0.1", 4000,


"c:\\local.txt", "c:\\remote.txt");

Availability

Windows

Usage

mdm.Network.TCP.FileServer.startServer(localPortNumber:Number):Void

Parameters

localPortNumber:Number Port number to use.

Returns

Nothing

Description

Enables the internal TCP based File Server.

Notes

None

Example

mdm.Network.TCP.FileServer.startServer(4000);

Availability

Windows

Usage

mdm.Network.TCP.FileServer.stopServer():Void

Parameters

None

Returns

Nothing

Description

Disables the internal TCP based File Server.

Notes

None

Example

mdm.Network.TCP.FileServer.stopServer();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 417

6.25.1.3.1.2 Network.TCP.ProxyHTTP

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Network.TCP.ProxyHTTP

Method Summary for the ProxyHTTP Class

The following table lists methods of the ProxyHTTP class

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.

Sets the type of HTTP connection to use if the connection


Network.TCP.ProxyHTTP.setProxy()
is behind a proxy server.

Availability

Windows

Usage

mdm.Network.TCP.ProxyHTTP.getFile(serverName:String, remoteFilePath:String,
localFilePath:String):Void

Parameters

serverName:String Remote File Server Address.

remoteFilePath:String Path to a File on a Remote Server.

localFilePath:String Path to a File on a Local System.

Returns

Nothing

Description

Downloads a HTTP file through a Proxy.

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

©2006 Multidmedia Limited {mdm}


418 ZINC™ v2.5 Help Manual

Parameters

serverName:String Remote file server address.

remoteFilePath:String Path to a File on a Remote Server.

Returns

Nothing

Description

Downloads a File directly to a String through a Proxy.

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

proxyType:String Type of authentication.

proxyServerAddress:String Proxy server address.

proxyServerPortNumber:Number Proxy server port number.

username:String Proxy server address username.

password:String Proxy server password.

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

mdm.Network.TCP.ProxyHTTP.setProxy("0", "www.myproxy.com", 8000, "myPassword",


"myUsername");

6.25.1.4 Network.UDP
Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Network.UDP

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 419

Object Summary for the UDP Class

The following table lists Objects of the UDPclass

Object Description
Socket Socket Object
TFTP TFTP Object

6.25.1.4.1 Objects

6.25.1.4.1.1 Network.UDP.Socket

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Network.TCP.FileServer

Method Summary for the Socket Class

The following table lists methods of the Socket class

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.

Network.UDP.Socket.startServer() Enables listening to the specified port number.

Network.UDP.Socket.stopServer() Disables listening.

Event Summary for the Socket Class

The following table lists events of the Socket class

Event Description
onData Executes when UDP Data is Received.

Availability

Windows

Usage

mdm.Network.UDP.Socket.broadcast(remotePortNumber:Number, messageText:String):Void

Parameters

remotePortNumber:Number Port number to use.

messageText:String Text data to send with socket.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


420 ZINC™ v2.5 Help Manual

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

mdm.Network.UDP.Socket.broadcast(4000, "receivedText@eq@Hello World!");

// 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

remoteIPAddress:String Port number to use.

remotePortNumber:Number Port number to use.

messageText:String Text data to send with socket.

Returns

Nothing

Description

Sends the contents of the variable messageText to the specified IP and Port number via UDP protocol.

Notes

None

Example

mdm.Network.UDP.Socket.send("127.0.0.1", 4000, "receivedText@eq@Hello World!");

// 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

localPortNumber:Number Port number to use.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 421

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

data:String The Data Received as a String.

Description

Executes when UDP Data is Received.

Notes

None

Example

mdm.Network.UDP.Socket.onData = function(myObject){
mdm.Dialogs.prompt(myObject.data);
}

©2006 Multidmedia Limited {mdm}


422 ZINC™ v2.5 Help Manual

6.25.1.4.1.2 Network.UDP.TFTP

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Network.UDP.TFTP

Method Summary for the TFPT Class

The following table lists methods of the TFTP class

Method Description
Network.UDP.TFTP.abort() Aborts the transfer.
Network.UDP.TFTP.getFile() Gets a File from the Host Projector

Network.UDP.TFTP.getProgressCurrent() Returns Progress in Bytes.


Network.UDP.TFTP.getProgressMax() Returns the Total size of the file to be transfered.

Network.UDP.TFTP.sendFile() Sends a File to the Host Projector.

Network.UDP.TFTP.setBuffer() Sets the Buffer Size for Sending/Receiving Files.

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:

RFC 1350, Trivial File Transfer Protocol: http://www.rfc-editor.org/rfc/rfc1350.txt

RFC 1782, TFTP Option Extension: http://www.rfc-editor.org/rfc/rfc1782.txt

RFC 1783, TFTP mode Option: http://www.rfc-editor.org/rfc/rfc1783.txt

Notes

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 423

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

remoteIPAddress:String Remote file server ip address.

remotePortNumber:Number Remote file server port number.

localFilePath:String File path to a file on local machine.

remoteFilePath:String File path to a file on remote server.

Returns

Nothing

Description

Gets a File from the Host Projector at the specified Port.

Notes

None

Example

mdm.Network.UDP.TFTP.getFile("127.0.0.1", 4000, "c:\\local.txt", "c:\\remote.txt");

Availability

Windows

Usage

mdm.Network.UDP.TFTP.getProgressCurrent():Number

Parameters

None

Returns

An Integer.

Description

Returns progress in bytes.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


424 ZINC™ v2.5 Help Manual

var bytesLoaded = mdm.Network.UDP.TFTP.getProgressCurrent();

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:

RFC 1350, Trivial File Transfer Protocol: http://www.rfc-editor.org/rfc/rfc1350.txt

RFC 1782, TFTP Option Extension: http://www.rfc-editor.org/rfc/rfc1782.txt

RFC 1783, TFTP mode Option: http://www.rfc-editor.org/rfc/rfc1783.txt

Notes

None

Example

var bytesTotal = mdm.Network.UDP.TFTP.getProgressMax();

Availability

Windows

Usage

mdm.Network.UDP.TFTP.sendFile(remoteIPAddress:String, remotePortNumber:Number,
localFilePath:String, remoteFilePath:String):Void

Parameters

remoteIPAddress:String Remote file socket server ip address.

remotePortNumber:Number Remote file socket server port number.

localFilePath:String File path to a file on local machine.

remoteFilePath:String File path to a file on remote socket server.

Returns

Nothing

Description

Send a File from the Host Projector at the specified Port.

Notes

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 425

Example

mdm.Network.UDP.TFTP.sendFile("127.0.0.1", 4000, "c:\\local.txt",


"c:\\remote.txt");

Availability

Windows

Usage

mdm.Network.UDP.TFTP.setBuffer():Void

Parameters

bufferSize:Number

Returns

Nothing

Description

Sets the Buffer Size for Sending/Receiving Files.

Notes

None

Example

mdm.Network.UDP.TFTP.setBuffer(5000);

Availability

Windows

Usage

mdm.Network.UDP.TFTP.setBlockSize(blockSize:Number):Void

Parameters

blockSize:Number Block size in bytes

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:

RFC 1350, Trivial File Transfer Protocol: http://www.rfc-editor.org/rfc/rfc1350.txt

RFC 1782, TFTP Option Extension: http://www.rfc-editor.org/rfc/rfc1782.txt

RFC 1783, TFTP mode Option: http://www.rfc-editor.org/rfc/rfc1783.txt

Example

mdm.Network.UDP.TFTP.setBlockSize(1500);

©2006 Multidmedia Limited {mdm}


426 ZINC™ v2.5 Help Manual

Availability

Windows

Usage

mdm.Network.UDP.TFTP.setTimeout(timeout:Number):Void

Parameters

timeout:Number Value of timeout in miliseconds.

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:

RFC 1350, Trivial File Transfer Protocol: http://www.rfc-editor.org/rfc/rfc1350.txt

RFC 1782, TFTP Option Extension: http://www.rfc-editor.org/rfc/rfc1782.txt

RFC 1783, TFTP mode Option: http://www.rfc-editor.org/rfc/rfc1783.txt

Example

mdm.Network.UDP.TFTP.setTimeout(4000);

Availability

Windows

Usage

mdm.Network.UDP.TFTP.setTransferMode(transferMode:String):Void

Parameters

transferMode:String Value Transfer mode type. One of constants: "Octet" or "Ascii".

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:

RFC 1350, Trivial File Transfer Protocol: http://www.rfc-editor.org/rfc/rfc1350.txt

RFC 1782, TFTP Option Extension: http://www.rfc-editor.org/rfc/rfc1782.txt

RFC 1783, TFTP mode Option: http://www.rfc-editor.org/rfc/rfc1783.txt

Example

mdm.Network.UDP.TFTP.setTransferMode("Octet");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 427

Availability

Windows

Usage

mdm.Network.UDP.TFTP.startServer(localPortNumber:Number):Void

Parameters

localPortNumber:Number Local socket server port number.

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:

RFC 1350, Trivial File Transfer Protocol: http://www.rfc-editor.org/rfc/rfc1350.txt

RFC 1782, TFTP Option Extension: http://www.rfc-editor.org/rfc/rfc1782.txt

RFC 1783, TFTP mode Option: http://www.rfc-editor.org/rfc/rfc1783.txt

Example

mdm.Network.UDP.TFTP.startServer(4000);

Availability

Windows

Usage

mdm.Network.UDP.TFTP.stopServer():Void

Parameters

None

Returns

Nothing

Description

Stops the File Server for transfer of Files between Projectors.

Notes

For more info on the TFTP protocol, and how to optimize it:

RFC 1350, Trivial File Transfer Protocol: http://www.rfc-editor.org/rfc/rfc1350.txt

RFC 1782, TFTP Option Extension: http://www.rfc-editor.org/rfc/rfc1782.txt

RFC 1783, TFTP mode Option: http://www.rfc-editor.org/rfc/rfc1783.txt

Example

©2006 Multidmedia Limited {mdm}


428 ZINC™ v2.5 Help Manual

mdm.Network.UDP.TFTP.stopServer();

6.25.2 Methods
6.25.2.1 Network.checkConnection()

Availability

Windows, Mac OSX

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

var isConnected = mdm.Network.checkConnection();

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

var connectionType = mdm.Network.checkConnectionAdv();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 429

6.25.2.3 Network.checkConnectionPing()

Availability

Windows

Usage

mdm.Network.checkConnectionPing(remoteAddress:String, timeout:Number):Boolean

Parameters

remoteAddress:String Remote address to check.

timeout:Number Item Timeout in milliseconds to wait for reply.

Returns

A Boolean

Description

Returns "true" or "false" based upon the presence of an Internet Connection.

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

var isConnected = mdm.Network.checkConnectionPing("www.multidmedia.com", 2000);

6.25.2.4 Network.getHostByIP()

Availability

Windows, Mac OSX

Usage

mdm.Network.getHostByIP(ip:String):String

Parameters

ip:String System IP Address.

Returns

A String

Description

Returns the hostname for the specified IP Address (if available).

Notes

None

Example

var ipAddress = mdm.Network.getHostByIP("192.168.100.1");

©2006 Multidmedia Limited {mdm}


430 ZINC™ v2.5 Help Manual

6.25.2.5 Network.getIPByHost()

Availability

Windows, Mac OSX

Usage

mdm.Network.getIPByHost(hostName:String):String

Parameters

hostName:String Host Name to Check.

Returns

A String

Description

Returns the IP Address for the specified hostname (if available).

Notes

None

Example

var ipAddress = mdm.Network.getIPByHost("myhost");

6.25.2.6 Network.getMACAddress()

Availability

Windows, Mac OSX

Usage

mdm.Network.getMACAddress(adapterID:Number):String

Parameters

adapterID:Number Network card identifier.

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

var macAddress = mdm.Network.getMACAddress(0);

6.25.2.7 Network.getURL()

Availability

Windows

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 431

Usage

mdm.Network.getURL(url:String):Void

Parameters

url:String URL to open.

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

Returns the system IP address.

Notes

None

Example

var ipAddress = mdm.Network.IPAddress;

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

©2006 Multidmedia Limited {mdm}


432 ZINC™ v2.5 Help Manual

Example

var hasNetwork = mdm.Network.isPresent;

6.26 mdm.PDF6

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.PDF

Constructor Summary for the PDF6 Class

The following table lists constructors for the PDF6 class

Constructor Description
loads an instance of Adobe Acrobat Reader 6 using the
mdm.PDF6()
specified parameters.

Method Summary for the PDF Class

The following table lists methods of the PDF class

Method Description
PDF6.close() Closes the specified PDF Instance
PDF6.firstPage() Goes to the first page in the loaded PDF document.

PDF6.hide() Will hide the specified PDF Instance.

PDF6.lastPage() Goes to the last page in the loaded PDF document.


Loads a new PDF document in a previously loaded
PDF6.loadFile()
instance.
PDF6.nextPage() Goes to the next page in the loaded PDF document.

PDF6.print() Prints the current page of the PDF instance.


Prints the current page of the PDF instance with a Print
PDF6.printWithDialog()
Dialog.
PDF6.printAll() Prints the entire document of the PDF instance.

PDF6.PrintPages() Prints the specified pages of the loaded PDF.

PDF6.PreviousPage() Goes to the previous page in the loaded PDF document.


Goes to page specified in the parameter page in the PDF
PDF6.setCurrentPage()
instance.
PDF6.show() Will show the specified PDF Instance.

Property Summary for the PDF Class

The following table lists properties of the PDF class

Property Description
PDF6.height Height of loaded PDF in pixels.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 433

PDF6.scrollbars Will show or hide the scrollbars in the specified PDF


instance.
PDF6.toolbar Will show or hide the toolbar in the specified PDF instance.

PDF6.visible Controls PDF visibility.

PDF6.width Width of loaded PDF in pixels.

PDF6.x X position of loaded PDF in pixels.

PDF6.y Y position of loaded PDF in pixels.

6.26.1 Constructor
6.26.1.1 mdm.PDF6()

Availability

Windows

Constructor

mdm.PDF6(x:Number, y:Number, width:Number, height:Number, pdf:String):Void

Parameters

x:Number X position

y:Number Y Position

width:Number Width of Instance in Pixels

height:String Height if Instance in Pixels

pdf:String Initial PDF File to load

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

Create a new Instance called myPDF with absolute positioning:

myPDF = new mdm.PDF6(0, 0, 400, 350, "myFile.pdf")

Create a new Instance called myPDF with relative positioning:

// t = top
// b = bottom
// l = left
// r = right
// c = center

myPDF = new mdm.PDF6("c", "c", "50%", "50%", "myFile.pdf")

©2006 Multidmedia Limited {mdm}


434 ZINC™ v2.5 Help Manual

6.26.2 Methods
6.26.2.1 PDF6.close()

Availability

Windows

Usage

pdf6Instance.close():Void

Parameters

None

Returns

Nothing

Description

Closes the specified PDF Instance.

Notes

None

Example

myPDF.close();

6.26.2.2 PDF6.firstPage()

Availability

Windows

Usage

pdf6Instance.firstPage():Void

Parameters

None

Returns

Nothing

Description

Goes to the first page in the loaded PDF document.

Notes

None

Example

myPDF.firstPage();

6.26.2.3 PDF6.hide()

Availability

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 435

Windows

Usage

pdf6Instance.hide():Void

Parameters

None

Returns

Nothing

Description

Will hide the specified PDF Instance.

Notes

None

Example

myPDF.hide();

6.26.2.4 PDF6.lastPage()

Availability

Windows

Usage

pdf6Instance.lastPage():Void

Parameters

None

Returns

Nothing

Description

Goes to the last page in the loaded PDF document.

Notes

None

Example

myPDF.lastPage();

6.26.2.5 PDF6.loadFile()

Availability

Windows

Usage

pdf6Instance.loadFile(filePath:String):Void

Parameters

©2006 Multidmedia Limited {mdm}


436 ZINC™ v2.5 Help Manual

filePath:String File path.

Returns

Nothing

Description

Loads a new PDF document in a previously loaded instance.

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

Goes to the next page in the loaded PDF document.

Notes

None

Example

myPDF.nextPage();

6.26.2.7 PDF6.print()

Availability

Windows

Usage

pdf6Instance.print():Void

Parameters

None

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 437

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

©2006 Multidmedia Limited {mdm}


438 ZINC™ v2.5 Help Manual

Example

myPDF.printAll();

6.26.2.10 PDF6.printPages()

Availability

Windows

Usage

pdf6Instance.printPages(printFromPage:Number, printToPage:Number):Void

Parameters

printFromPage:Number First page to be printed.

printToPage:Number File path.

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

Goes to the previous page in the loaded PDF document.

Notes

None

Example

myPDF.previousPage();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 439

6.26.2.12 PDF6.setCurrentPage()

Availability

Windows

Usage

pdf6Instance.setCurrentPage(targetPage:Number):Void

Parameters

targetPage:Number Page to be set as current.

Returns

Nothing

Description

Goes to page specified in the parameter page in the PDF instance.

Notes

None

Example

myPDF.setCurrentPage(5);

6.26.2.13 PDF6.show()

Availability

Windows

Usage

pdf6Instance.show():Void

Parameters

None

Returns

Nothing

Description

Will show the specified PDF Instance.

Notes

None

Example

myPDF.show();

6.26.3 Properties
6.26.3.1 PDF6.height

Availability

©2006 Multidmedia Limited {mdm}


440 ZINC™ v2.5 Help Manual

Windows

Usage

pdf6Instance.height:Number

Returns

An Integer

Description

Height of loaded PDF instance in pixels.

Notes

None

Example

To Get the Height:

var pdfInstanceHeight = myPDF.height;

To Set the Height:

myPDF.height = 300;

6.26.3.2 PDF6.scrollbars

Availability

Windows

Usage

pdf6Instance.scrollbars:Boolean

Returns

A Boolean

Description

Will show or hide the scrollbars in the specified PDF instance.

Notes

None

Example

To Get the Scrollbar State:

var pdfScrollbars = myPDF.scrollbars;

To Set the Scrollbar State:

myPDF.scrollbars = true;

6.26.3.3 PDF6.toolbar

Availability

Windows

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 441

Usage

pdf6Instance.toolbar:Boolean

Returns

A Boolean

Description

Will show or hide the toolbar in the specified PDF instance.

Notes

None

Example

To Get the Toolbar State:

var pdfToolbar = myPDF.toolbar;

To Set the Toolbar State:

myPDF.toolbar = true;

6.26.3.4 PDF6.visible

Availability

Windows

Usage

pdf6Instance.visible:Boolean

Returns

A Boolean

Description

Controls PDF visibility.

Notes

None

Example

To Get the Visibility:

var pdfVisible = myPDF.visible;

To Set the Visibility:

myPDF.visible = true;

6.26.3.5 PDF6.width

Availability

Windows

©2006 Multidmedia Limited {mdm}


442 ZINC™ v2.5 Help Manual

Usage

pdf6Instance.width:Number

Returns

An Integer

Description

Width of loaded PDF instance in pixels.

Notes

None

Example

To Get the Width:

var pdfInstanceWidth = myPDF.width;

To Set the Width:

myPDF.width = 300;

6.26.3.6 PDF6.x

Availability

Windows

Usage

pdf6Instance.x:Number

Returns

An Integer

Description

Current horizontal (x) position of loaded PDF in pixels.

Notes

None

Example

To Get the X:

var currentX = myPDF.x;

To Set the X:

myPDF.x = 0;

6.26.3.7 PDF6.y

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 443

pdf6Instance.y:Number

Returns

An Integer

Description

Current vertical (y) position of loaded PDF in pixels.

Notes

None

Example

To Get the Y:

var currentY = myPDF.y;

To Set the Y:

myPDF.y = 0;

6.27 mdm.PDF7

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.PDF7

Constructor Summary for the PDF7 Class

The following table lists constructors for the PDF7 class

Constructor Description
loads an instance of Adobe Acrobat Reader 7 using the
mdm.PDF7()
specified parameters.

Method Summary for the PDF7 Class

The following table lists methods of the PDF7 class

Method Description
PDF7.close() Closes the specified PDF Instance
PDF7.firstPage() Goes to the first page in the loaded PDF document.

PDF7.hide() Will hide the specified PDF Instance.

PDF7.lastPage() Goes to the last page in the loaded PDF document.


Loads a new PDF document in a previously loaded
PDF7.loadFile()
instance.
PDF7.nextPage() Goes to the next page in the loaded PDF document.

PDF7.print() Prints the current page of the PDF instance.


Prints the current page of the PDF instance with a Print
PDF7.printWithDialog()
Dialog.

©2006 Multidmedia Limited {mdm}


444 ZINC™ v2.5 Help Manual

PDF7.printAll() Prints the entire document of the PDF instance.

PDF7.PrintPages() Prints the specified pages of the loaded PDF.

PDF7.PreviousPage() Goes to the previous page in the loaded PDF document.


Goes to page specified in the parameter page in the PDF
PDF7.setCurrentPage()
instance.
PDF7.show() Will show the specified PDF Instance.

Property Summary for the PDF7 Class

The following table lists properties of the PDF7 class

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.

PDF7.visible Controls PDF visibility.

PDF7.width Width of loaded PDF in pixels.

PDF7.x X position of loaded PDF in pixels.

PDF7.y Y position of loaded PDF in pixels.

6.27.1 Constructor
6.27.1.1 mdm.PDF7()

Availability

Windows

Constructor

mdm.PDF7(x:Number, y:Number, width:Number, height:Number, pdf:String):Void

Parameters

x:Number X position

y:Number Y Position

width:Number Width of Instance in Pixels

height:String Height if Instance in Pixels

pdf:String Initial PDF File to load

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.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 445

Example

Create a new Instance called myPDF with absolute positioning:

myPDF = new mdm.PDF7(0, 0, 400, 350, "myFile.pdf")

Create a new Instance called myPDF with relative positioning:

// t = top
// b = bottom
// l = left
// r = right
// c = center

myPDF = new mdm.PDF7("c", "c", "50%", "50%", "myFile.pdf")

6.27.2 Methods
6.27.2.1 PDF7.close()

Availability

Windows

Usage

pdf7Instance.close():Void

Parameters

None

Returns

Nothing

Description

Closes the specified PDF Instance

Notes

None

Example

myPDF.close();

6.27.2.2 PDF7.firstPage()

Availability

Windows

Usage

pdf7Instance.firstPage():Void

Parameters

None

©2006 Multidmedia Limited {mdm}


446 ZINC™ v2.5 Help Manual

Returns

Nothing

Description

Goes to the first page in the loaded PDF document.

Notes

None

Example

myPDF.firstPage();

6.27.2.3 PDF7.hide()

Availability

Windows

Usage

pdf7Instance.hide():Void

Parameters

None

Returns

Nothing

Description

Will hide the specified PDF Instance.

Notes

None

Example

myPDF.hide();

6.27.2.4 PDF7.lastPage()

Availability

Windows

Usage

pdf7Instance.lastPage():Void

Parameters

None

Returns

Nothing

Description

Goes to the last page in the loaded PDF document.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 447

Notes

None

Example

myPDF.lastPage();

6.27.2.5 PDF7.loadFile()

Availability

Windows

Usage

pdf7Instance.loadFile(filePath:String):Void

Parameters

filePath:String File path.

Returns

Nothing

Description

Loads a new PDF document in a previously loaded instance.

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

Goes to the next page in the loaded PDF document.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


448 ZINC™ v2.5 Help Manual

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 449

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

printFromPage:Number First page to be printed.

printToPage:Number File path.

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

©2006 Multidmedia Limited {mdm}


450 ZINC™ v2.5 Help Manual

Parameters

None

Returns

Nothing

Description

Goes to the previous page in the loaded PDF document.

Notes

None

Example

myPDF.previousPage();

6.27.2.12 PDF7.setCurrentPage()

Availability

Windows

Usage

pdf7Instance.setCurrentPage(targetPage:Number):Void

Parameters

targetPage:Number Page to be set as current.

Returns

Nothing

Description

Goes to page specified in the parameter page in the PDF instance.

Notes

None

Example

myPDF.setCurrentPage(5);

6.27.2.13 PDF7.show()

Availability

Windows

Usage

pdf7Instance.show():Void

Parameters

None

Returns

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 451

Nothing

Description

Will show the specified PDF Instance.

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

Height of loaded PDF instance in pixels.

Notes

None

Example

To Get the Height:

var pdfInstanceHeight = myPDF.height;

To Set the Height:

myPDF.height = 300;

6.27.3.2 PDF7.scrollbars

Availability

Windows

Usage

pdf7Instance.scrollbars:Boolean

Returns

A Boolean

Description

Will show or hide the scrollbars in the specified PDF instance.

©2006 Multidmedia Limited {mdm}


452 ZINC™ v2.5 Help Manual

Notes

None

Example

To Get the Scrollbar State:

var pdfScrollbars = myPDF.scrollbars;

To Set the Scrollbar State:

myPDF.scrollbars = true;

6.27.3.3 PDF7.toolbar

Availability

Windows

Usage

pdf7Instance.toolbar:Boolean

Returns

A Boolean

Description

Will show or hide the toolbar in the specified PDF instance.

Notes

None

Example

To Get the Toolbar State:

var pdfToolbar = myPDF.toolbar;

To Set the Toolbar State:

myPDF.toolbar = true;

6.27.3.4 PDF7.visible

Availability

Windows

Usage

pdf7Instance.visible:Boolean

Returns

A Boolean

Description

Controls PDF visibility.

Notes

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 453

None

Example

To Get the Visibility:

var pdfVisible = myPDF.visible;

To Set the Visibility:

myPDF.visible = true;

6.27.3.5 PDF7.width

Availability

Windows

Usage

pdf7Instance.width:Number

Returns

An Integer

Description

Width of loaded PDF instance in pixels.

Notes

None

Example

To Get the Width:

var pdfInstanceWidth = myPDF.width;

To Set the Width:

myPDF.width = 300;

6.27.3.6 PDF7.x

Availability

Windows

Usage

pdf7Instance.x:Number

Returns

An Integer

Description

Current X position of loaded PDF in pixels.

Notes

©2006 Multidmedia Limited {mdm}


454 ZINC™ v2.5 Help Manual

None

Example

To Get the X:

var currentX = myPDF.x;

To Set the X:

myPDF.x = 0;

6.27.3.7 PDF7.y

Availability

Windows

Usage

pdf7Instance.y:Number

Returns

An Integer

Description

Current Y position of loaded PDF in pixels.

Notes

None

Example

To Get the Y:

var currentY = myPDF.y;

To Set the Y:

myPDF.y = 0;

6.28 mdm.Process

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Process

Method Summary for the Process Class

The following table lists methods of the Process class

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.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 455

Process.kill() Forcefully closes (kills) the Process.

Process.killById() Forcefully closes (kills) the Process by ID.

Property Summary for the Process Class

The following table lists properties of the Process class

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

Only the last application launched will close.

Example

mdm.Process.close()

6.28.1.2 Process.create()

Availability

Windows

Usage

mdm.Process.create(title:String, xPos:Number, yPos:Number, width:Number,


height:Number, appName:String, app:String, startInFolder:String, priority:Number,
windowStatus:Number):Void

Parameters

title:String Title of the Window (Only applicable with command.com)

©2006 Multidmedia Limited {mdm}


456 ZINC™ v2.5 Help Manual

xPos:Number X Position of the Application in pixels

yPos:Number Y Position of the Application in pixels

width:Number Width of the Application in pixels

height:Number Height of the Application in pixels

appName:String Required parameter which MUST be left emply (i.e. "")

app:String Name and extension of the Application to Launch

startInFolder:String The Start Folder for the APplication

priority:Number 1 = Idle, 2 = Normal, 3 = High, 4 = Realtime

windowStatus:Number 1 = Hidden, 2 = Minimized, 3 = Maximized, 4 = Normal

Returns

Nothing

Description

Executes an application with custom parameters and creates a process for the application.

Notes

None

Example

mdm.Process.create("My Title", 0, 0, 500, 600, "", "command.com", "C:\\windows", 3,


4)

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

Only the last application launched will close.

Example

mdm.Process.kill()

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 457

6.28.1.4 Process.killById()

Availability

Windows

Usage

mdm.Process.killById(id:Number, timeout:Number):Void

Parameters

id:Number ID of the Application to Kill

timeout:Number Value set in milliseconds which forces the task to close if the initial request was not executed

Returns

Nothing

Description

Forcefully closes (kills) the application with the specified ID.

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

Returns "true" or "false" based upon the existence of a Process.

Example

var processExists = mdm.Process.isOpen;

6.28.2.2 Process.lastId

Availability

Windows

Usage

mdm.Process.lastId:Number

©2006 Multidmedia Limited {mdm}


458 ZINC™ v2.5 Help Manual

Returns

An Integer

Description

Returns the PID process ID of the last Executed Application with Process.create()

Example

var lastProcessID = mdm.Process.lastId;

6.29 mdm.QuickTime

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.QuickTime

Constructor Summary for the QuickTime Class

The following table lists constructors for the QuickTime class

Constructor Description
Inserts a QuickTime Player Instance using the specified
mdm.QuickTime()
parameters.

Method Summary for the QuickTimeClass

The following table lists methods of the QuickTime class

Method Description
QuickTime.close() Closes the QuickTime file loaded in the specified instance.
QuickTime.hide() Will hide the QuickTime Instance.

QuickTime.hideControl() Will hide the QuickTime control in the QuickTime Instance.

QuickTime.mute() Mutes the QuickTime Player.

QuickTime.play() Will play the file loaded in the QuickTime Instance.

QuickTime.show() Will show QuickTime Instance.


Will show the QuickTime control in the QuickTime
QuickTime.showControl()
Instance.
QuickTime.stop() Will stop the file loaded in the QuickTime Instance.

Property Summary for the QuickTime Class

The following table lists properties of the QuickTime class

Property Description
QuickTime.duration Returns the total length of the QuickTime Movie.
QuickTime.height Height of QuickTime Instance.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 459

Will check for the existance of the QuickTime Player on the


QuickTime.isInstalled
users system.
QuickTime.position Current position of the QuickTime Movie.

QuickTime.visible Instance visibility.

QuickTime.width Width of QuickTime Instance.

QuickTime.x The current X position of QuickTime Instance.

QuickTime.y The current Y position of QuickTime Instance.

6.29.1 Constructor
6.29.1.1 mdm.QuickTime()

Availability

Windows

Constructor

mdm.QuickTime(x:Number, y:Number, width:Number, height:Number, file:String):Void

Parameters

x:Number X position

y:Number Y Position

width:Number Width of Instance in Pixels

height:String Height if Instance in Pixels

file:String Initial QuickTime .mov File to load

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.

b) The file parameter MUST be an absolute path.

Example

Create a new Instance called myQuickTime with absolute positioning:

myQuickTime = new mdm.QuickTime(0, 0, 400, 350, "c:\\myFile.mov")

Create a new Instance called myQuickTime with relative positioning:

// t = top
// b = bottom
// l = left
// r = right
// c = center

myQuickTime = new mdm.QuickTime("c", "c", "50%", "50%", "c:\\myFile.mov")

©2006 Multidmedia Limited {mdm}


460 ZINC™ v2.5 Help Manual

6.29.2 Methods
6.29.2.1 QuickTime.close()

Availability

Windows

Usage

qtInstance.close():Void

Parameters

None

Returns

Nothing

Description

Closes the QuickTime file loaded in the specified instance.

Notes

None

Example

myQuickTime.close();

6.29.2.2 QuickTime.hide()

Availability

Windows

Usage

qtInstance.hide():Void

Parameters

None

Returns

Nothing

Description

Will hide the QuickTime Instance.

Notes

None

Example

myQuickTime.hide();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 461

6.29.2.3 QuickTime.hideControl()

Availability

Windows

Usage

qtInstance.hideControl():Void

Parameters

None

Returns

Nothing

Description

Will hide the QuickTime Playback Control in the QuickTime Instance.

Notes

None

Example

myQuickTime.hideControl();

6.29.2.4 QuickTime.mute()

Availability

Windows

Usage

qtInstance.mute():Void

Parameters

muteFlag:Boolean Boolean - true if sound is should be muted in instance.

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

©2006 Multidmedia Limited {mdm}


462 ZINC™ v2.5 Help Manual

Usage

qtInstance.play():Void

Parameters

None

Returns

Nothing

Description

Will play the file loaded in the specified instance.

Notes

None

Example

myQuickTime.play();

6.29.2.6 QuickTime.show()

Availability

Windows

Usage

qtInstance.show():Void

Parameters

None

Returns

Nothing

Description

Will show QuickTime Instance.

Notes

None

Example

myQuickTime.show();

6.29.2.7 QuickTime.showControl()

Availability

Windows

Usage

qtInstance.showControl():Void

Parameters

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 463

Returns

Nothing

Description

Will show the QuickTime Playback Control in the QuickTime Instance.

Notes

None

Example

myQuickTime.showControl();

6.29.2.8 QuickTime.stop()

Availability

Windows

Usage

qtInstance.stop():Void

Parameters

None

Returns

Nothing

Description

Will stop the Mov file loaded in the specified instance.

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

Returns the total length of the QuickTime file.

©2006 Multidmedia Limited {mdm}


464 ZINC™ v2.5 Help Manual

Notes

None

Example

var videoLength = myQuickTime.duration;

6.29.3.2 QuickTime.height

Availability

Windows

Usage

qtInstance.height:Number

Returns

An Integer

Description

Height of the QuickTime Instance.

Notes

None

Example

Get the Height:

var myQuickTimeHeight = myQuickTime.height;

Set the Height:

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

var isInstalled = myQuickTime.isInstalled;

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 465

6.29.3.4 QuickTime.position

Availability

Windows

Usage

qtInstance.position:Number

Returns

An Integer

Description

Current position of the video file in the specified instance

Notes

None

Example

Get the Position:

var currentPosition = myQuickTime.position;

Set the Position:

myQuickTime.position = 10;

6.29.3.5 QuickTime.visible

Availability

Windows

Usage

qtInstance.visible:Boolean

Returns

A Boolean

Description

Instance visibility.

Notes

None

Example

Get the Visibility:

var isVisible = myQuickTime.visible;

Set the Visibility:

myQuickTime.visible = true;

©2006 Multidmedia Limited {mdm}


466 ZINC™ v2.5 Help Manual

6.29.3.6 QuickTime.width

Availability

Windows

Usage

qtInstance.width:Number

Returns

An Integer

Description

The width of player instance .

Notes

None

Example

Get the Width:

var myQuickTimeWidth = myQuickTime.width;

Set the Width:

myQuickTime.width = 200;

6.29.3.7 QuickTime.x

Availability

Windows

Usage

qtInstance.x:Number

Returns

An Integer

Description

The current horizontal position of player instance .

Notes

None

Example

Get the X Position:

var currentX = myQuickTime.x;

Set the X Position:

myQuickTime.x = 200;

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 467

6.29.3.8 QuickTime.y

Availability

Windows

Usage

qtInstance.x:Number

Returns

An Integer

Description

The current vertical position of player instance .

Notes

None

Example

Get the Y Position:

var currentY = myQuickTime.y;

Set the Y Position:

myQuickTime.y = 200;

6.30 mdm.RealMedia

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.RealMedia

Constructor Summary for the RealMedia Class

The following table lists constructors for the RealMedia class

Constructor Description
Inserts a Real Media Player Instance using the specified
mdm.RealMedia()
parameters.

Method Summary for the RealMedia Class

The following table lists methods of the RealMedia class

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.mute() Mutes the Real Media Player Instance.

©2006 Multidmedia Limited {mdm}


468 ZINC™ v2.5 Help Manual

Will switch the Real Media control from Full Screen to


RealMedia.normalSize()
default mode.
RealMedia.play() Will Play the File loaded in the Real Media Instance.

RealMedia.pause() Will Pause the File loaded in the Real Media Instance.

RealMedia.show() Will show the Real Media Instance.

RealMedia.stop() Will stop the File loaded in the Real Media Instance.

Property Summary for the RealMedia Class

The following table lists properties of the RealMedia class

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.

RealMedia.width The Width of the Real Media Instance.

RealMedia.x The current X Position of the Real Media Instance.

RealMedia.y The current Y Position of the Real Media Instance.

6.30.1 Constructor
6.30.1.1 mdm.RealMedia()

Availability

Windows

Constructor

mdm.RealMedia(x:Number, y:Number, width:Number, height:Number, file:String):Void

Parameters

x:Number X position

y:Number Y Position

width:Number Width of Instance in Pixels

height:String Height if Instance in Pixels

file:String Initial Real Media .ram File to load

Returns

Nothing

Description

Inserts a Real Media Player Instance using the specified parameters. Multiple Instances can be created.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 469

Notes

Real Media Player must be installed on the users system for this command to function correctly.

Example

Create a new Instance called myRealMedia with absolute positioning:

myRealMedia = new mdm.RealMedia(0, 0, 400, 350, "myFile.ram")

Create a new Instance called myRealMedia with relative positioning:

// t = top
// b = bottom
// l = left
// r = right
// c = center

myRealMedia = new mdm.RealMedia("c", "c", "50%", "50%", "myFile.ram")

6.30.2 Methods
6.30.2.1 RealMedia.close()

Availability

Windows

Usage

rmInstance.close():Void

Parameters

None

Returns

Nothing

Description

Closes the File loaded in the Real Media Instance.

Notes

None

Example

myRealMedia.close();

6.30.2.2 RealMedia.hide()

Availability

Windows

Usage

rmInstance.hide():Void

Parameters

©2006 Multidmedia Limited {mdm}


470 ZINC™ v2.5 Help Manual

None

Returns

Nothing

Description

Will hide the specified Real Media Instance.

Notes

None

Example

myRealMedia.hide();

6.30.2.3 RealMedia.fullscreen()

Availability

Windows

Usage

rmInstance.fullscreen():Void

Parameters

None

Returns

Nothing

Description

Will show the Real Media control in Full Screen mode.

Notes

None

Example

myRealMedia.fullscreen();

6.30.2.4 RealMedia.mute()

Availability

Windows

Usage

rmInstance.mute():Void

Parameters

muteFlag:Boolean Boolean - true if sound is should be muted in instance.

Returns

Nothing

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 471

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

Will Play the File loaded in the Real Media Instance.

Notes

None

©2006 Multidmedia Limited {mdm}


472 ZINC™ v2.5 Help Manual

Example

myRealMedia.play();

6.30.2.7 RealMedia.pause()

Availability

Windows

Usage

rmInstance.pause():Void

Parameters

None

Returns

Nothing

Description

Will Pause the File loaded in the Real Media Instance.

Notes

None

Example

myRealMedia.pause();

6.30.2.8 RealMedia.show()

Availability

Windows

Usage

rmInstance.show():Void

Parameters

None

Returns

Nothing

Description

Will show the Real Media Instance.

Notes

None

Example

myRealMedia.show();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 473

6.30.2.9 RealMedia.stop()

Availability

Windows

Usage

rmInstance.stop():Void

Parameters

None

Returns

Nothing

Description

Will stop the File loaded in the Real Media Instance.

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

var videoLength = myRealMedia.duration;

6.30.3.2 RealMedia.height

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


474 ZINC™ v2.5 Help Manual

rmInstance.height:Number

Returns

An Integer

Description

The Height of the Real Media Instance.

Notes

None

Example

To Get the Height:

var myRealMediaHeight = myRealMedia.height;

To Set the Height:

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

var isInstalled = myRealMedia.isInstalled;

6.30.3.4 RealMedia.position

Availability

Windows

Usage

rmInstance.position:Number

Returns

An Integer

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 475

Current position of the File in the specified Real Media Instance.

Notes

None

Example

To Get the Position:

var currentPosition = myRealMedia.position;

To Set the Position:

myRealMedia.position = 10;

6.30.3.5 RealMedia.visible

Availability

Windows

Usage

rmInstance.visible:Boolean

Returns

A Boolean

Description

Instance visibility.

Notes

None

Example

To Get the Visibility:

var isVisible = myRealMedia.visible;

To Set the Visibility:

myRealMedia.visible = true;

6.30.3.6 RealMedia.width

Availability

Windows

Usage

rmInstance.width:Number

Returns

An Integer

Description

The Width of the Real Media Instance.

©2006 Multidmedia Limited {mdm}


476 ZINC™ v2.5 Help Manual

Notes

None

Example

To Get the Width:

var myRealMediaWidth = myRealMedia.width;

To Set the Width:

myRealMedia.width = 200;

6.30.3.7 RealMedia.x

Availability

Windows

Usage

rmInstance.x:Number

Returns

An Integer

Description

The current X Position of the Real Media Instance.

Notes

None

Example

To Get the X Position:

currentX = myRealMedia.x;

To Set the X Position:

myRealMedia.x = 200;

6.30.3.8 RealMedia.y

Availability

Windows

Usage

rmInstance.x:Number

Returns

An Integer

Description

The current Y Position of the Real Media Instance.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 477

Notes

None

Example

To Get the Y Position:

var currentY = myRealMedia.y;

To Get the Y Position:

myRealMedia.y = 200;

6.31 mdm.Shockwave

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.Shockwave

Constructor Summary for the Shockwave Class

The following table lists constructors for the Shockwave class

Constructor Description
Inserts a Shockwave Instance using the specified
mdm.Shockwave()
parameters.

Method Summary for the Shockwave Class

The following table lists methods of the Shockwave class

Method Description
Shockwave.close() Closes the Shockwave Instance.
Shockwave.evaluateScript() This command will trigger the EvalScript function in Lingo.

Moves the Play Head a specific frame in the Shockwave


Shockwave.goToFrame()
Instance.
Shockwave.goToMovie() Loads the specified file into the Shockwave Instance.

Shockwave.play() Plays the File in the Shockwave Instance.

Shockwave.rewind() Rewinds the File loaded in the Shockwave Instance.

Shockwave.stop() Stops the File Playback in the Shockwave Instance.

Shockwave.swBackColor() Changes the background color of the Shockwave Instance.


Sets the value for the Shockwave Player attribute:
Shockwave.swBanner()
swBanner
Shockwave.swColor() Sets the value for the Shockwave Player attribute: swColor
Sets the value for the Shockwave Player attribute:
Shockwave.swForeColor()
swForeColor
Sets the value for the Shockwave Player attribute:
Shockwave.swFrame()
swFrame
Shockwave.swAudio() Sets the value for the Shockwave Player attribute: swAudio

©2006 Multidmedia Limited {mdm}


478 ZINC™ v2.5 Help Manual

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 Summary for the Shockwave Class

The following table lists properties of the Shockwave class

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.

Shockwave.visible Visibility of Shockwave Player instance.

Shockwave.width Width of Shockwave Player instance.

Shockwave.x The current X position of the Shockwave Player instance.

Shockwave.y The current Y position of the Shockwave Player instance.

6.31.1 Constructor
6.31.1.1 mdm.Shockwave()

Availability

Windows

Constructor

mdm.Shockwave(x:Number, y:Number, width:Number, height:Number, file:String):Void

Parameters

x:Number X position

y:Number Y Position

width:Number Width of Instance in Pixels

height:String Height if Instance in Pixels

file:String Initial Shockwave .dcr File to load

Returns

Nothing

Description

Inserts an instance of the Adobe Shockwave Player using the specified parameters. Multiple Instances can be created.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 479

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

Create a new Instance called myShockwave with absolute positioning:

myShockwave = new mdm.Shockwave(0, 0, 400, 350, "myFile.dcr")

Create a new Instance called myShockwave with relative positioning:

// t = top
// b = bottom
// l = left
// r = right
// c = center

myShockwave= new mdm.Shockwave("c", "c", "50%", "50%", "myFile.dcr")

6.31.2 Methods
6.31.2.1 Shockwave.close()

Availability

Windows

Usage

shockwaveInstance.close():Void

Parameters

None

Returns

Nothing

Description

Closes the Shockwave Instance.

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

©2006 Multidmedia Limited {mdm}


480 ZINC™ v2.5 Help Manual

Usage

shockwaveInstance.evaluateScript(scriptString:String):Void

Parameters

scriptString:String Script to evaluate.

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

frame:Number Target Frame Number.

Returns

Nothing

Description

Moves the Play Head a specific frame in the Shockwave Instance.

Notes

None

Example

myShockwave.gotoFrame(20);

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 481

6.31.2.4 Shockwave.goToMovie()

Availability

Windows

Usage

shockwaveInstance.gotoMovie(filePath:String):Void

Parameters

filePath:String Path to a Shockwave File to load.

Returns

Nothing

Description

Loads the specified file into the Shockwave Instance.

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

Plays the File in the Shockwave Instance.

Notes

None

Example

myShockwave.play();

6.31.2.6 Shockwave.rewind()

Availability

Windows

©2006 Multidmedia Limited {mdm}


482 ZINC™ v2.5 Help Manual

Usage

shockwaveInstance.rewind():Void

Parameters

None

Returns

Nothing

Description

Rewinds the File loaded in the Shockwave Instance.

Notes

None

Example

myShockwave.rewind();

6.31.2.7 Shockwave.stop()

Availability

Windows

Usage

shockwaveInstance.stop():Void

Parameters

None

Returns

Nothing

Description

Stops the File Playback in the Shockwave Instance.

Notes

None

Example

myShockwave.stop();

6.31.2.8 Shockwave.swBackColor()

Availability

Windows

Usage

shockwaveInstance.swBackColor(backgroundColor:Number):Void

Parameters

backgroundColor:Number Background color.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 483

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swBackColor

Notes

None

Example

myShockwave.swBackColor("FF0000");

6.31.2.9 Shockwave.swBanner()

Availability

Windows

Usage

shockwaveInstance.swBanner(bannerText:String):Void

Parameters

bannerText:String Text string to be displayed.

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swBanner

Notes

None

Example

myShockwave.swBanner("This is my text");

6.31.2.10 Shockwave.swColor()

Availability

Windows

Usage

shockwaveInstance.swColor(instanceColor:Number):Void

Parameters

instanceColor:Number Instance color.

Returns

Nothing

Description

©2006 Multidmedia Limited {mdm}


484 ZINC™ v2.5 Help Manual

Sets the value for the Shockwave Player attribute: swColor

Notes

None

Example

myShockwave.swColor(0xFF0000);

6.31.2.11 Shockwave.swForeColor()

Availability

Windows

Usage

shockwaveInstance.swForeColor(foregroundColor:Number):Void

Parameters

foregroundColor:Number Instance Foreground Color.

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swForeColor

Notes

None

Example

myShockwave.swForeColor(0xFF0000);

6.31.2.12 Shockwave.swFrame()

Availability

Windows

Usage

shockwaveInstance.swFrame(frame:Number):Void

Parameters

frame:Number Frame to target within a loaded movie.

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swFrame

Notes

None

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 485

myShockwave.swForeColor(20);

6.31.2.13 Shockwave.swAudio()

Availability

Windows

Usage

shockwaveInstance.swAudio(filePath:String):Void

Parameters

filePath:String URL of an audio file to be played with a loaded movie.

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swAudio

Notes

None

Example

myShockwave.swAudio("c:\\myAudio.wav");

6.31.2.14 Shockwave.swList()

Availability

Windows

Usage

shockwaveInstance.swList(delimitedKeys:String):Void

Parameters

delimitedKeys:String Comma-delimited list of items.

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swList

Notes

None

Example

myShockwave.swList("val1,val2,val3,val4");

©2006 Multidmedia Limited {mdm}


486 ZINC™ v2.5 Help Manual

6.31.2.15 Shockwave.swName()

Availability

Windows

Usage

shockwaveInstance.swName(nameValue:String):Void

Parameters

nameValue:String Specify a name to be displayed or used within the movie.

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swName

Notes

None

Example

myShockwave.swName("my name");

6.31.2.16 Shockwave.swPassword()

Availability

Windows

Usage

shockwaveInstance.swPassword(passwordValue:String):Void

Parameters

passwordValue:String Password to be used within the movie

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swPassword

Notes

None

Example

myShockwave.swPassword("my password");

6.31.2.17 Shockwave.swPreLoadTime()

Availability

Windows

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 487

Usage

shockwaveInstance.swPreLoadTime(preloadTime:Number):Void

Parameters

preloadTime:Number Preload time in seconds.

Returns

Nothing

Description

Stes the value for the Shockwave Player attribute: swPreloadTime

Notes

None

Example

myShockwave.swPreLoadTime(30);

6.31.2.18 Shockwave.swSound()

Availability

Windows

Usage

shockwaveInstance.swSound(filePath:String):Void

Parameters

filePath:String Path to audio file.

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swSound

Notes

None

Example

myShockwave.swSound("c:\\myAudio.wav");

6.31.2.19 Shockwave.swText()

Availability

Windows

Usage

shockwaveInstance.swText(nameValue:String):Void

Parameters

textValue:String HTML-specified variable text in the movie.

©2006 Multidmedia Limited {mdm}


488 ZINC™ v2.5 Help Manual

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swText

Notes

None

Example

myShockwave.swText("my text");

6.31.2.20 Shockwave.swVolume()

Availability

Windows

Usage

shockwaveInstance.swVolume(soundLevel:Number):Void

Parameters

soundLevel:Number Sound level value between 0 and 10.

Returns

Nothing

Description

Sets the value for the Shockwave Player attribute: swVolume

Notes

None

Example

myShockwave.swVolume(5);

6.31.3 Properties
6.31.3.1 Shockwave.bgcolor

Availability

Windows

Usage

shockwaveInstance.bgcolor:Void

Description

Sets the BG Color of the Shockwave Instance.

Notes

None

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 489

Example

myShockwave.bgcolor = "FF0000";

6.31.3.2 Shockwave.currentFrame

Availability

Windows

Usage

shockwaveInstance.currentFrame:Number

Description

Returns the current frame of the specified Shockwave Player Instance.

Notes

None

Example

var currentFrame = myShockwave.currentFrame;

6.31.3.3 Shockwave.height

Availability

Windows

Usage

shockwaveInstance.height:Number

Description

Height of Shockwave Player instance .

Notes

None

Example

Get the Height:

var instanceHeight = myShockwave.height;

Get the Height:

myShockwave.height = 200;

6.31.3.4 Shockwave.visible

Availability

Windows

Usage

shockwaveInstance.visible:Boolean

Description

©2006 Multidmedia Limited {mdm}


490 ZINC™ v2.5 Help Manual

Instance visibility.

Notes

None

Example

Get the Visibility:

var isVisible = myShockwave.visible;

Set the Visibility:

myShockwave.visible = true;

6.31.3.5 Shockwave.width

Availability

Windows

Usage

shockwaveInstance.width:Number

Description

The width of Shockwave Player instance .

Notes

None

Example

Get the Width:

var playerInstanceWidth = myShockwave.width;

Set the Width:

myShockwave.width = 200;

6.31.3.6 Shockwave.x

Availability

Windows

Usage

shockwaveInstance.x:Number

Description

The current X position of the Shockwave Player instance.

Notes

None

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 491

Get the X Position:

var currentX = myShockwave.x;

Get the X Position:

myShockwave.x = 200;

6.31.3.7 Shockwave.y

Availability

Windows

Usage

shockwaveInstance.x:Number

Description

The current Y position of the Shockwave Player instance.

Notes

None

Example

Get the Y Position:

var currentY = myShockwave.y;

Set the Y Position:

myShockwave.y = 200;

6.32 mdm.String

Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.String

Method Summary for the Stirng Class

The following table lists methods of the String class

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.

©2006 Multidmedia Limited {mdm}


492 ZINC™ v2.5 Help Manual

6.32.1 Methods
6.32.1.1 String.position()

Availability

Windows

Usage

mdm.String.position(inputString:String, searchString:String):Number

Parameters

inputString:String String text to search within.

searchString:String String to find.

Returns

An Integer

Description

Will return the position, in characters, of the subString in the inputString.

Notes

None

Example

This example code would return the value "3":

var position = mdm.String.position("abcde", "c");

6.32.1.2 String.replace()

Availability

Windows

Usage

mdm.String.replace(inputString:String, searchString:String, insertString:String)


:String

Parameters

inputString:String String text to search within.

searchString:String String to be replaced.

insertString:String String to replace.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 493

None

Example

This example code would return the value "ab123de":

var newString = mdm.String.replace("abcde", "c", "123");

6.33 mdm.System

Availability

Zinc 2.5 (Windows, Mac OSX)

ActionScript Class Name

mdm.System

Object Summary for the System Class

The following table lists Objects of the System class

Object Description
DirectX DirectX Object
Jscript Java Script Object

Paths Paths Object

Registry Registry Object

VBscript Visual Basic Script Object

Method Summary for the System Class

The following table lists methods of the System class

Method Description
System.closeCDTray() Closes the CD Tray on the specified drive.

System.exec() Executes a File or Application.


Executes a File or Application and returns an Output
System.execStdOut()
Message.
System.execUnicode() Executes a File or Application. Unicode Compliant.

System.getDisplayModes() Returns the available system display modes to an array.

System.getFreeSpace() Returns the free space available from the drive specified.
System.getHDSerial() Returns the Hard Disk serial number.

System.getMasterVolume() Gets the master volume as a 16-bit Integer Value.


System.getNumberOfVolumes() Returns the Number of Volumes on Mac OSX.

System.getVolumeName() Returns the Volume Name of the Volume Specified.

System.getWaveBalance() Gets the balance of the wave (digital sound).

System.getWaveVolume() Gets the volume of the wave (digital sound).


System.getWindowList() Returns the running Windows to a 2 dimensional Array.

System.getResolution() Returns the current Resolution and Color Depth.

System.getTotalSpace() Returns the Total Space available from the drive specified.

©2006 Multidmedia Limited {mdm}


494 ZINC™ v2.5 Help Manual

System.hibernate() Performs a Hibernate sequence.

System.hideTaskbar() Will hide the System Taskbar.

System.logoff() Performs a Log Off sequence.

System.openCDTray() Open the CD Tray on the specified drive.


Will post a system message using the Windows API
System.postMessage()
Postmessage procedure.
System.powerOff() Performs a Power Off sequence.

System.restart() Performs a Restart Sequence.


Will send a system message to an active window to
System.sendMessage()
perform a specific task.
System.setMasterVolume() Sets the master volume as a 16-bit Integer Value.

System.setResolution() Sets the system resolution using the specified values.

System.setWindowFocus() Sets Focus to the specified window.


Sets the volume of the wave (digital sound) specified in the
System.setWaveVolume()
variable volume.
System.setWaveVolumeAdv() Sets the volume of the wave (digital sound).

System.setWaveBalance() Sets the balance of the wave (digital sound).

System.setWallpaper() Sets the desktop wallpaper the specified BMP image.

System.setWallpaperAlt() Sets the desktop wallpaper the specified BMP image.

System.showTaskBar() Will Show the System Taskbar.


System.shutDown() Will Shutdown the System.

System.suspend() Performs a Suspend sequence.

System.taskBarBlink() Makes the Projectors Taskbar Tile blink once.

Property Summary for the System Class

The following table lists properties of the System class

Property Description
System.computerCompany Default company name to whom the PC is registered.
System.computerName Default computer name.

Default owner name to whom the PC/Windows is


System.computerOwner
registered.
System.CPUSpeed Returns the system CPU speed.

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.

System.language Current Operating System Language Setting.

System.macVerString Returns the Mac OSX Version.

System.RAMSize Returns the system RAM size.

System.screenHeight Current Screen Height.

System.screenWidth Current Screen Width.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 495

System.servicePack Returns Installed Service Packs.

System.winVerString Returns the Windows Version.

System.winVerStringDetail Returns the Windows Version in greater detail.

6.33.1 Objects
6.33.1.1 System.DirectX
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.System.DirectX

Method Summary for the DirectX Class

The following table lists methods of the DirectX class

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

mdm.System.DirectX.enable(xRes:Number, yRes:Number, bitDepth:Number):Void

Parameters

xRes:Number Resolution Width

yRes:Number Resolution Height

bitDepth:Number Color Depth

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

a) Use standard DirectX resolution only. These are:

320x240
400x300
640x480
800x600

©2006 Multidmedia Limited {mdm}


496 ZINC™ v2.5 Help Manual

1024x768

b) Color depths must be set in bits as 16, 24 or 32.

c) Supported Resolutions and Color Depths are dependent on graphics hardware, and monitor.

Example

mdm.System.DirectX.enable(640, 480, 16);


6.33.1.1.1.2 System.DirectX.disable()

Availability

Windows

Usage

mdm.System.DirectX.disable():Void

Parameters

None

Returns

Nothing

Description

Disables the DirectX resolution.

Notes

None

Example

mdm.System.DirectX.disable();

6.33.1.2 System.JScript
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.System.Jscript

Method Summary for the Jscript Class

The following table lists methods of the Jscript class

Method Description
System.JScript.execute() Runs a custom JScript command.

6.33.1.2.1 Methods

Enter topic text here.

6.33.1.2.1.1 System.JScript.execute()

Availability

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 497

Windows

Usage

mdm.System.JScript.execute(codeString:String, param1:String, param2:String,


param3:String):String

Parameters

codeString:String JScript text to execute.

param1:String Parameter 1 to the Function of the JScript.

param2:String Parameter 2 to the Function of the JScript.

param3:String Parameter 3 to the Function of the JScript.

Returns

A String

Description

Runs a custom JScript command.

Notes

None

Example

var jscode = "function main (Name,b,c)\r{\rName=\"hello


\"+Name\rreturn(Name);\r}\r\r";
var results = mdm.System.JScript.execute(jscode, "","","");

6.33.1.3 System.Paths
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.System.Paths

Property Summary for the Paths Class

The following table lists properties of the Paths class

Property Description
System.Paths.allUsersAppData Path to the All Users Application Data Folder.

System.Paths.allUsersPrograms Path to the All User Programs Folder.


System.Paths.allUsersStartMenu Path to the All Users Windows Start Menu Folder.

System.Paths.allUsersStartup Path to the All Users Start Up Folder.

System.Paths.commonAdminTools Path to the Common Admin Tools Folder.

System.Paths.commonAppData Path to the Common Application Data Folder.

System.Paths.commonPrograms Path to the Common Programs Folder.

System.Paths.commonStartMenu Path to the Common Windows Start Menu Folder.

System.Paths.commonStartup Path to the Common Start Up Folder.

©2006 Multidmedia Limited {mdm}


498 ZINC™ v2.5 Help Manual

System.Paths.appData Path to the Application Data Folder.

System.Paths.cookies Path to the Cookies Folder.

System.Paths.desktop Path to the Desktop Folder.

System.Paths.favorites Path to the Favorites Folder.

System.Paths.fonts Path to the Fonts Folder.

System.Paths.history Path to the History Folder.

System.Paths.network Path to the Network Folder.

System.Paths.personal Path to the Personal Folder.

System.Paths.programs Path to the Programs Folder.

System.Paths.programFiles Path to the Program Files Folder.

System.Paths.recent Path to the Recent Folder.

System.Paths.startup Path to the Start Up Folder.

System.Paths.startMenu Path to the Windows Start Menu Folder.

System.Paths.system Path to the System Folder.

System.Paths.temp Path to the Temp Folder.

System.Paths.windows Path to the Windows Installation 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

Path to the All Users Application Data Folder.

Notes

Example Return: C:\Documents and Settings\All Users\Application Data\

Example

var myVar = mdm.System.Paths.allUsersAppData;


6.33.1.3.1.2 System.Paths.allUsersPrograms

Availability

Windows

Usage

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 499

mdm.System.Paths.allUsersPrograms:String

Returns

A String

Description

Path to the All User Programs Folder.

Notes

Example Return: C:\Documents and Settings\All Users\Start Menu\Programs\

Example

var myVar = mdm.System.Paths.allUsersPrograms;


6.33.1.3.1.3 System.Paths.allUsersStartMenu

Availability

Windows

Usage

mdm.System.Paths.allUsersStartMenu:String

Returns

A String

Description

Path to the All Users Windows Start Menu Folder.

Notes

Example Return: C:\Documents and Settings\All Users\Start Menu\

Example

var myVar = mdm.System.Paths.allUsersStartMenu;


6.33.1.3.1.4 System.Paths.allUsersStartup

Availability

Windows

Usage

mdm.System.Paths.allUsersStartup:String

Returns

A String

Description

Path to the All Users Start Up Folder.

Notes

Example Return: C:\Documents and Settings\All Users\Start Menu\Programs\Startup\

Example

©2006 Multidmedia Limited {mdm}


500 ZINC™ v2.5 Help Manual

var myVar = mdm.System.Paths.allUsersStartup;


6.33.1.3.1.5 System.Paths.commonAdminTools

Availability

Windows

Usage

mdm.System.Paths.commonAdminTools:String

Returns

A String

Description

Path to the Common Admin Tools Folder.

Notes

Example Return: C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools\

Example

var myVar = mdm.System.Paths.commonAdminTools;


6.33.1.3.1.6 System.Paths.commonAppData

Availability

Windows

Usage

mdm.System.Paths.commonAppData:String

Returns

A String

Description

Path to the Common Application Data Folder.

Notes

Example Return: C:\Documents and Settings\All Users\Application Data\

Example

var myVar = mdm.System.Paths.commonAppData;


6.33.1.3.1.7 System.Paths.commonPrograms

Availability

Windows

Usage

mdm.System.Paths.commonPrograms:String

Returns

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 501

A String

Description

Path to the Common Programs Folder.

Notes

Example Return: C:\Documents and Settings\All Users\Start Menu\Programs\

Example

var myVar = mdm.System.Paths.commonPrograms;


6.33.1.3.1.8 System.Paths.commonStartMenu

Availability

Windows

Usage

mdm.System.Paths.commonStartMenu:String

Returns

A String

Description

Path to the Common Windows Start Menu Folder.

Notes

Example Return: C:\Documents and Settings\All Users\Start Menu\

Example

var myVar = mdm.System.Paths.commonStartMenu;


6.33.1.3.1.9 System.Paths.commonStartup

Availability

Windows

Usage

mdm.System.Paths.commonStartup:String

Returns

A String

Description

Path to the Common Start Up Folder.

Notes

Example Return: C:\Documents and Settings\All Users\Start Menu\Programs\Startup\

Example

var myVar = mdm.System.Paths.commonStartup;

©2006 Multidmedia Limited {mdm}


502 ZINC™ v2.5 Help Manual

6.33.1.3.1.10 System.Paths.appData

Availability

Windows

Usage

mdm.System.Paths.appData:String

Returns

A String

Description

Path to the Application Data Folder.

Notes

Example Return: C:\Documents and Settings\User\Application Data\

Example

var myVar = mdm.System.Paths.appData;


6.33.1.3.1.11 System.Paths.cookies

Availability

Windows

Usage

mdm.System.Paths.cookies:String

Returns

A String

Description

Path to the Cookies Folder.

Notes

Example Return: C:\Documents and Settings\User\Cookies\

Example

var myVar = mdm.System.Paths.cookies;


6.33.1.3.1.12 System.Paths.desktop

Availability

Windows, Mac OSX

Usage

mdm.System.Paths.desktop:String

Returns

A String

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 503

Description

Path to the Desktop Folder.

Notes

Example Return: C:\Documents and Settings\Administrator\Desktop\

Example

var myVar = mdm.System.Paths.desktop;


6.33.1.3.1.13 System.Paths.favorites

Availability

Windows

Usage

mdm.System.Paths.favorites:String

Returns

A String

Description

Path to the Favorites Folder.

Notes

Example Return: C:\Documents and Settings\Administrator\Favorites\

Example

var myVar = mdm.System.Paths.favorites;


6.33.1.3.1.14 System.Paths.fonts

Availability

Windows

Usage

mdm.System.Paths.fonts:String

Returns

A String

Description

Path to the Fonts Folder.

Notes

Example Return: C:\Windows\Fonts\

Example

var myVar = mdm.System.Paths.fonts;

©2006 Multidmedia Limited {mdm}


504 ZINC™ v2.5 Help Manual

6.33.1.3.1.15 System.Paths.history

Availability

Windows

Usage

mdm.System.Paths.history:String

Returns

A String

Description

Path to the History Folder.

Notes

Example Return: C:\Windows\History\

Example

var myVar = mdm.System.Paths.history;


6.33.1.3.1.16 System.Paths.network

Availability

Windows

Usage

mdm.System.Paths.network:String

Returns

A String

Description

Path to the Network Folder.

Notes

Example Return: C:\Documents and Settings\User\NetHood\

Example

var myVar = mdm.System.Paths.network;


6.33.1.3.1.17 System.Paths.personal

Availability

Windows

Usage

mdm.System.Paths.personal:String

Returns

A String

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 505

Description

Path to the Personal Folder.

Notes

Example Return: C:\Documents and Settings\Administrator\My Documents\

Example

var myVar = mdm.System.Paths.personal;


6.33.1.3.1.18 System.Paths.programs

Availability

Windows

Usage

mdm.System.Paths.programs:String

Returns

A String

Description

Path to the Programs Folder.

Notes

Example Return: C:\Documents and Settings\Administrator\Start Menu\Programs\

Example

var myVar = mdm.System.Paths.programs;


6.33.1.3.1.19 System.Paths.programFiles

Availability

Windows

Usage

mdm.System.Paths.programFiles:String

Returns

A String

Description

Path to the Program Files Folder.

Notes

Example Return: C:\Program Files\

Example

var myVar = mdm.System.Paths.programFiles;

©2006 Multidmedia Limited {mdm}


506 ZINC™ v2.5 Help Manual

6.33.1.3.1.20 System.Paths.recent

Availability

Windows

Usage

mdm.System.Paths.recent:String

Returns

A String

Description

Path to the Recent Folder.

Notes

Example Return: C:\Documents and Settings\Administrator\Recent\

Example

var myVar = mdm.System.Paths.recent;


6.33.1.3.1.21 System.Paths.startup

Availability

Windows

Usage

mdm.System.Paths.startup:String

Returns

A String

Description

Path to the Start Up Folder.

Notes

Example Return: C:\Documents and Settings\Administrator\Start Menu\Programs\Startup\

Example

var myVar = mdm.System.Paths.startup;


6.33.1.3.1.22 System.Paths.startMenu

Availability

Windows

Usage

mdm.System.Paths.startMenu:String

Returns

A String

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 507

Description

Path to the Windows Start Menu Folder.

Notes

Example Return: C:\Documents and Settings\User\Start Menu\

Example

var myVar = mdm.System.Paths.startMenu;


6.33.1.3.1.23 System.Paths.system

Availability

Windows

Usage

mdm.System.Paths.system:String

Returns

A String

Description

Path to the System Folder.

Notes

Example Return: C:\Windows\System

Example

var myVar = mdm.System.Paths.system;


6.33.1.3.1.24 System.Paths.temp

Availability

Windows, Mac OSX

Usage

mdm.System.Paths.temp:String

Returns

A String

Description

Path to the Temp Folder.

Notes

Example Return: C:\Windows\Temp

Example

var myVar = mdm.System.Paths.temp;

©2006 Multidmedia Limited {mdm}


508 ZINC™ v2.5 Help Manual

6.33.1.3.1.25 System.Paths.windows

Availability

Windows

Usage

mdm.System.Paths.windows:String

Returns

A String

Description

Path to the Windows Installation Folder.

Notes

Example Return: C:\Windows\

Example

var myVar = mdm.System.Paths.windows;

6.33.1.4 System.Registry
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.System.Registry

Method Summary for the Registry Class

The following table lists methods of the Registry class

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.

System.Registry.keyExists() Will check for the existence of the specified key.


Loads the data from the specified Key in the System
System.Registry.load()
Registry.
System.Registry.loadBoolean() Returns a BOOLEAN value from the System Registry.

System.Registry.loadInteger() Returns a INTEGER value from the System Registry.

System.Registry.loadString() Returns a STRING value from the System Registry.


Loads a STRING value as a REG_MULTI_SZ type from the
System.Registry.loadMultiSz()
System Registry.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 509

System.Registry.save() Saves the specified value to the Registry Key specified.

System.Registry.saveInteger() Writes an INTEGER value to the System Registry.

System.Registry.saveString() Writes a STRING value to the System Registry.


Writes a STRING value as a REG_MULTI_SZ type to the
System.Registry.saveMultiSz()
System Registry.

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

keyBranchID:Number Branch Key Location.

keyName:String Key Name to Create.

keyDefaultValue:String Default Key Value.

Returns

Nothing

Description

Create a new Key in the System Registry at the location specified.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

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

keyBranchID:Number Branch Key Location.

keyName:String Key Name to Create.

©2006 Multidmedia Limited {mdm}


510 ZINC™ v2.5 Help Manual

Returns

Nothing

Description

Deletes the specified Registry Key.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

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

keyBranchID:Number Branch Key Location.

value:String Value to delete.

Returns

Nothing

Description

Deletes a value in the System Registry at the location specified.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

Example

mdm.System.Registry.deleteValue(3,"\\SOFTWARE\\Key\\SubKey");
6.33.1.4.1.4 System.Registry.getKeyNames()

Availability

Windows

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 511

Usage

mdm.System.Registry.getKeyNames(keyBranchID:Number, keyName:String):Array

Parameters

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

Returns

An Array

Description

Will return an array of all keys found under the specified values.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

Example

var keyNames = mdm.System.Registry.getKeyNames(3,"\\SOFTWARE\\NewKey\\SubKey");


mdm.Dilaogs.prompt(keyNames[0]);
mdm.Dilaogs.prompt(keyNames[1]);
// etc
6.33.1.4.1.5 System.Registry.getValueNames()

Availability

Windows

Usage

mdm.System.Registry.getValueNames(keyBranchID:Number, keyName:String):String

Parameters

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

Returns

A String.

Description

Will return an array of all value names found under the specified values.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

©2006 Multidmedia Limited {mdm}


512 ZINC™ v2.5 Help Manual

Example

var valueNames = mdm.System.Registry.getValueNames(3,"\\SOFTWARE\\NewKey\\SubKey");


mdm.Dilaogs.prompt(valueNames[0]);
mdm.Dilaogs.prompt(valueNames[1]);
// etc
6.33.1.4.1.6 System.Registry.hasSubKeys()

Availability

Windows

Usage

mdm.System.Registry.hasSubKeys(keyBranchID:Number, keyName:String):Boolean

Parameters

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

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

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

Example

var hasSubkeys = mdm.System.Registry.hasSubKeys(3,"\\SOFTWARE\\NewKey\\SubKey");


6.33.1.4.1.7 System.Registry.keyExists()

Availability

Windows

Usage

mdm.System.Registry.keyExists(keyBranchID:Number, keyName:String):Boolean

Parameters

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

Returns

A Boolean

Description

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 513

Will check for the existence of the specified key and return "true" if it exists, or "false" if it does not exist.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

Example

var keyExists = mdm.System.Registry.keyExists(3,"\\SOFTWARE\\NewKey\\SubKey");


6.33.1.4.1.8 System.Registry.load()

Availability

Windows

Usage

mdm.System.Registry.load(keyName:String):String

Parameters

keyName:String Key name to load.

Returns

A String

Description

Loads the data from the specified Key in the System Registry.

Notes

None

Example

var Result = mdm.System.Registry.load("\\SOFTWARE\\NewKey\\SubKey");


6.33.1.4.1.9 System.Registry.loadBoolean()

Availability

Windows

Usage

mdm.System.Registry.loadBoolean(keyBranchID:Number, keyName:String,
keyNameValue:String):String

Parameters

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

keyNameValue:String Key name to search.

Returns

©2006 Multidmedia Limited {mdm}


514 ZINC™ v2.5 Help Manual

A String.

Description

Returns a BOOLEAN value from the System Registry.

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.

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

Example

var hasValue = mdm.System.Registry.loadBoolean("3","SOFTWARE\\Microsoft\\Internet


Explorer","Version");
6.33.1.4.1.10 System.Registry.loadInteger()

Availability

Windows

Usage

mdm.System.Registry.loadInteger(keyBranchID:Number, keyName:String,
keyNameValue:String):Number

Parameters

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

keyNameValue:String Key name to search.

Returns

An Integer

Description

Returns a INTEGER value from the System Registry.

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.

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

Example

var browserVersion =

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 515

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

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

keyNameValue:String Key name to search.

Returns

A String

Description

Returns a STRING value from the System Registry.

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.

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

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

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

©2006 Multidmedia Limited {mdm}


516 ZINC™ v2.5 Help Manual

keyNameValue:String Key name to search.

Returns

A String

Description

Loads a STRING value as a REG_MULTI_SZ type from the System Registry.

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.

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

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

keyName:String Key name.

keyValue:String Key value to save.

Returns

Nothing

Description

Saves the specified value to the Registry Key specified.

Notes

The Key and Data will be saved in the Registry Location

HKEY_CURRENT_USER\Software\FormCaption\

Where FormCaption is the current Form Caption.

Example

mdm.System.Registry.save("myKey","This is my Content");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 517

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

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

keyNameValue:String Key value.

keyNameData:Boolean Key data to write.

Returns

Nothing

Description

Writes a BOOLEAN value to the System Registry.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

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

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

keyNameValue:String Key value.

keyNameData:Number Key data to write.

Returns

©2006 Multidmedia Limited {mdm}


518 ZINC™ v2.5 Help Manual

Nothing

Description

Writes an INTEGER value to the System Registry.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

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

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

keyNameValue:String Key value.

keyNameData:String Key data to write.

Returns

Nothing

Description

Writes a STRING value to the System Registry.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

Example

mdm.System.Registry.saveString(3,"\\SOFTWARE\\Microsoft\\Internet
Explorer","Version", "some string");

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 519

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

keyBranchID:Number Branch Key Location.

keyName:String Key name to search.

keyNameValue:String Key value.

keyNameData:String Key data to write.

Returns

Nothing

Description

Writes a STRING value as a REG_MULTI_SZ type to the System Registry.

Notes

The Key Branch ID can be:

'1' for HKEY_CLASSES_ROOT


'2' for HKEY_CURRENT_USER
'3' for HKEY_LOCAL_MACHINE
'4' for HKEY_USERS
'5' for HKEY_CURRENT_CONFIG

Example

mdm.System.Registry.saveMultiSz(3,"\\SOFTWARE\\Microsoft\\Internet
Explorer","Version", "some string");

6.33.1.5 System.VBScript
Availability

Zinc 2.5 (Windows)

ActionScript Class Name

mdm.System.VBScript

Method Summary for the VBScript Class

The following table lists methods of the VBScript class

Method Description
System.VBScript.execute() Runs a custom VB script command.

©2006 Multidmedia Limited {mdm}


520 ZINC™ v2.5 Help Manual

6.33.1.5.1 Methods

6.33.1.5.1.1 System.VBScript.execute()

Availability

Windows

Usage

mdm.System.VBScript.execute(codeString:String, codeFunction:String, param1:String,


param2:String, param3:String, param4:String):Void

Parameters

codeString:String VBScript text to execute.

codeFunction:String Name of Function/Subroutine to call in the VBSCript.

param1:String Parameter 1 to the Function of the VBScript.

param2:String Parameter 2 to the Function of the VBScript.

param3:String Parameter 3 to the Function of the VBScript.

param4:String Parameter 4 to the Function of the VBScript.

param5:String Parameter 5 to the Function of the VBScript.

Returns

Nothing

Description

Runs a custom Visual Basic Script command.

Notes

None

Example

var vbcode = "Sub makeshortcut (filename, url,c,d,e)\r";


vbcode += "Dim shell\r Dim urlLink\r \r Set shell = createObject
(\"Wscript.Shell\")\r";
vbcode += "Set urlLink = shell.CreateShortcut (filename)\r \r urlLink.TargetPath =
url\r";
vbcode += "urlLink.Save\rEnd Sub\r";
mdm.System.VBScript.execute(vbcode, "makeshortcut", "", "", "", "", "");

6.33.2 Methods
6.33.2.1 System.closeCDTray()

Availability

Windows

Usage

mdm.System.closeCDTray(driveLetter:String):Void

Parameters

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 521

driveLetter:String CD drive.

Returns

Nothing

Description

Closes the CD Tray on the specified drive.

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

Windows, Mac OSX

Usage

mdm.System.exec(exePath:String):Void

Parameters

exePath:String Path to file or application.

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

©2006 Multidmedia Limited {mdm}


522 ZINC™ v2.5 Help Manual

exePath:String Path to File or Application.

Returns

A String

Description

Executes the File or Application and returns the standard Command Line output of the launched application.

Notes

None

Example

var StdOut = mdm.System.execStdOut("ipconfig /all");

6.33.2.4 System.execUnicode()

Availability

Windows

Usage

mdm.System.execUnicode(exePath:String):Void

Parameters

exePath:String CD Path to file or application.

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

Windows, Mac OSX

Usage

mdm.System.getDisplayModes():Array

Parameters

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 523

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

var displayModes = mdm.System.getDisplayModes();

// displayModes[0][0] = Resolution Width


// displayModes[0][1] = Resolution Height
// displayModes[0][2] = Color Depth

6.33.2.6 System.getFreeSpace()

Availability

Windows, Mac OSX

Usage

mdm.System.getFreeSpace(drive:String):Number

Parameters

drive:String Drive letter.

Returns

An Integer

Description

Returns the free space available from the drive specified.

Notes

On Mac OSX, specify the Volume Number instead of a Drive Letter, starting from 0.

Example

var freeSpace = mdm.System.getFreeSpace("c");

6.33.2.7 System.getHDSerial()

Availability

Windows

Usage

mdm.System.getHDSerial(drive:String):String

Parameters

©2006 Multidmedia Limited {mdm}


524 ZINC™ v2.5 Help Manual

drive:String Hard Drive Letter to Check

Returns

A String

Description

Returns the Hard Disk serial number.

Notes

None

Example

var hdSerial = mdm.System.getHDSerial("c");

6.33.2.8 System.getMasterVolume()

Availability

Windows

Usage

mdm.System.getMasterVolume():Number

Parameters

None

Returns

An Integer

Description

Gets the master volume as a 16-bit Integer Value. Range 0(min)-65535(max)

Notes

None

Example

var systemVolumeLevel = mdm.System.getMasterVolume();

6.33.2.9 System.getNumberOfVolumes()

Availability

Mac OSX

Usage

mdm.System.getNumberOfVolumes():Number

Parameters

None

Returns

An Integer

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 525

Description

Returns the Number of Volumes.

Notes

None.

Example

var NumberOfVolumes = mdm.System.getNumberOfVolumes();

6.33.2.10 System.getVolumeName()

Availability

Mac OSX

Usage

mdm.System.getVolumeName(volumeNumber:String):String

Parameters

volumeNumber:String The Volume Number instead of a Drive Letter, starting from 0

Returns

A String

Description

Returns the Volume Name of the Volume Specified.

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

var volumeName = mdm.System.getVolumeName("0");

6.33.2.11 System.getWaveBalance()

Availability

Windows

Usage

mdm.System.getWaveBalance():Number

Parameters

None

Returns

An Integer

Description

Gets the balance of the wave (digital sound). Range 0(min)-100(max)

Notes

©2006 Multidmedia Limited {mdm}


526 ZINC™ v2.5 Help Manual

None

Example

var waveBalance = mdm.System.getWaveBalance();

6.33.2.12 System.getWaveVolume()

Availability

Windows, Mac OSX

Usage

mdm.System.getWaveVolume():Number

Parameters

None

Returns

An Integer

Description

Gets the volume of the wave (digital sound). Range 0(min)-255(max)

Notes

None

Example

var waveVol = mdm.System.getWaveVolume();

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

var windowList = mdm.System.getWindowList();

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 527

// displayModes[0][0] = Window Title


// displayModes[0][1] = Window ID
// displayModes[0][2] = X Pos
// displayModes[0][3] = Y Pos
// displayModes[0][4] = Width
// displayModes[0][5] = Height

6.33.2.14 System.getResolution()

Availability

Windows, Mac OSX

Usage

mdm.System.getResolution():Array

Parameters

None

Returns

An Array

Description

Returns the Current Resolution and Color Depth to an Array.

Notes

None

Example

var resolutionInfo = mdm.System.getResolution();

// resolutionInfo[0] = Width
// resolutionInfo[1] = Height
// resolutionInfo[2] = Color Depth

6.33.2.15 System.getTotalSpace()

Availability

Windows, Mac OSX

Usage

mdm.System.getTotalSpace(drive:String):Number

Parameters

drive:String Drive letter.

Returns

An Integer

Description

Returns the Total Space available from the drive specified.

Notes

On Mac OSX, specify the Volume Number instead of a Drive Letter, starting from 0.

©2006 Multidmedia Limited {mdm}


528 ZINC™ v2.5 Help Manual

Example

var freeSpace = mdm.System.getTotalSpace("c");

6.33.2.16 System.hibernate()

Availability

Windows

Usage

mdm.System.hibernate(promptOption:String, messageText:String):Void

Parameters

promptOption:String Warning Prompt Visibility.

messageText:String Warning message text.

Returns

Nothing

Description

Performs a Hibernate sequence.

Notes

promptOption can be either "ask" or "noask"

Example

Simple Usage:

mdm.System.hibernate("noask");

Advanced Usage:

mdm.System.hibernate("ask", "Are you sure you want to hibernate?");

6.33.2.17 System.hideTaskBar()

Availability

Windows

Usage

mdm.System.hideTaskBar():Void

Parameters

None

Returns

Nothing

Description

Will hide the System Taskbar.

Notes

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 529

None

Example

mdm.System.hideTaskBar();

6.33.2.18 System.logOff()

Availability

Windows

Usage

mdm.System.logOff(promptOption:String, messageText:String):Void

Parameters

promptOption:String Warning Prompt Visibility.

messageText:String Warning message text.

Returns

Nothing

Description

Performs a Log Off sequence.

Notes

promptOption can be either "ask" or "noask"

Example

Simple Usage:

mdm.System.logOff("noask");

Advanced Usage:

mdm.System.logOff("ask", "Are you sure you want to Log Off?");

6.33.2.19 System.openCDTray()

Availability

Windows

Usage

mdm.System.openCDTray(driveLetter:String):Void

Parameters

driveLetter:String CD drive.

Returns

Nothing

Description

Open the CD Tray on the specified drive.

©2006 Multidmedia Limited {mdm}


530 ZINC™ v2.5 Help Manual

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

mdm.System.postMessage(windowID:Number, messageNo:Number, wParam:Number,


lParam:Number):Void

Parameters

windowID:Number Target window identifier.

messageNo:Number Message identifier.

wParam:Number wParam value.

lParam:Number lParam value.

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

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 531

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

To retrieve a list of running windows and their IDs use mdm.System.getWindowList().

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

mdm.System.postMessage(5024, 18, 0, 0);

6.33.2.21 System.powerOff()

Availability

Windows

Usage

mdm.System.powerOff(promptOption:String, messageText:String):Void

Parameters

promptOption:String Warning Prompt Visibility.

messageText:String Warning message text.

Returns

Nothing

Description

Performs a Power Off sequence.

Notes

©2006 Multidmedia Limited {mdm}


532 ZINC™ v2.5 Help Manual

promptOption can be either "ask" or "noask"

Example

Simple Usage:

mdm.System.powerOff("noask");

Advanced Usage:

mdm.System.powerOff("ask", "Are you sure you want to Power Off?");

6.33.2.22 System.restart()

Availability

Windows, Mac OSX

Usage

mdm.System.restart(promptOption:String, messageText:String):Void

Parameters

promptOption:String Warning Prompt Visibility.

messageText:String Warning message text.

Returns

Nothing

Description

Performs a Restart sequence.

Notes

promptOption can be either "ask" or "noask"

Example

Simple Usage:

mdm.System.restart("noask");

Advanced Usage:

mdm.System.restart("ask", "Are you sure you want to Restart?");

6.33.2.23 System.sendMessage()

Availability

Windows

Usage

mdm.System.sendMessage(windowID:Number, messageNo:Number, wParam:Number,


lParam:Number):Void

Parameters

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 533

windowID:Number Target window identifier.

messageNo:Number Message identifier.

wParam:Number wParam value.

lParam:Number lParam value.

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

©2006 Multidmedia Limited {mdm}


534 ZINC™ v2.5 Help Manual

65:WM_COMPACTING
70:WM_WINDOWPOSCHANGING
71:WM_WINDOWPOSCHANGED
72:WM_POWER
74:WM_COPYDATA
75:WM_CANCELJOURNAL
78:WM_NOTIFY

Notes

To retrieve a list of running windows and their IDs use mdm.System.getWindowList().

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

mdm.System.sendMessage(5024, 18, 0, 0);

6.33.2.24 System.setMasterVolume()

Availability

Windows

Usage

mdm.System.setMasterVolume(volumeLevel:Number):Void

Parameters

volumeLevel:Number Volume level.

Returns

Nothing

Description

Sets the master volume as a 16-bit Integer Value. Range 0(min)-65535(max)

Notes

None

Example

mdm.System.setMasterVolume(0);

6.33.2.25 System.setResolution()

Availability

Windows, Mac OSX

Usage

mdm.System.setResolution(resolutionX:Number, resolutionY:Number, [
refreshRate:Number]):Void

Parameters

resolutionX:Number Horizontal resolution in pixels.

resolutionY:Number Vertical resolution in pixels.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 535

refreshRate:Number Refresh Rate to Use. Optional Parameter for Windows Only.

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

var ResChanged = mdm.System.setResolution(1024, 768);

With Refresh rate Parameter (Windows Only)

var ResChanged = mdm.System.setResolution(1024, 768, 90);

6.33.2.26 System.setWindowFocus()

Availability

Windows

Usage

mdm.System.setWindowFocus(windowID:Number):Void

Parameters

windowID:Number Window identifier.

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

Windows, Mac OSX

Usage

mdm.System.setWaveVolume(volumeLevel:Number):Void

©2006 Multidmedia Limited {mdm}


536 ZINC™ v2.5 Help Manual

Parameters

volumeLevel:Number Volume level.

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

leftVolumeLevel:Number Volume level for left channel.

rightVolumeLevel:Number Volume level for right channel.

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

volumeBalance:Number Balance level - integer between 0 and 100.

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 537

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

filePath:Number Path to bitmap file (.bmp).

Returns

Nothing

Description

Sets the desktop wallpaper the specified bmp image.

Notes

Please note that only BMP files are valid.

Example

mdm.System.setWallpaper("c:\\myImage.bmp");

6.33.2.31 System.setWallpaperAlt()

Availability

Windows

Usage

mdm.System.setWallpaperAlt(filePath:String):Void

Parameters

filePath:Number Path to bitmap file (.bmp).

Returns

Nothing

Description

Sets the desktop wallpaper the specified bmp image.

©2006 Multidmedia Limited {mdm}


538 ZINC™ v2.5 Help Manual

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

Will show the System Taskbar.

Notes

None

Example

mdm.System.showTaskBar();

6.33.2.33 System.shutDown()

Availability

Windows, Mac OSX

Usage

mdm.System.shutDown(promptOption:String, messageText:String):Void

Parameters

promptOption:String Warning Prompt Visibility.

messageText:String Warning message text.

Returns

Nothing

Description

Performs a Shut Down sequence.

Notes

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 539

promptOption can be either "ask" or "noask"

Example

Simple Usage:

mdm.System.shutDown("noask");

Advanced Usage:

mdm.System.shutDown("ask", "Are you sure you want to Power Off?");

6.33.2.34 System.suspend()

Availability

Windows

Usage

mdm.System.suspend(promptOption:String, messageText:String):Void

Parameters

promptOption:String Warning Prompt Visibility.

messageText:String Warning message text.

Returns

Nothing

Description

Performs a Suspend sequence.

Notes

promptOption can be either "ask" or "noask"

Example

Simple Usage:

mdm.System.suspend("noask");

Advanced Usage:

mdm.System.suspend("ask", "Are you sure you want to Restart?");

6.33.2.35 System.taskBarBlink()

Availability

Windows

Usage

mdm.System.taskBarBlink():Void

Parameters

None

Returns

©2006 Multidmedia Limited {mdm}


540 ZINC™ v2.5 Help Manual

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

Default company name to whom the PC is registered (if a value exists)

Notes

None

Example

var company = mdm.System.computerCompany;

6.33.3.2 System.computerName

Availability

Windows

Usage

mdm.System.computerName:String

Returns

A String

Description

Default Computer Name

Notes

None

Example

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 541

var computerName = mdm.System.computerName;

6.33.3.3 System.computerOwner

Availability

Windows

Usage

mdm.System.computerOwner:String

Returns

A String

Description

Default owner name to whom the PC/Windows is registered

Notes

None

Example

var owner = mdm.System.computerOwner;

6.33.3.4 System.CPUSpeed

Availability

Windows

Usage

mdm.System.CPUSpeed:Number

Returns

An Integer

Description

Returns the system CPU speed to the variable cpuspeed.

Notes

None

Example

var cpuSpeed = mdm.System.CPUSpeed;

6.33.3.5 System.CDDrive

Availability

Windows

Usage

mdm.System.CDDrive:String

Returns

©2006 Multidmedia Limited {mdm}


542 ZINC™ v2.5 Help Manual

A String

Description

Returns the first CD-Rom drive path present in the system.

Notes

None

Example

var cdDriveLetter = mdm.System.CDDrive;

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

var hasAdminPrivilages = mdm.System.isAdmin;

6.33.3.7 System.localTime

Availability

Windows, Mac OSX

Usage

mdm.System.localTime:Date

Returns

A Date Object

Description

Returns the Local System Time as a Date Object.

Notes

None

Example

var currentTime = mdm.System.localTime;

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 543

6.33.3.8 System.language

Availability

Windows

Usage

mdm.System.language:String

Returns

A String

Description

Current System Language Setting.

Notes

None

Example

var userLanguage = mdm.System.language;

6.33.3.9 System.macVerString

Availability

Mac OSX

Usage

mdm.System.macVerString:String

Returns

A String

Description

Mac Operating System Version

Notes

None

Example

var macVersion = mdm.System.macVerString;

6.33.3.10 System.RAMSize

Availability

Windows

Usage

mdm.System.RAMSize:Number

Returns

An Integer

©2006 Multidmedia Limited {mdm}


544 ZINC™ v2.5 Help Manual

Description

Returns the system RAM size.

Notes

None

Example

var installedRAM = mdm.System.RAMSize;

6.33.3.11 System.screenHeight

Availability

Windows, Mac OSX

Usage

mdm.System.screenHeight:Number

Returns

An Integer

Description

Current Screen Height

Notes

None

Example

var screenResolutionY = mdm.System.screenHeight;

6.33.3.12 System.screenWidth

Availability

Windows, Mac OSX

Usage

mdm.System.screenWidth:Number

Returns

An Integer

Description

Current Screen Width

Notes

None

Example

var screenResolutionX = mdm.System.screenWidth;

©2006 Multidmedia Limited {mdm}


{mdm}Script 2.0 API 545

6.33.3.13 System.servicePack

Availability

Windows

Usage

mdm.System.servicePack:String

Returns

A String

Description

Returns Service Packs installed on the System.

Notes

If no service packs are installed, the return value will be empty.

Example

var windowsServicePack = mdm.System.servicePack;

6.33.3.14 System.winVerString

Availability

Windows

Usage

mdm.System.winVerString:String

Returns

A String

Description

Returns the Windows version.

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

var windowsVersion = mdm.System.winVerString;

6.33.3.15 System.winVerStringDetail

Availability

©2006 Multidmedia Limited {mdm}


546 ZINC™ v2.5 Help Manual

Windows

Usage

mdm.System.winVerStringDetail:String

Returns

A String

Description

Returns the Windows Version in greater detail.

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

var windowsVersion = mdm.System.winVerStringDetail;

©2006 Multidmedia Limited {mdm}


Part VII
548 ZINC™ v2.5 Help Manual

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.

7.1.2 Drag & Drop SWF Files onto Zinc v2.5

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.

7.1.3 Events not Working

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();

7.1.4 Loading External SWF's

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.

7.1.5 Loading External FLV's

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");

The correct Syntax should look like this:

myMedia.setMedia(mdm.Application.path+"myMovie.flv", "FLV");

©2006 Multidmedia Limited {mdm}


Troubleshooting 549

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.

7.1.6 Moving Mac OSX Projectors to the Trash

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.

7.1.7 Using Commas in Parameters

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@.

mdm.Dialogs.prompt("Hello User@c@ how are you today?");

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@");

7.1.8 What is the Flash OCX?

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.

Why is the Flash OCX important?

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!

Will Zinc™ v2 Projectors overwrite an existing installation of the Flash OCX?

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.

©2006 Multidmedia Limited {mdm}


550 ZINC™ v2.5 Help Manual

7.1.9 What is the "ELNTFCASTEROOR" Error?

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.

7.1.10 What is the [Type Function] Error?

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.

For example, mdm.Application.filename is correct, but mdm.application.filename or


mdm.Application.FileName is incorrect.

7.2 Product Support


7.2.1 Support & Resources

MDM Support Forum

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 Software TechNotes

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

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

7.2.2 Software Updates

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.

7.2.3 Contact Support Team

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

©2006 Multidmedia Limited {mdm}


Troubleshooting 551

resource. Please visit the MDM Forum Board at http://www.mdmforum.com

Technical Support Procedure

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:

· Your Serial Number (If registered user)


· Please do NOT send compiled projectors, just the SWF file is needed.
· If you are attaching an FLA, please be sure to state clearly in your email where the problem occurs.
· Do NOT send any Attachments larger than 1mb. If your files exceed this, please upload your files to a server and provide us
with the download link.

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.

©2006 Multidmedia Limited {mdm}

You might also like