home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 111
/
3DW_111.iso
/
pc
/
Menu
/
Scenes
/
home.dir
/
00032_Script_banner_handler
< prev
next >
Wrap
Text File
|
2008-09-12
|
2KB
|
122 lines
global gRootPath
global gDiv
property infoFile
property holdTime
property bImage
property bURL
property infoLength
property spritenum
property Sp
property Clock
property BannerLine
property BannerTime
property displayMem
on beginsprite me
displayMem = new(#animgif)
displayMem.name = "stub_image_holder"
BannerTime = 300
BannerLine = 1
Sp = sprite(me.spritenum)
Sp.member = DisplayMem
-- member("stub_image_holder").type = #animgif
-- theNetID = getNetText (gRootPath & divi & "menu" & divi & "banners" & divi & "BannerList.txt")
theNetID = getNetText (gRootPath & "MENU" & gDiv & "banners" & gDiv & "BannerList.txt")
if netDone(theNetID) then
member("bList").text = netTextResult(theNetID)
end if
infoLength = member("bList").line.count
-- put infoLength
setDefaultBanner
end
on setDefaultBanner
bImage = line(1) of member("bList").text
bURL = line(2) of member("bList").text
-- put bImage
-- put bURL
RotateBanner
end
on RotateBanner me
-- member(2).erase()
imageLoc = gRootPath & "menu" & gDiv & "banners" & gDiv & bImage
put imageLoc
displayMem.linked = 1
displayMem.filename = imageLoc
displaymem.name = "stub_image_holder"
Clock = 0
end
on mouseEnter me
cursor 280
end
on mouseLeave me
cursor -1
end
on mouseup me
gotonetpage(bURL, bURL)
end
on Exitframe me
Clock = Clock + 1
if Clock >= BannerTime then
bannerline = bannerLine +2
if line(BannerLine) of member("bList").text = "" then
bannerLine = 1
end if
bImage = line(BannerLine) of member("bList").text
bURL = line(BannerLine +1) of member("bList").text
rotateBanner
end if
end