1

Topic: Analog clock problem

Hi, I have tried to use your example above, but the widget stops working (the clock is no longer shown).
Below is a copy of my code:

<script type="text/javascript"><!--
    var flashvars = {
        clockSkin: "media/skins/skin008.png",
        arrowSkin: "1",
        arrowColor: "666666"
        UTCTime: "<?php echo gmdate('H:i:s'); ?>",
        timeOFFset: "32400"
            };
    swfobject.embedSWF(
        "media/devAnalogClock.swf",
        "devAnalogClock",
        "200",
        "200",
        "8",
        "media/expressInstall.swf",
        flashvars,
        {scale: "noscale", wmode: "transparent"}
          );
// --></script>


Any idea what might be wrong?

2

Re: Analog clock problem

Please give me an URL where i can look into your problem.

3

Re: Analog clock problem

Hi, thanks for your quick reply.

http://www.globalfxtrade.com

4

Re: Analog clock problem

As i see your server has no PHP support. I can see php code in your HTML source:
UTCTime: "<?php echo gmdate('H:i:s'); ?>"

The result should be something like this:
UTCTime: "12:00:00"

gmdate function is well documented here:
http://us.php.net/manual/en/function.gmdate.php

If you use some other programming language ASP, Ruby or something else find corresponding function in that language.

5

Re: Analog clock problem

Hi, I just tried the following script

<?php
echo gmdate('H:i:s');
?>

and accessed it via http://www.globaltrade.com/clock_test.php

and I get back

12:57:26

However the clock still does not show. Since php is supported on the server, what else might be going on?

Solved..I forgot to add the "," after the last variable when added the additional code.


Thanks

Last edited by evp (2009-07-09 15:35:42)

6

Re: Analog clock problem

Hi Sorry, I just realized that indeed the clock shows nicely, however the time is not changing, seconds hands does not move either.

Any Ideas?

7

Re: Analog clock problem

