Re: [問題] 關於sound.start(secondOffset,loop)~

看板Flash作者 (我是沒牌的營養師!)時間18年前 (2007/04/27 06:21), 編輯推噓2(201)
留言3則, 2人參與, 最新討論串2/4 (看更多)
※ 引述《jing007 (嗚~合購版讓我變肥肥肥豬)》之銘言: : 感謝各位的指點~ : 關於Sound.start(secondOffset,loop)有點疑問 : 就是在跑的時侯 不知為何secondOffset如何設值 就是一直重頭開始唱 : secondOffset不是指定卻播放聲音的開始位置嗎? : 不是說我設600,就是要放由600秒才開始唱的歌嗎?@@ : 後來一生氣 直接設值在裡面 還是重頭唱…… = =||| : 有沒有其他播歌的函式…(別建議我寫一個…我可寫不出來:::> <:::) : 另我將Sound.start()置於我所設的一些onReleaseシ onReleaseOutside …等 : 去抓完拉軸所計算出所對應的音樂位置程式碼後來 以便直拉完後就直接唱了 : 但偏偏上下兩行偵測用的都有跑出結果來 但就是不唱… : 難道Sound.start()有特別的用法嗎? 謝謝~ 在用Sound類別的時候,它的數字單位就讓我覺得這個類別的設計有點機車了 Sound.duration 單位是milliseconds Sound.position 單位是milliseconds public start([secondOffset:Number], [loops:Number]) : Void 這裡的secondOffset單位卻是seconds... secondOffset:Number [optional] - A parameter that lets you start playing the sound at a specific point. For example, if you have a 30-second sound and want the sound to start playing in the middle, specify 15 for the secondOffset parameter. The sound is not delayed 15 seconds, but rather starts playing at the 15-second mark. 如果要把抓出來的position要再塞回去給start當參數時的時候,需要再除以1000 供你參考 :) -- http://www.eddie.com.tw/blog/ http://www.eddie.com.tw/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.135.172.127

04/27 12:57, , 1F
謝謝~不過好像沒用…sound.start不理我,一樣重頭唱
04/27 12:57, 1F
※ 編輯: aquarianboy 來自: 220.133.136.105 (04/27 16:15)

04/27 18:36, , 2F
囧 我只有看position的單位,原來我當時寫錯惹 0.0
04/27 18:36, 2F

04/27 18:36, , 3F
不過這設計真的爛
04/27 18:36, 3F
文章代碼(AID): #16CINYRW (Flash)
文章代碼(AID): #16CINYRW (Flash)