home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Magazin 1995 May
/
TYPEMANIA.ISO
/
rom.dir
/
00001_Script_1
next >
Wrap
Text File
|
1994-02-26
|
6KB
|
197 lines
--here comes a procedure for buttonreactions
--this ist the Version 0.9 from 16.9.94
--⌐Retina,1994
on ButtonHdl theChannel, Type, ScriptToExecute,BaloonSprite,TextSprite,BaloonText
global gMovement
set flag=0
set myCast=the castNum of sprite theChannel
set myLocH=the locH of sprite theChannel
set myLocV=the locV of sprite theChannel
--set the text of cast 5 to "Type erkannt als: "&string(type)
-- "type" 0: bedeutet normales Ersetzen
-- "type" 1: bedeutet Verschiebung um gMovement
-- "type" 2: bedeutet 1 + Baloon
-- "type" 3: bedeutet 2 + Baloon
if Type=0 then
-- normales Ersetzen
set the castnum of sprite theChannel to myCast+1
updatestage
repeat while the mousedown
if not rollover(theChannel) then exit repeat
end repeat
if rollover(theChannel) then set flag = 1
set the castNum of sprite theChannel to myCast
updatestage
else if Type=1 then
-- Verschiebung
set the locH of sprite theChannel to myLocH+gMovement
set the locV of sprite theChannel to myLocV+gMovement
updatestage
repeat while the mousedown
if not rollover(theChannel) then exit repeat
end repeat
if rollover(theChannel) then set flag = 1
set the locH of sprite theChannel to myLocH
set the locV of sprite theChannel to myLocV
updatestage
else if Type=2 then
-- Ersetzen+Baloon
if not (baloonText=empty) then
if not(stringp (baloontext)) then
alert "kein Text vorhanden"
exit
end if
end if
set the castnum of sprite theChannel to myCast+1
set the locH of sprite BaloonSprite to the mouseH
set the locV of sprite BaloonSprite to the mouseV
set the visibility of sprite BaloonSprite to true
set the locH of sprite Textsprite to the mouseH+5
set the locV of sprite Textsprite to the mouseV+5
set the text of cast(the castnum of sprite TextSprite) to Baloontext
--nun ⁿberprⁿfe, ob der Text auch pa▀t
set ht=the height of cast(the castnum of sprite Textsprite)
set bt=the height of cast(the castnum of sprite Baloonsprite)
if ht>bt then
set temp to integer((the number of chars in Baloontext)*(float(bt-19)/float(ht))-25)
set the text of cast(the castnum of sprite TextSprite) to chars(Baloontext,1,temp)
end if
set the visibility of sprite Textsprite to true
updatestage
repeat while the mousedown
if not rollover(theChannel) then exit repeat
end repeat
if rollover(theChannel) then set flag = 1
set the castNum of sprite theChannel to myCast
set the visibility of sprite Baloonsprite to false
set the visibility of sprite Textsprite to false
updatestage
else if Type=3 then
-- Verschieben+Baloon
set the locH of sprite theChannel to myLocH+gMovement
set the locV of sprite theChannel to myLocV+gMovement
updatestage
repeat while the mousedown
if not rollover(theChannel) then exit repeat
end repeat
if rollover(theChannel) then set flag = 1
set the locH of sprite theChannel to myLocH
set the locV of sprite theChannel to myLocV
updatestage
else if Type =4 then
puppetsound "Mouse Down"
--ersetzen und verschieben
set the castnum of sprite theChannel to myCast+1
set the locH of sprite theChannel to myLocH+gMovement
set the locV of sprite theChannel to myLocV+gMovement
updatestage
repeat while the mousedown
if not rollover(theChannel) then exit repeat
end repeat
puppetsound 0
if rollover(theChannel) then set flag = 1
set the locH of sprite theChannel to myLocH
set the locV of sprite theChannel to myLocV
set the castNum of sprite theChannel to myCast
updatestage
--not yet defined
else
exit
end if
if flag then
do scriptToExecute
--updateStage
end if
end ButtonHdl
on StartMovie
global gSnd, gMovement
set gMovement=2
if the quickTimePresent=false then
alert "Fⁿr diese Anwendung ben÷tigen Sie Quicktime"
end if
set the mousedownscript to "BackToTheRoot"
end StartMovie
on BackToTheRoot
if the optiondown then go to frame 75
end BackToTheRoot
on InitCursor ID, RangeStart, RangeEnd
cursor 133
repeat with n=RangeStart to RangeEnd
set the cursor of sprite n to ID
end repeat
end InitCursor
on playMoov
global play
set play=1
set the Movierate of sprite 12 to 1
end playMoov
on stopMoov
global play
set play=0
set the movierate of sprite 12 to 0
end stopMoov
on FlashRoller whichChannel, scriptToExecute
set myCast = the castNum of sprite whichChannel
set flag = 0
set the castNum of sprite whichChannel = myCast+1
updateStage
repeat while the mouseDown
if not rollover(whichChannel) then exit repeat
end repeat
if rollover(whichChannel) then set flag = 1
set the castNum of sprite whichChannel = myCast
updateStage
if flag then
do scriptToExecute
updateStage
end if
end FlashRoller
on soundcontrol
global snd
repeat while the mousedown
set mousepos=the mouseV
set the locH of sprite 24 to constrainH(13, the mouseH)
set the locV of sprite 24 to constrainV(13, mousepos)
set the visibility of sprite 14+snd to false
--nun kommt die genaue Abfrage
set Regler=constrainV(13, mousepos)
set snd=integer((regler-280)/10)
set the visibility of sprite 14+snd to true
updatestage
end repeat
end soundcontrol
on hyperclick Text, Highlight
--set DasWort=
set the text of cast 5 to word (the mouseword) of the text of cast (the castnum of sprite Text)
hilite word (the mouseword) of field (the castnum of sprite Text)
repeat while the mousedown
if not rollover(Text) then exit repeat
end repeat
--set the hilite of sprite Text to false
--set the selend to 0
hilite char 32000 of field (the castnum of sprite Text)
updatestage
end hyperclick