image.xpos = view.sizex - 20;
image.ypos = 15;
image.sizex = 11;
image.sizey = 11;
image.func = FCC_viewclose;
local image = view.find("btn_Test");
image.enable = 1;
image.xpos = 470;
image.ypos = 280;
image.sizex = 18;
image.sizey = 20;
image.event =
function(object,event)
-- 绘制底图
local view = object.mainview;
--DrowViewBG(view,245310,8,7)
this.spImage(view.xpos + 140,view.ypos + 150,239502)
this.spComBox(view.xpos + 20,view.ypos +20,view.xpos + 260,view.ypos + 300,7,0)
this.spComBox(view.xpos + 270,view.ypos +20,view.xpos + 570,view.ypos + 300,7,0)
this.spText(view.xpos + 30,view.ypos +30,3,"$4你准备好了吗?")
this.spText(view.xpos + 40,view.ypos +60,11,"$c小$d老$e鼠$f大$g转$h盘")
this.spText(view.xpos + 22,view.ypos +250,3,"$4每转一次消耗$62$4张")
this.spImage(view.xpos + 180,view.ypos + 255,27491)
this.spImage(view.xpos + 320,view.ypos + 80,245314)
this.spImage(view.xpos + 320,view.ypos + 210,245314)
this.spImage(view.xpos + 380,view.ypos + 80,245314)
this.spImage(view.xpos + 380,view.ypos + 210,245314)
this.spImage(view.xpos + 440,view.ypos + 80,245314)
this.spImage(view.xpos + 440,view.ypos + 210,245314)
this.spImage(view.xpos + 500,view.ypos + 80,245314)
this.spImage(view.xpos + 500,view.ypos + 210,245314)
this.spImage(view.xpos + 320,view.ypos + 210 - ls_this_y1,ls_this_bg1)
this.spImage(view.xpos + 380,view.ypos + 210 - ls_this_y2,ls_this_bg2)
this.spImage(view.xpos + 440,view.ypos + 210 - ls_this_y3,ls_this_bg3)
this.spImage(view.xpos + 500,view.ypos + 210 - ls_this_y4,ls_this_bg4)
if ks == 1 then
Audio.Bell(54,320)
math.randomseed(os.time())
local sjs = math.random(1,3)
ls_this_y1 = ls_this_y1 + sjs;
if ls_this_y1 > 140 then
ls_this_bg1 = math.random(26551,26554)
ls_this_y1 = 0
end
sjs = math.random(1,3)
ls_this_y2 = ls_this_y2 + sjs;
if ls_this_y2 > 140 then
ls_this_bg2 = math.random(26551,26554)
ls_this_y2 = 0
end
sjs = math.random(1,3)
ls_this_y3 = ls_this_y3 + sjs;
if ls_this_y3 > 140 then
ls_this_bg3 = math.random(26551,26554)
ls_this_y3 = 0
end
sjs = math.random(1,3)
ls_this_y4 = ls_this_y4 + sjs;
if ls_this_y4 > 140 then
ls_this_bg4 = math.random(26551,26554)
ls_this_y4 = 0
end
if os.time() - o_time > 5 then
ls_this_y1 = 60
ls_this_y2 = 60
ls_this_y3 = 60
ls_this_y4 = 60
o_time = os.time()
if ls_this_bg1 == ls_this_bg2 == ls_this_bg3 == ls_this_bg4 then
Cli.SysMessage("恭喜您大奖啦!!",4,3);
else
Cli.SysMessage("只差一点点就中奖了,再加油喔!!",4,3);
view.find("yanhuashow0").xpos = 0;
view.find("yanhuashow1").xpos = 200;
view.find("yanhuashow2").xpos = 400;
view.find("yanhuashow3").xpos = 600;
end
ks = 0
end
end
local image = object;
-- 鼠标进入事件
if event == Cevent.mouseover then
Image.TestButtonPro(view,object,24,4,"$3开始小老鼠转盘")
else
Image.TestButtonPro(view,object,24,4,"$5开始小老鼠转盘")
end
-- 鼠标单击事件
if event == Cevent.click then
ks = 1;
o_time = os.time()
ls_this_bg1 = math.random(26551,26554)
ls_this_bg2 = math.random(26551,26554)
ls_this_bg3 = math.random(26551,26554)
ls_this_bg4 = math.random(26551,26554)
ls_this_y1 = 0
ls_this_y2 = 0
ls_this_y3 = 0
ls_this_y4 = 0
view.find("yanhuashow0").xpos = 9999;
view.find("yanhuashow1").xpos = 9999;
view.find("yanhuashow2").xpos = 9999;
view.find("yanhuashow3").xpos = 9999;
end
-- 鼠标单击结束事件
if event == Cevent.clickover then
--image.imageID = 244312;
end
end
end
文档更新时间: 2019-07-30 12:53 作者:admin