Hi I have impleted the same code but in a dot net application and cannot get the clock to correct for UTC it will only display the cpu clock.
here is the code.
var newDate:Date = new Date();
        var timezoneOffset:int = 0 - newDate.timezoneOffset * 60;
            var flashvars = {
                clockSkin: 'media/skins/skin005.png',
                arrowSkin: '1',
                arrowScale: '40',
                arrowColor: 'ffffff',
                utctime: 'hh:mm:ss',
                timeoffset: timezoneOffset,
and as well as this


            var flashvars = {
                clockSkin: 'media/skins/skin005.png',
                arrowSkin: '1',
                arrowScale: '40',
                arrowColor: 'ffffff',
                utctime: 'hh:mm:ss',
                timeoffset: '14400',
The clock appear on the webpage and shows the current time from my laptop. It current running in a devop env. Any help would be helpful. not very fimilar with flash.

8

Re: Analog clock problem

I am having an issue with obtaining the time for multiple clocks I am using.  They clocks do work but the will not tell the correct time.  The clocks start over from the UTC Time I set.  So if I set it to the correct US time and lets say its 2:45:05 and I stay on the page for for 14 minutes 3:00.05.  If I close my page and go back to it, it starts back at 2:45:05.  I have this on our company intranet and I have already had many compliments until I was told it wasnt displaying the correct time.  Your product is well liked and I would like to display it in its best form!  smile

<P id=devAnalogClock>
<SCRIPT src="XXXXXXXXXXXXXXX/swfobject.js" type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript><!--
    var flashvars = {
        clockSkin: "XXXXXXXXXXXXX/skin002.png",
        arrowSkin: "1",
        arrowColor: "666666",
UTCTime: "06:06:00",
timeOffset: [-14400]     };
    swfobject.embedSWF(
        "XXXXXXXXXXXXXXX/devAnalogClock.swf",
        "devAnalogClock",
        "200",
        "150",
        "8",
        "XXXXXXXXXXXX/expressInstall.swf",
        flashvars,
        {scale: "noscale", wmode: "transparent"}
    );
// --></SCRIPT>
<BR>
<CENTER><I>Tekelec HQ US<BR>Morrisville, NC</I></CENTER></o:p>
<P></P></TD>
<TD style="PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; WIDTH: 159.6pt; PADDING-TOP: 0in; HEIGHT: 58pt" vAlign=top width=213>
<P class=MsoNormal style="TEXT-ALIGN: center" align=center><o:p>
<P id=devAnalogClock2>
<SCRIPT src="XXXXXXXXXXXX/swfobject.js" type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript><!--
    var flashvars = {
        clockSkin: "XXXXXXXXXXXXX/skin002.png",
        arrowSkin: "1",
        arrowColor: "666666",
UTCTime: "06:06:00",
timeOffset: [+7200]     };
    swfobject.embedSWF(
        "XXXXXXXXXXXX/devAnalogClock2.swf",
        "devAnalogClock2",
        "200",
        "150",
        "8",
        "XXXXXXXXXXXXX/expressInstall.swf",
        flashvars,
        {scale: "noscale", wmode: "transparent"}
    );
// --></SCRIPT>
<BR>
<CENTER><I>Belgium, France,<BR>Netherlands</I></CENTER></o:p>
<P></P></TD>
<TD style="PADDING-RIGHT: 5.4pt; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; WIDTH: 159.6pt; PADDING-TOP: 0in; HEIGHT: 58pt" vAlign=top width=499>
<P class=MsoNormal style="TEXT-ALIGN: center" align=center><o:p>
<P id=devAnalogClock3>
<SCRIPT src="XXXXXXXXXXX/swfobject.js" type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript><!--
    var flashvars = {
        clockSkin: "XXXXXXXXXXX/skin002.png",
        arrowSkin: "1",
        arrowColor: "666666",
UTCTime: "6:30:00",
timeOffset: [+28800]     };
    swfobject.embedSWF(
        "XXXXXXXXXXXXXXX/devAnalogClock3.swf",
        "devAnalogClock3",
        "200",
        "150",
        "8",
        "XXXXXXXXXXXXXX/expressInstall.swf",
        flashvars,
        {scale: "noscale", wmode: "transparent"}
    );
// --></SCRIPT>


If anyone can help me with this I would be so appreciative.  Its the UTC Time parameter that is throwing me off.

9

Re: Analog clock problem

Use timeOffset: "+28800" (with quotes).

10

Re: Analog clock problem

For those of you having problems with changing the time zone and the php script, try a javaScript alternative below, worked for me ;

<script type="text/javascript">
    var d = new Date();
    var setTime = d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();
    var flashvars = {
        clockSkin: "skin002.png",
        arrowSkin: "1",
        arrowColor: "666666",
        UTCTime: setTime,
timeOffset: '7200'
    };
    swfobject.embedSWF(
        "devAnalogClock.swf",
        "devAnalogClock",
        "220",
        "220",
        "8",
        "expressInstall.swf",
        flashvars,
        {scale: "noscale", wmode: "transparent"}
    );
</script>


HTH

11

Re: Analog clock problem

Hi Guys,

I cant get this to work sorry! please help if you can.

I am using the javascript ver above as I'm using asp.

my code is:

<p id="devAnalogClock"><a href="http://www.xorbin.com/">Analog flash clock widget</a></p>
<script type="text/javascript">
    var d = new Date();
    var setTime = d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();
    var flashvars = {
        clockSkin: "media/skins/skin005.png",
        arrowSkin: "1",
        arrowColor: "666666",
        UTCTime: setTime,
        timeOffset: '7200'
    };
    swfobject.embedSWF(
        "devAnalogClock.swf",
        "devAnalogClock",
        "220",
        "220",
        "8",
        "expressInstall.swf",
        flashvars,
        {scale: "noscale", wmode: "transparent"}
    );
</script>

I just cant get the time to change. I have tried saving the page as .asp