Hi,
I would like to have the same running clocks as on page:
http://marketindex.rbs.com/uk/Home.aspx
I looked what is the source code of that page by downloading the page and to show swf object it is:
PHP Code:
<OBJECT type="application/x-shockwave-flash" data="http://marketindex.rbs.com/media/swf/clocks.swf" width="237" height="80" id="homeclocks" style="visibility: visible; ">
<PARAM name="wmode" value="transparent">
<PARAM name="flashvars" value="city1=Tokyo&city2=Frankfurt&city3=London&city4=New York&ampm1=PM&ampm2=PM&ampm3=PM&ampm4=AM&hours1=22&hours2=15&hours3=14&hours4=9&minutes1=54&minutes2=54&minutes3=54&minutes4=54"></OBJECT>
When i put this code on my webpage with proper swf link on my hosting i can display these clocks but they are not running.
(i can only see swf file in Google Chrome and Firefox, it does not show in Explorer, why?)
I think to have these clocks running i also have to use javascript. In that source code i see it has
PHP Code:
<SCRIPT language="javascript" src="./Homepage_files/Website.Lib.js" type="text/javascript"></SCRIPT>
and it uses 'function Clock' from that file.
Below swf object there is another javascript
:
PHP Code:
<SCRIPT language="javascript" type="text/javascript">
var clock;
$(function() {
clock = new Clock(17,38);
clock.cities[0] = ["Tokyo",7];
clock.cities[1] = ["Frankfurt",0];
clock.cities[2] = ["London",-1];
clock.cities[3] = ["New York",-6];
clock.Tick();
});
</SCRIPT>
So i put all lines to my php file:
http://www.emy.pl/clocks.php to try if it is running. My code is:
PHP Code:
<html>
<head>
<script language="javascript" src="http://www.emy.pl/Website.Lib.js" type="text/javascript"></script>
</head>
<body>
<object style="visibility: visible;" id="homeclocks" data="clocks.swf" type="application/x-shockwave-flash" height="80" width="237">
<param value="transparent" name="wmode">
<param name="movie" value="clocks.swf">
<PARAM name="flashvars" value="city1=Tokyo&city2=Frankfurt&city3=London&city4=New York&ampm1=PM&ampm2=PM&ampm3=PM&ampm4=AM&hours1=23&hours2=16&hours3=15&hours4=10&minutes1=37&minutes2=37&minutes3=37&minutes4=37">
</object>
<script language="javascript" type="text/javascript">
var clock;
$(function() {
clock = new Clock(17,38);
clock.cities[0] = ["Tokyo",7];
clock.cities[1] = ["Frankfurt",0];
clock.cities[2] = ["London",-1];
clock.cities[3] = ["New York",-6];
clock.Tick();
});
</script>
</body>
</html>
And when i put proper hours and minutes in line: clock = new Clock(17,38);
it does work, clocks are running, but when i reload page it shows the same time 17,38 and starts running from that time.
Can someone help me with that code?
Thank you!