photoshop underground
Would you like to react to this message? Create an account in a few clicks or log in to continue.
photoshop underground

Online Community Help
 
HomePortalSearchLatest imagesRegisterLog in

 

 [help]Pause Sound

Go down 
2 posters
AuthorMessage
lemura
Spammer
Spammer



Number of posts : 727
Registration date : 2007-05-29

[help]Pause Sound Empty
PostSubject: [help]Pause Sound   [help]Pause Sound Icon_minitimeFri 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..
Back to top Go down
lemura
Spammer
Spammer



Number of posts : 727
Registration date : 2007-05-29

[help]Pause Sound Empty
PostSubject: Re: [help]Pause Sound   [help]Pause Sound Icon_minitimeMon 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 happy
Back to top Go down
taSzkie
Admin
Admin
taSzkie


Number of posts : 358
Age : 36
Location : Thailand
Registration date : 2007-05-27

[help]Pause Sound Empty
PostSubject: Re: [help]Pause Sound   [help]Pause Sound Icon_minitimeMon Jun 11, 2007 8:55 am

ahhh i c
Back to top Go down
http://www.friendster.con/6052607
Sponsored content





[help]Pause Sound Empty
PostSubject: Re: [help]Pause Sound   [help]Pause Sound Icon_minitime

Back to top Go down
 
[help]Pause Sound
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
photoshop underground :: TUTORIALS & LINKS :: Flash-
Jump to: