home *** CD-ROM | disk | FTP | other *** search
- global gMasterObj, gVideoObj, gSoundObj, gMenuObj, gCustompath, gWindowspath, gDirutil, gIniobj, gVideopath
-
- on startMovie
- set the exitLock to 1
- if voidp(gCustompath) then
- set gCustompath to the pathName
- end if
- set the actorList to []
- set gMasterObj to new(script "masterScript")
- set gVideoObj to new(script "videoScript")
- set gSoundObj to new(script "soundScript")
- set gMenuObj to new(script "menuScript")
- autoWebLink(gMasterObj)
- shutDownWebLink(gMasterObj)
- if the runMode <> "Author" then
- set gVideopath to gCustompath
- set gWindowspath to getOSDirectory()
- set gWindowspath to gWindowspath & "\"
- if gWindowspath = 0 then
- alert("Cannot Locate Windows System Folder." & RETURN & "Please call In Chair Viewing Technical Support on" & RETURN & "0171 486 6760")
- quit()
- end if
- setMeUp()
- end if
- end
-
- on setMeUp
- init()
- install()
- close()
- end
-
- on init
- openXLib(gCustompath & "Dirutil")
- openXLib(gCustompath & "Iniobj")
- set gDirutil to DirUtil(mnew)
- set gIniobj to IniObj(mnew)
- end
-
- on install
- CopyFile(gWindowspath & "system.ini", gWindowspath & "system.bak")
- CopyFile(gWindowspath & "win.ini", gWindowspath & "win.bak")
- gIniobj(mWriteStr, gWindowspath & "system.ini", "mci", "ICVVideo", "mciavi.drv")
- gIniobj(mWriteStr, gWindowspath & "win.ini", "extensions", "icv", "mplayer.exe ^.icv")
- gIniobj(mWriteStr, gWindowspath & "win.ini", "embedding", "ICVFile", "Video Clip,Video Clip,C:\mplayer.exe /icv,picture")
- gIniobj(mWriteStr, gWindowspath & "win.ini", "embedding", "AVIFile", EMPTY)
- gIniobj(mWriteStr, gWindowspath & "win.ini", "mci extensions", "icv", "AVIVideo")
- gIniobj(mWriteBool, gWindowspath & "win.ini", "mciavi", "skipframes", 1)
- end
-
- on remove
- CopyFile(gWindowspath & "win.bak", gWindowspath & "win.ini")
- CopyFile(gWindowspath & "system.bak", gWindowspath & "system.ini")
- DeleteFile(gWindowspath & "win.bak")
- DeleteFile(gWindowspath & "system.bak")
- end
-
- on close
- if objectp(gDirutil) then
- gDirutil(mdispose)
- end if
- if objectp(gIniobj) then
- gIniobj(mdispose)
- end if
- closeXLib(gCustompath & "Dirutil")
- closeXLib(gCustompath & "Iniobj")
- end
-