home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
1&1 Multimedia Trend 1996 10 B
/
MM_TREND.ISO
/
prog
/
t-online
/
shared.dir
/
00304_Script_304
< prev
next >
Wrap
Text File
|
1996-08-16
|
7KB
|
289 lines
-- Params
global gxMsgObj
global gsIniFile, gsGotoMovie, gsGotoFrame
global gsX, giError, gbDebug, gbIsPC
global glParamList
global gsGoMain, gsGoSub,gsCaption, gsApp
global giSoundLevel, giNoise, giMusic, giAuto
global giTmpNoise, giTmpMusic, giTmpLevel -- bei offenem slider
--*********************************
on InitParams
-- einlesen der Parameter aus dem IniFile
-- setzen des Systemwerte fⁿr Sound usw
--debug "init params"
ReadParams
-- set params
set SoundLevel = giSoundLevel
--sound FadeIn 1, 10
--sound FadeIn 2, 10
set the soundEnabled = true
end InitParams
--*********************************
on ReadParams
-- Einlesen der EintrΣge des Ini Files in eine Liste
set glParamList = []
set i = 0
set x = "12345678901234567890123456789012345678901234567890¼
12345678901234567890"
-- x ist 70 byte
--debug "readparams ..."
if not gbIsPC then
set gsMoviePath = the PathName
set giSoundLevel =4
set giAuto=0
set giNoise =1
set giMusic = 1
exit
end if
set gxMsgObj = CawXObj (mNew)
if objectP (gxMsgObj) then
set gsGoMain = ""
set gsGoSub = ""
set giSoundLevel = 2
put gxMsgObj (mReadPrivateProfileString,¼
"director","Caption","Loader", gsIniFile, 64) into x
setAt glParamList, 1, x
set gsCaption = x
put gxMsgObj (mReadPrivateProfileString,¼
"director","GoMain","X", gsIniFile, 64) into x
setAt glParamList, 2, x
set gsGoMain = x
put gxMsgObj (mReadPrivateProfileString,¼
"director","GoSub","Y",gsIniFile, 64) into x
setAt glParamList, 3, x
set gsGoSub = x
put gxMsgObj (mReadPrivateProfileString,¼
"director","SoundLevel","3", gsIniFile, 64) into x
setAt glParamList, 4, x
set giSoundLevel = value(x)
put gxMsgObj (mReadPrivateProfileString,¼
"director","SoundNoise","1", gsIniFile, 64) into x
setAt glParamList, 5, x
set giNoise = value(x)
put gxMsgObj (mReadPrivateProfileString,¼
"director","SoundMusic","1", gsIniFile, 64) into x
setAt glParamList, 6, x
set giMusic = value(x)
put gxMsgObj (mReadPrivateProfileString,¼
"director","Auto","0", gsIniFile, 64) into x
setAt glParamList, 7, x
set giAuto = value(x)
put gxMsgObj (mReadPrivateProfileString,¼
"director","Debug","0", gsIniFile, 64) into x
set gbDebug = (value(x) = 42)
put gxMsgObj (mReadPrivateProfileString,¼
"director","App","TONL", gsIniFile, 64) into x
-- redefine, falls alle sin einem pfad
--debug "App: " & x
if x = "ISDN" then
set gbISDN = true
end if
-- release
put gxMsgObj(mDispose) into x
set giTmpMusic = giMusic
set giTmpNoise = giNoise
set giTmpLevel = giSoundLevel
else
fehler 1, "Ini-EintrΣge nicht gefunden"
end if
--debug "Params = :" & glParamList
end ReadParams
--***************************************************
on WriteParams
-- in die ini datei schreiben
--debug "write params"
set x=0
set s = "-----"
if not gbIsPC then
exit
end if
set gxMsgObj = CawXObj (mNew)
if objectP (gxMsgObj) then
put gxMsgObj (mWritePrivateProfileString,¼
"director","GoMain", gsGoMain, gsIniFile) into x
put gxMsgObj (mWritePrivateProfileString,¼
"director","GoSub", gsGoSub, gsIniFile) into x
set s = string(giSoundLevel)
put gxMsgObj (mWritePrivateProfileString,¼
"director","SoundLevel", s, gsIniFile) into x
set s = string(giNoise)
put gxMsgObj (mWritePrivateProfileString,¼
"director","SoundNoise", s, gsIniFile) into x
set s = string(giMusic)
put gxMsgObj (mWritePrivateProfileString,¼
"director","SoundMusic", s, gsIniFile) into x
set s = string(giAuto)
put gxMsgObj (mWritePrivateProfileString,¼
"director","Auto", s, gsIniFile) into x
set s = gsApp
put gxMsgObj (mWritePrivateProfileString,¼
"director","App", s, gsIniFile) into x
-- ---------release ----
put gxMsgObj(mDispose) into x
else
fehler 1, "basis nicht gefunden"
end if
end WriteParams
--*************************************************
on ChageParams Was, Wert1, Wert2
-- setzen der einzelnen Parameter
if Was = "go" then
end if
if Was = "sndl" then
-- find kennung
-- setzte zeile
set the soundlevel to Wert1
end if
WriteParams
end ChangeParams
--*************************************************
on SendParams
-- ⁿbergabbe an das basis modul
set x = 0
set s = "---"
set s = gsCaption
if not gbIsPC then
exit
end if
set gxMsgObj = CawXObj (mNew)
if objectP (gxMsgObj) then
-- ErklΣrung siehe unten
put gxMsgObj (mPostMessage, "HaHiHo", s, 1,"Message1",0,0 )¼
into x
put gxMsgObj(mDispose) into x
else
fehler 1, "cawMsg nicht gefunden"
end if
end
--*************************************************
on ShowParams
global gsCrLf
put "Goto" & gsGoMain & " , " & gsGoSub & gscrlf into field "info"
put "Caption " & gsCaption after field "info"
put "SoundLevel " & giSoundLevel & gscrlf after field "info"
put "Noise " & giNoise & gscrlf after field "info"
put "Music " & giMusic & gscrlf after field "info"
put "Auto " & giAuto & gscrlf after field "info"
end
-- Bspl Script von CAW
--GENERIC.EXE
--Testprogramm fⁿr PostMessage: Klasse "HaHiHo"
-- Capiton "Test von cawXobj"
--Reagiert mit MsgBox auf "Message1" und "Message2"
-- -----------------------------------------------------------------------
-- -----------------------------------------------------------------------
--Testaufruf fⁿr Message-Window im Director:
on CawDemo
OpenXLib "cawxobj"
set Obj=CawXobj(mNew)
-- Klasse Caption Typ Nachricht wParam lParam
--
put Obj(mPostMessage, "HaHiHo", "", 1, "Message1", 0, 0)
put Obj(mPostMessage, "", "Test von cawXobj", 2, "Message1", 0, 0)
put Obj(mPostMessage, "HaHiHo", "Test von cawXobj", 3, "Message1", 0, 0)
put Obj(mPostMessage, "", "", 0, "Message1", 0, 0)
--
put Obj(mWritePrivateProfileString,"TEST","1","TraLaLa","e:\cawxobj.ini")
put Obj(mReadPrivateProfileString, "TEST","2","TraLaLa","e:\cawxobj.ini",100)
--
-- Besser noch nicht testen -- put Obj(mSendMessage,"HaHiHo","Message2",0,0)
Obj(mDispose)
CloseXLib "cawxobj"
end cawdemo