http://img2.f0nt.com/flash/fb701866abfaabe87bc68321bcd329c9.swfonClipEvent( Load ){
days = new Array ("อาทิตย์ที่","จันทร์ที่","อังคารที่","พุธที่","พฤหัสบดีที่","ศุกร์ที่","เสาร์ที่")
months = new Array ("มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม")
timedate = new Date ()
}
onClipEvent( EnterFrame ){
hour = timedate.getHours()
minutes = timedate.getMinutes()
seconds = timedate.getSeconds()
todaydate = timedate.getDate()
day = timedate.getDay()
dayname = days[day]
month = timedate.getMonth() + 1
monthname = months[month - 1]
year = timedate.getFullYear()
if (length(minutes) == 1) {
minutes = "0" + minutes
}
if (length(seconds) == 1) {
seconds = "0" + seconds
}
currenttime = hour + ":" + minutes + ":" + seconds
currentdate = todaydate + "/" + month + "/" + year
fulldate = dayname + " " + todaydate + " " + monthname + " " + year
delete("timedate")
timedate = new Date ()
if (todaydate>0 && month>10 && month<13||todaydate>12 && todaydate<14 && month>9 && month<11){
season = "ฤดูรัก"
}
else{
season = "ฤดูที่แตกต่าง"
}
}
อันนี้ผมยืมโค้ดจากแถวๆ TFD มาโปะ
แล้วเขียน if else เพิ่มไปหน่อยเดียว
ลืมเรื่อง operation เลยงงๆ ว่าจะเขียน if ยังไงดี เอาแบบบ้านๆ ไปก่อนละกันครับ
fla ใน zip เขียน ผิดนิดหน่อยนะครับ
วันที่ 1 ธันวามันจะไม่เป็นฤดูรัก
แก้ตรง todaydate ครับ หาเอาๆ