on timeManage
global hour,minute,second
--
put the long time into nowTime
if chars (nowtime,2,2) = ":" then
put chars(nowtime,1,1) into Hour
put chars(nowtime,3,4) into minute
put chars(nowtime,6,7) into second
else
put chars(nowtime,1,2)into Hour
put chars(nowtime,4,5) into minute
put chars(nowtime,7,8) into second
end if
end
on hourDraw
global hour,minute
--
if hour>=13 then set hour=hour-12
if hour=12 or hour=24 then set hour=0
--
set hourMin to hour*5+minute/12.0
set hourRad = abs(pi()*(0.50-(hour*5+minute/12)/30.0))
--
if hourMin = 0 or hourMin=60 then
puppetsprite 6,false
puppetsprite 5,true
set x=rect(157,100,163,160)
set the rect of sprite 5 to x
else if hourMin>0 and hourMin <15 then
set x= rect (160, 160-60*sin(hourRad), 160+60*cos(hourRad), 160)
set the rect of sprite 5 to x
else if hourMin =15 then
set x=rect(160,157,220,163)
set the rect of sprite 5 to x
else if hourMin>15 and hourMin <30 then
puppetsprite 5,false
puppetsprite 6,true
set x= rect(160,160,160+60*cos(hourRad),160+60*sin(hourRad))
set the rect of sprite 6 to x
else if hourMin =30 then
puppetsprite 6,false
puppetsprite 5,true
set x=rect(157,160,163,220)
set the rect of sprite 5 to x
else if hourMin >30 and hourMin <45 then
set x=rect(160+60*cos(hourRad),160,160,160+60*sin(hourRad))
set the rect of sprite 5 to X
else if hourMin=45 then
puppetsprite 5,false
puppetsprite 6,true
set x=rect (100,157,160,163)
set the rect of sprite 6 to x
else if hourMin>45 and hourMin <60 then
set x=rect(160+60*cos(hourRad),160+60*sin(hourRad),160,160)
set the rect of sprite 6 to X
end if
end