DevelopPHP
home gear home donate
Search Results For
in:

Libraries book

HTML Library CSS Library JavaScript Library PHP Library

Videosbook

PHP and MySQL JavaScript HTML and CSS Vector and 3D Flash Actionscript Android Dev Miscellaneous

Resourcesbook

Website Hosting Developer Q+A
Sprite Programming Mastery

Download Source Files

<iframe width="560" height="315" src="http://www.youtube.com/embed/B-ohuofMX_Q" frameborder="0" allowfullscreen></iframe>
You can embed this video on your blog or web page by copying the video embed code above and pasting it into the source code of your page. Adjust the width and height to specify the size you would like it to display.
Thumb Digital Clock
Embed Source - http://www.youtube.com/watch?v=B-ohuofMX_Q
Publish Date - Sep 06, 2008     Author - Adam Khoury
Digital Clock
In this Flash AS3 tutorial you can learn how to build your own custom digital clock. Complete working free fla file.
Lesson Code

// This line puts the date object into a variable we can use more easily
var now:Date = new Date();
// These 3 lines put the hours, minutes, and seconds into variables
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
// Conditional statement to set AM or PM according to hour(military time)
if (hours >= 12) {
ampm_txt.text = "PM";
} else {
ampm_txt.text = "AM";
}
// Conditional that converts military time to standard time display
if (hours > 12){
hours = hours - 12;
}
if (hours == 00){
hours = 12;
}
// Conditional that adds 0 to the front of any hour less than 10
if (hours < 10){
hours_txt.text = "0" + hours;
} else {
hours_txt.text = hours;
}
// Conditional that adds 0 to the front of any minute less than 10
if (minutes < 10){
minutes_txt.text = "0" + minutes;
} else {
minutes_txt.text = minutes;
}
// Conditional that adds 0 to the front of any second less than 10
if (seconds < 10){
seconds_txt.text = "0" + seconds;
} else {
seconds_txt.text = seconds;
}


Home   •   Terms of Use   •   T-Shirts   •   RSS   •   Testimonials   •   Subscribe   •   Classroom Chalkboard   •   Developer Q+A   •   Donate   •   Top ↑
Popular In PHP / MySQL E-Commerce Store Production
Social Network Website Building
Image Upload / Photo Processing
CMS Software Programming
Mass Email Systems
Magic XML Data
Search Programming
Popular In JavaScript JSON Programming
Ajax Programming
Animating Elements
WYSIWYG Programming
Date/Time Programming
DOM Scripting
Object Reference
Popular In HTML Canvas Element
New Form Elements
Audio Element
Video Element
Drag and Drop
Event Handling
Element Grouping
Popular In CSS Custom Font Embedding
Dynamic Fit Backgrounds
Theatre Mode
Box Overlays
CSS Level 1 Properties
CSS Level 2 Properties
CSS Level 3 Properties
DevelopPHP.com is a growing educational system packed with video and written material that you can access 24/7 100% free. The focus here in 2014 is spread between five technologies: HTML, CSS, JavaScript, PHP and MySQL. Learn programming theory, database interaction, web design, animation, graphics editing, vector art, 3D modeling, and much more. The educational experience here is a hybrid one offering both high quality video tutorials and code libraries that grow more robust every day. The code libraries are being assembled so that developers can discover all of the building blocks of their favorite languages. The libraries coupled with high quality video tutorials will take you deep down the rabbit hole very quickly. You can also ask questions and get free advice at WebIntersect.com.
HTML5