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

看板Flash作者 (我是沒牌的營養師!)時間18年前 (2007/04/27 22:10), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
※ 引述《aquarianboy (我是沒牌的營養師!)》之銘言: : 在用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 : 供你參考 :) 補充一下 在AS 3.0的裡 Sound類別改至flash.media.Sound類別 Sound.start()改成flash.media.Sound.play() 接受的參數也從秒改成毫秒(應該也有人發現這個設計有點鳥了) Ref: http://livedocs.adobe.com/flex/2/langref/flash/media/Sound.html#play() -- http://www.eddie.com.tw/blog/ http://www.eddie.com.tw/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.135.172.127
文章代碼(AID): #16CWG-Pt (Flash)
文章代碼(AID): #16CWG-Pt (Flash)