[問題] 為什麼我怎麼樣都無法顯示數字鐘呢?(求救)

看板Flash作者 (empty)時間14年前 (2011/04/03 19:22), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
各位版上的大大好 小弟我在寫有日期和時間的數字鐘 但怎樣都顯示不出來 我在網路上找了很多 照他們的方式也都無法....... 我是使用CS3的Flash AS2 AS3版本 都試過了........... 我先說一下我的作法: 我在場景上建立五個動態文字框 將實體名稱改為 yeahtext、daytext、weektext、half、timetext 然後我再建立一個圖層 在第一格的動作寫上以下code time = new Date(); hour = time.getHours() minute = time.getMinutes() second = time.getSeconds() milli = int(time.getMilliseconds()/10) if (minute < 10) { minute = "0"+minute; } if (second<10) { second = "0"+second; } if (milli<10) { milli = "0"+milli; } if (hour<12) { half = "上午"; } else { half = "下午"; } yeahtext=time.getFullYear(); datetext=time.getMonth()+1+" 月 "+time.getDate()+" 日"; weektext = "星期 "+time.getDay(); timetext = hour + + minute + second + milli; 程式檢查沒錯誤 但是怎樣播放都是沒有字幕出現 = = 請大大們幫幫我 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.251.191.70 ※ 編輯: brianstudent 來自: 111.251.191.70 (04/03 19:26)

04/03 19:38, , 1F
設定TextField的文字請用tf.text = "text";
04/03 19:38, 1F
是第一行要先宣告你說的那個嗎? ※ 編輯: brianstudent 來自: 111.251.191.70 (04/03 22:32)

04/04 00:15, , 2F
附個fla吧
04/04 00:15, 2F
文章代碼(AID): #1Dc5YDZB (Flash)