TAILIEUCHUNG - Working with Dates in Flash

Đó là hữu ích trong Flash để có thể truy cập thông tin cập nhật để hiển thị ngày, làm cho một bộ phim làm những việc cụ thể về ngày tháng nhất định, tạo tính giờ đếm ngược, hoặc hiển thị các ngày trong tuần cho một ngày cụ thể trong lịch sử, để đặt tên chỉ là một vài ví dụ. | Working with Dates in Flash It s useful in Flash to be able to access date information to display the date make a movie do specific things on certain dates create countdown timers or display the day of the week for a particular date in history to name just a few examples. To use dates in Flash you create an instance of the Date class by using the following syntax var myDate Date new Date year month date This syntax creates a new Date object named myDate. The parameters in parentheses associate the Date object with a specific date. For example var myDate Date new Date 66 6 27 This example creates a Date object associated with July 27 1966. The first parameter represents the year the second represents the month and the third represents the date. You may wonder why July which we consider the seventh month in the year is actually defined as the sixth month in the script above. In ActionScript both months and days of the week are referenced by numbers beginning with 0 therefore January is the zero month February is the first month March is the second month and so on up to December which is the eleventh month. Likewise days of the week begin with Sunday as the zero day Monday the first day and so on. The following exercise demonstrates the usefulness of this numbering system. NOTE Dates and years are recognized by their true values therefore 66 refers to 1966 while 27 refers to the 27th day in the month. When referencing years between 1900 and 1999 the year parameter needs only two digits the last two digits of the specified year 99 for 1999 66 for 1966 and so on . Years outside these boundaries must be specified using all four digits 2007 for 2007 2001 for 2001 and so on . TIP You can add parameters for the hour minute second and millisecond if the application requires that precision. To create a Date object that references the current point in time as indicated by the user s system clock you can leave the parameter settings blank var myDate Date new Date After you ve .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.