Hi
My brain seems to have stopped working.
I have posted a file called "clockLate.svg" at
http://www.ByersHostingGeorge.co.uk/test/clockLate.svg
It works well and I am grateful to Adobe for the Script.
What I would like to do is to create a Red Segment of a circle that
trails behind the 'Minute' hand.
The size of the segment would reflect the value of the "MinutesLate"
variable shown in the JavaScript.
I have spent a load of time trying to create the script to do it -
UnSuccessfully !!
I would be forever in the debt of anyone that provides the extra
lines of Script to do this.
Thank you, in anticipation (I hope)
Pete (Northolt UK)
====================================================================
The Script is also shown below
====================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
"http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
<!-- NOTICE: © [1999-2001] Adobe Systems Incorporated. Adobe
hereby grants you the rights to reproduce, modify and distribute this
file and its contents, not including any fonts, audio files or raster
images included or embedded in or linked to this file,
(the "Software"), and to grant such rights to other parties subject
to the following: This notice shall be included in any copy of the
Software or any portion thereof. THE SOFTWARE IS PROVIDED TO YOU AS-
IS, WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL ADOBE BE
LIABLE TO YOU OR ANY OTHER PARTY FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE.
-->
<svg onload="SetTime(evt)" preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg" zoomAndPan="magnify">
<title>SVG analog clock</title>
<desc>this clock gets the current time from the client's system and
converts it to an analog display</desc>
<defs>
<script language="Javascript">
<![CDATA[
function SetTime(LoadEvent)
{
var Now = new Date();
var Seconds = Now.getSeconds();
var Minutes = Now.getMinutes() + Seconds / 60;
var Hours = Now.getHours() + Minutes / 60;
var MinutesLate = 10;
var SVGDocument = LoadEvent.getTarget().getOwnerDocument
();
SVGDocument.getElementById("seconds").setAttribute
('transform', 'rotate(' + (Seconds * 6) + ')');
SVGDocument.getElementById("minutes").setAttribute
('transform', 'rotate(' + (Minutes * 6) + ')');
SVGDocument.getElementById("hours").setAttribute
('transform', 'rotate(' + (Hours * 30) + ')');
}
]]>
</script>
</defs>
<circle cx="100" cy="100" r="80" style="fill:white;stroke:black"/>
<text x="130" y="46" style="font-size:15" startOffset="0">1</text>
<text x="154" y="71" style="font-size:15" startOffset="0">2</text>
<text x="165" y="106" style="font-size:15" startOffset="0">3</text>
<text x="155" y="140" style="font-size:15" startOffset="0">4</text>
<text x="130" y="166" style="font-size:15" startOffset="0">5</text>
<text x="96" y="175" style="font-size:15" startOffset="0">6</text>
<text x="62" y="166" style="font-size:15" startOffset="0">7</text>
<text x="37" y="140" style="font-size:15" startOffset="0">8</text>
<text x="27" y="106" style="font-size:15" startOffset="0">9</text>
<text x="34" y="71" style="font-size:15" startOffset="0">10</text>
<text x="58" y="46" style="font-size:15" startOffset="0">11</text>
<text x="92" y="37" style="font-size:15" startOffset="0">12</text>
<g transform="translate(100 100)">
<g id="hours" transform="rotate(377.3333333333333)">
<line x1="0" y1="0" x2="0" y2="-35" style="stroke-
width:4;stroke:black">
<animateTransform attributeName="transform" type="rotate"
dur="43200s" values="0;360" repeatCount="indefinite"
accumulate="none" additive="replace" calcMode="linear" fill="remove"
restart="always"/>
</line>
</g>
<g id="minutes" transform="rotate(208)">
<line x1="0" y1="0" x2="0" y2="-55" style="stroke-
width:2;stroke:black">
<animateTransform attributeName="transform" type="rotate"
dur="3600s" values="0;360" repeatCount="indefinite" accumulate="none"
additive="replace" calcMode="linear" fill="remove" restart="always"/>
</line>
</g>
<g id="seconds" transform="rotate(240)">
<line x1="0" y1="0" x2="0" y2="-75" style="stroke-
width:1;stroke:red">
<animateTransform attributeName="transform" type="rotate"
dur="60s" values="0;360" repeatCount="indefinite" accumulate="none"
additive="replace" calcMode="linear" fill="remove" restart="always"/>
</line>
</g>
</g>
<circle cx="100" cy="100" r="3" style="fill:black;stroke:black"/>
</svg>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/4It09A/fOaOAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/