home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Stock Market: Browser - Disc 1
/
TheStockMarketRoyaltyFreeImages-BrowserDisc1-WinMac.bin
/
pc
/
English-US
/
Main.dir
/
00003_Script_TSMButton
< prev
next >
Wrap
Text File
|
2000-02-10
|
2KB
|
116 lines
property SpriteNum, buttNameUp, buttNameRoll, buttNameDown, onScreen, Status, ShadowSprite, hpos, vpos, shadowPosH, shadowPosV, myJob
on new me, spriteNumber, buttonName, h2Pos, v2Pos, Stat, buttonJob
put stat into Status
if status = 0 then
set the loc of sprite SpriteNum to point (9000,9000)
end if
put h2Pos into hPos
put v2Pos into vPos
put SpriteNumber into SpriteNum
put buttonName&"Up" into buttNameUp
put buttonName&"UpRoll" into buttNameRoll
put buttonName&"Down" into buttNameDown
put buttonJob into myJob
return me
end
on everyframe me
if status = 1 then
if rollover(SpriteNum) then
set the member of sprite SpriteNum = member buttNameRoll of castlib "buttons16"
else
set the member of sprite SpriteNum = member buttNameUp of castlib "buttons16"
end if
end if
return me
end
on activate me
if status = 2 then
do myJob
end if
if status = 1 then
BDN1
set status = 2
if hPos <> 0 then
set the loc of sprite SpriteNum to point(hPos,vPos)
end if
set the member of sprite SpriteNum = member buttNameDown of castlib "buttons16"
updateStage
do myJob
exit
end if
return me
end
on superActivate me
set status = 2
if hPos <> 0 then
set the loc of sprite SpriteNum to point(hPos,vPos)
end if
set the member of sprite SpriteNum = member buttNameDown of castlib "buttons16"
return me
end
on SuperDeActivate me
set the member of sprite SpriteNum = member buttNameUp of castlib "buttons16"
set status = 1
if hPos <> 0 then
set the loc of sprite SpriteNum to point(hPos,vPos)
end if
return me
end
on deactivate me
set the member of sprite SpriteNum = member buttNameUp of castlib "buttons16"
set status = 1
return me
end
on TurnOn Me
-- if status <> 1 then
set the loc of sprite SpriteNum to point(hPos,vPos)
set status = 1
-- end if
return me
end
on TurnOff me
set the loc of sprite SpriteNum to point (9000,9000)
set status = 0
return me
end