Flash Actionscript: Digital Clock
Posted by kkool | Filed under Flash Actionscript & Design

Flash Actionscript: Digital Clock
เป็นการอ่านค่าเวลาจากเครื่อง Client ขำๆครับ เอาไปใช้แต่งเว็บกัน หรือจะเขียน CD ก็เจ๋ง
Script เวลา
var date=new Date();
time=new Date(); // time object
var seconds = time.getSeconds();
var minutes = time.getMinutes();
var hours = time.getHours();
var dayweek = date.getDay();
var dayweek_str:String;
if (days<10){
days_str=”0″+days;
}
else{
days_str=days;
}
if (hours<12) {
ampm = “AM”;
}
else{
ampm = “PM”;
}
if(hours>12){
hours = hours - 12;
}
if(hours == 00){
hours = 12;
}
if(hours<10){
hours = “0″ + hours;
}
if(minutes<10){
minutes = “0″ + minutes;
}
if(seconds<10)
{
seconds = “0″ + seconds;
}
switch (dayweek){
case(0):dayweek_str=”SUN”; break;
case(1):dayweek_str=”MON”; break;
case(2):dayweek_str=”TUE”; break;
case(3):dayweek_str=”WED”; break;
case(4):dayweek_str=”THU”; break;
case(5):dayweek_str=”FRI”; break;
case(6):dayweek_str=”SAT”; break;
}
clock_txt.text = hours + “:” + minutes + “:” + seconds;
ampm_txt.text = ampm;
clock_back_txt.text = “88:88:88″;
date_txt.text=dayweek_str;
Download FLA: Flash Digital Clock
Please enable Javascript and Flash to view this Flash video.
Tags: flash actionscript, flash digital clock
Flash Tut: Arrow Cursor Move
Posted by kkool | Filed under Flash Actionscript & Design

วันนี้มี Tutorial Flash Actionscript น่ารักขำๆมาให้ดูกัน
เป็นลูกเล่นของการเคลื่อนที่ของ Cursor แล้วเจ้าลูกศรนี้จะชี้ไปในทิศทางที่ Cursor อยู่
เอาไว้ Design ลูกเล่น ขำๆให้กับงานของเรา อาจจะเป็น Flash CD, หรือ Flash site ก็น่ารักดีครับ
ลองเข้ามาดูครับ Read more … »
Tags: cursor move, flash actionscript
Flash Tuts : รูปเบลอๆ เอา Mouse Over แล้วชัด
Posted by kkool | Filed under Flash Actionscript & Design
Please enable Javascript and Flash to view this Flash video.ทฤษฎีง่ายๆก็คือ มี 3 ชั้น ล่างสุดเป็นภาพรถเบลอ ชั้นสองเป็นภาพรถชัดเจน ส่วนอีกอันเขียนให้ mask เลื่อนตาม cursor โดยมีลูกเล่นนิดนึง
เริ่มเลยดีกว่า
1. เปิด new เป็น Actionscript 3 นะครับ ผมใช้ขนาด 400×220 px
2. หารูปงามๆที่เหมาะกับการค้นหา อิอิ ในที่นี้ผมใช้รูปรถเฟอราร่า สีเหลือง …
Tags: flash actionscript
Flash Tuts: Snowfall หิมะตกได้ด้วย Flash
Posted by kkool | Filed under Others
หน้าหนาวละบ้านเราในช่วงนี้ก็เย็นๆดี แต่คงไม่มีหิมะตกหรอก
งั้นเราให้ Flash Actionscript ช่วยละกันเนอะ
Please enable Javascript and Flash to view this Flash video.
ก็แค่เอา Script นี้ไปแปะ กับวาง SnowFlake.as อีกตัวใน folder เดียวกัน
แล้วก็จัดการว่าอยากจะให้ตกมาก ตกน้อยก็ปรับกันไป หนาวสมใจกันนะครับ
Download: Snowfall
Tags: flash actionscript




