lemura Spammer
Number of posts : 727 Registration date : 2007-05-29
| Subject: [help]Pause Sound Fri Jun 08, 2007 5:20 pm | |
| mga tsong may konti me problem sa flash.. about sa audio sa flash.. gusto ko kasi lagyan ng bgm ung gawa sa flash, tapos lagyan ba ng audio off/audio on button para ba mag pause ung sound.. kapag audio on.. play ung sound sa last na pause.. nagawa ko na un.. kaso kapag natapos na ung sound.. tapos play ulit kaso dun sa huling pause nag ple-play hindi sa start ng sound.. global variable: - Code:
-
var sndPosition; //hold the last position of the audio
audio off button: - Code:
-
on(release) { _root.sndPosition = _root.mySound.position/1000; _root.mySound.stop("lnkSound"); gotoAndStop(2); // go to audio on button }
audio on button: - Code:
-
on(release) { _root.mySound.start(_root.sndPosition,20); //loop 20x _root.sndPosition = 0; // not working gotoAndStop(1); // go to audio off button }
gusto ko kasi loop ng 20x ung audio.. pero kapag nag loop ulit dun nga sa last na pause naguumpisa mag play.. ung _root.sndPosition = 0; try ko lang kung magbabalik sa umpisa.. kaso ganun pa din.. | |
|
lemura Spammer
Number of posts : 727 Registration date : 2007-05-29
| Subject: Re: [help]Pause Sound Mon Jun 11, 2007 6:35 am | |
| *update mga tsong na-resolbahan ko na pala ung problem ko... uuhmm... ginawa ko... start ko na lang ulit ung pagplay ng audio.. tapos everytime na natatapos ung audio, nagpleplay ulit.. hindi ko na ginagamitan ng loop parameter sa .start().. ginamit ko na lang ung onSoundComplete. audio on button - Code:
-
_root.mySound.start(_root.sndPosition,20); _root.mySound.onSoundComplete = function() { _root.mySound.start(); } gotoAndPlay(1);
pero hindi sya maglu-loop ng 20x, infinite na lang... siguro gawa na lang ako ng counter para sa loop, pero ok na din un | |
|
taSzkie Admin
Number of posts : 358 Age : 36 Location : Thailand Registration date : 2007-05-27
| Subject: Re: [help]Pause Sound Mon Jun 11, 2007 8:55 am | |
| | |
|
Sponsored content
| Subject: Re: [help]Pause Sound | |
| |
|