PDA

View Full Version : Clocks........time displayed on projects???



AGRO
05-19-2006, 06:39 PM
I was just wondering what people have used to display the current time on projects. What kind of clocks to clients prefere? Analog, digital, sundial...?

I have a project where the client is more concerned about the looks and function of the clock than anything else.

Corey
05-19-2006, 07:40 PM
Sundial... :yes

Intrigued
05-19-2006, 10:43 PM
It has been digital style for my offerings, more oft than not.

But, how about having "falling numbers" or "smearing" numbers (dang, want animated .gifs!), etc. etc.

Tek
05-19-2006, 11:30 PM
I was toying with the same thing in one of my projects. I started with an analog clock, but I wanted it to be more for information than esthetics. I started looking for digital clocks, preferably with day/date year and I found some Flash source that did the job for me fine. With this one, you can modify it if you want... I had to because whoever made it didn't have it coded right... it wouldn't change to AM/PM until the 01:00 or 13:00 hour. :)

Anyways, I have put the SWF up for now if you want to see it. It's just not nearly as big in my project. :)

http://support.imediatouch.com/clock.swf

Corey
05-19-2006, 11:36 PM
Someone should do a clock based on the Matrix effect. :yes

Intrigued
05-19-2006, 11:38 PM
What's neat, to me anyway, is that one can use the:

System.GetTime() Action's choices for Hour, Minute, and Second to add in the graphics we want! So, we can create in say PhotoShop... images for the hours, minutes, and seconds (save as a template!) and then use an Image object to load such and then you can change out the images as needed to get your clock working.

It's some effort up front, but well worth it I believe.

:yes

Intrigued
05-20-2006, 12:00 AM
How about a clock with colors. Lighter colors for early to afternoon and then darker colors for later to evening! (tip: shades of gray (not black) for the evening hours!).

;D

Wonderboy
05-20-2006, 12:24 AM
Actually what is kind of neat is to display the time as the title
like this On Timer


-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "";

-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);
if (result ~= -1) then
result = System.GetTime(TIME_FMT_MIL);
Window.SetText(Application.GetWndHandle(), ""..result);
end
end

and this on Preload or On Show, or why not a button if you want the user to be in control of the displaying itself,

Page.StartTimer(1000);

Corey
05-20-2006, 12:39 AM
Yep, that's neat allright. :yes

AGRO
05-20-2006, 09:17 AM
I have made a few flash clock components, digital and analog. My most recent analog has a nice smooth second hand, like a Rolex. The client is leaning toward that one with a new sleek skin. Thanks for the input.

I do like your idea Corey about the matrix clock..............huh.......???

Tek
05-20-2006, 10:23 AM
The matrix clock would be pretty neat.

At some point I want to take a stab at making an integrated screen saver in one of my AMS applications. It should be just a matter of checking for mouse movement and if a certain amount of time passes, enable it... and if the mouse is moved, disable it. Maybe I'll take that clock and then make it move around the screen until it gets to the edges and goes in the opposite direction. :)

Anyone tried this before? (Not necessarily with a clock, or Flash...)

Wonderboy
05-20-2006, 01:30 PM
It has been digital style for my offerings, more oft than not.

But, how about having "falling numbers" or "smearing" numbers (dang, want animated .gifs!), etc. etc.

Falling numbers , display the time in a Tree object and you have falling numbers, sort of anyway,lol or in a listbox or why not on a button,and add some scroll to it,

Wonderboy
05-20-2006, 01:40 PM
This on Timer


-- Initialize node data table
tblNodeData = {};
result = System.GetTime(TIME_FMT_MIL);
tblNodeData.Text = ""..result;
tblNodeData.Data = ""..result;
tblNodeData.Expanded = true;
tblNodeData.NodeIndex = "1";
tblNodeData.ImageIndex = 1;
tblNodeData.SelectedImageIndex = 1;

-- Insert the node
Tree.InsertNode("Tree1", "1",tblNodeData);

This on a button or On Show, or on what ever you want to use

Page.StartTimer(1000);


Use black background and light green for text color and you got a light version of matrix number falling
:yes

AGRO
05-20-2006, 06:18 PM
The matrix clock would be pretty neat.

At some point I want to take a stab at making an integrated screen saver in one of my AMS applications. It should be just a matter of checking for mouse movement and if a certain amount of time passes, enable it... and if the mouse is moved, disable it. Maybe I'll take that clock and then make it move around the screen until it gets to the edges and goes in the opposite direction. :)

Anyone tried this before? (Not necessarily with a clock, or Flash...)



I have made something similar in flash. It does just that, it checks for no mouse movment, then a function checks for predetermined time that has passed, then it triggers a function. The function could be what ever you want it to be of course. Then when the mouse moves the event is removed and then the function begins counting the predetermined time again. Really simple.

AGRO
05-20-2006, 06:33 PM
just copy and paste this in the first frame in flash, then test movie.(Flash 8).



//---------------------------------
// :::: change $timeToWait below ::::
// time below is in seconds ex: 10 seconds
var $timeToWait:Number = 10;
//---------------------------------
// :::: creating text fields ::::
createTextField("myxmouse", 5, 20, 10, 50, 20);
createTextField("myymouse", 6, 20, 30, 50, 20);
createTextField("secNomove", 7, 80, 60, 175, 20);
createTextField("noMouse_txt", 8, 247, 60, 20, 20);
createTextField("box1_txt", 9, 66, 10, 30, 20);
createTextField("box2_txt", 10, 66, 30, 30, 20);
createTextField("trigger_txt", 11, 231, 30, 150, 20);
myxmouse.text = "xmouse:";
myymouse.text = "ymouse:";
secNomove.text = "Seconds of no mouse movement:";
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
box1_txt.text = _xmouse;
box2_txt.text = _ymouse;
myCount = 0;
};
Mouse.addListener(mouseListener);
animItvl = setInterval(repeat, 1000);
var myCount:Number = 0;
function repeat() {
if (myCount>=$timeToWait) {
noMouse_txt.text = myCount;
trigger_txt.text = "Trigger event function";
// this is where you would add your event or screen saver
} else {
myCount = myCount+1;
noMouse_txt.text = myCount;
trigger_txt.text = "";
// this is where you would remove your event or screen saver
}
}