Jump to content
  • 0

аналоговые часы


v4567
 Share

Question

Здравствуйте форумчане. Скачал скрипт, часы с циферблатом. Циферблат сделан gif изображением, часы сделыны javascript, тоесть все часы состоят из файла html и gif. При запуске изображается только циферблат, стрелок нет. Открывал браузерами Opera v. 9.63 и IE v. 7.05730.13 одинаково в обоих только циферблат без стрелок. Разобраться в скрипте не смог, не пойму в чём проблема в javascript или в html в теге <OBJECT>. Поэтому пишу в тематику javascript.

Далее привожу код:

<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<script language="JavaScript">
<!--
// © 2000, Urs Dudli и Peter Gehrig

var now

var second
var minute
var hour

var degreeSecond
var degreeMinute
var degreeHour

var timer
var stepDegree=6
var stepDegreeHour=30

function checkTime() {
if (document.all) {
now=new Date()
second=now.getSeconds()
minute=now.getMinutes()
hour=now.getHours()
if (hour>=12) {hour=hour-12}
spinIt()
timer=setTimeout("checkTime()",200)
}
}

function spinIt() {
window.status=hour
secondObj.SetIdentity()
minuteObj.SetIdentity()
hourObj.SetIdentity()

degreeSecond=180+stepDegree*second
degreeMinute=180+stepDegree*minute
degreeHour=180+stepDegreeHour*hour+(Math.floor(stepDegree*minute/12))

secondObj.Rotate(0,0,degreeSecond)
minuteObj.Rotate(0,0,degreeMinute)
hourObj.Rotate(0,0,degreeHour)
}

//-->
</script>

<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Настенные часы</title>

</head>
<body onLoad="checkTime()">

<DIV style="position:absolute;top:40px;left:40px">

<DIV style="position:absolute;top:0px;left:0px">
<img src="bgclock.gif" width="100" height="102">
</DIV>

<DIV style="position:absolute;top:0px;left:0px">
<OBJECT ID="secondObj" STYLE="width:100px;height:102px" CLASSID="CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" width="14" height="14">
<PARAM NAME="HighQuality" VALUE="1">
<PARAM NAME="Line0001" VALUE="SetFillStyle(1)">
<PARAM NAME="Line0002" VALUE="SetLineColor(80,20,20)">
<PARAM NAME="Line0003" VALUE="SetFillColor(80,20,20)">
<PARAM NAME="Line0004" VALUE="Rect(0,0,1,32)">
</OBJECT>
</DIV>

<DIV style="position:absolute;top:0px;left:0px">
<OBJECT ID="minuteObj" STYLE="width:100px;height:102px" CLASSID="CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" width="14" height="14">
<PARAM NAME="HighQuality" VALUE="1">
<PARAM NAME="Line0001" VALUE="SetFillStyle(1)">
<PARAM NAME="Line0002" VALUE="SetLineColor(50,50,50)">
<PARAM NAME="Line0003" VALUE="SetFillColor(50,50,50)">
<PARAM NAME="Line0004" VALUE="Rect(0,0,1,30)">
</OBJECT>
</DIV>

<DIV style="position:absolute;top:0px;left:0px">
<OBJECT ID="hourObj" STYLE="width:100px;height:102px" CLASSID="CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" width="14" height="14">
<param name="SourceURL" value>
<param name="CoordinateSystem" value="0">
<param name="MouseEventsEnabled" value="0">
<param name="HighQuality" value="0">
<param name="PreserveAspectRatio" value="-1">
</OBJECT>
</DIV>
</DIV>
</body>
</html>

Дорогие форумчане кто знает в чём причина помогите пожалуйста, хотябы в двух словах, или приблизительно, я дальше постораюсь разобраться сам. За помощь заранее благодарен.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy