photoshop underground

Online Community Help
 
HomePortalCalendarFAQSearchRegisterMemberlistUsergroupsLog in

Share | 
 

 [help]Pause Sound

Go down 
AuthorMessage
lemura
Spammer
Spammer


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

PostSubject: [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..
Back to top Go down
View user profile
lemura
Spammer
Spammer


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

PostSubject: 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 happy
Back to top Go down
View user profile
taSzkie
Admin
Admin
avatar

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

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

ahhh i c

_________________

i run my own life & i dictate my own mind
Back to top Go down
View user profile http://www.friendster.con/6052607
Sponsored content




PostSubject: Re: [help]Pause Sound   

Back to top Go down
 
[help]Pause Sound
Back to top 
Page 1 of 1
 Similar topics
-
» Right channel does not sound nearly as loud as the left
» Sculptress of Sound: The Lost Works of Delia Derbyshire
» The sound of coyote in the night
» Cool Song of Storms Sound
» Sound unit

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