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


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 help with function to play audio

View previous topic View next topic Go down 
AuthorMessage
Chemical
Member
Member
Chemical

Posts : 6
Join date : 2011-05-11

help with function to play audio Empty
PostSubject: help with function to play audio   help with function to play audio EmptyWed May 11, 2011 9:47 pm

hey there, i am making a slideshow site, a user can add effects to pictures using a drop down menu and choose a sound to accompany picture when the slideshow runs.

i have hit a snag, my function is taking in the choice from the user for both sounds, but playing them over one another, i think its something silly im missing out. here is the function where i think im going wrong:

Code:

function EvalSound()
   {
    var sound1 = document.getElementById("sound1");
      var choice = sound1.options[sound1.selectedIndex].value;
       var sound2 = document.getElementById("sound2");
      var choice2 = sound2.options[sound2.selectedIndex].value;
      var pic1 =  document.getElementById("first_pic");
      var pic2 =  document.getElementById("second_pic");
   
      soundManager.play(choice);
    soundManager.play(choice2);
   }
Thanks for any help
Back to top Go down
LolAddrev
Member
Member
LolAddrev

Posts : 6
Join date : 2011-04-23

help with function to play audio Empty
PostSubject: Re: help with function to play audio   help with function to play audio EmptyWed May 11, 2011 9:50 pm

Code:

 soundManager.play(choice);
    soundManager.play(choice2);

tells it to play both sounds :shock:
Back to top Go down
Chemical
Member
Member
Chemical

Posts : 6
Join date : 2011-05-11

help with function to play audio Empty
PostSubject: Re: help with function to play audio   help with function to play audio EmptyWed May 11, 2011 9:52 pm

yeah, i want it to play one sound if its on image one, another sound if its on image 2.

I think its a simple if statement, but for the life of me i cant work it out :s
Back to top Go down
LolAddrev
Member
Member
LolAddrev

Posts : 6
Join date : 2011-04-23

help with function to play audio Empty
PostSubject: Re: help with function to play audio   help with function to play audio EmptyWed May 11, 2011 9:52 pm

Chemical wrote:
yeah, i want it to play one sound if its on image one, another sound if its on image 2.

I think its a simple if statement, but for the life of me i cant work it out :s

What do you mean by 'if it's on..'; if what's on?
Back to top Go down
Chemical
Member
Member
Chemical

Posts : 6
Join date : 2011-05-11

help with function to play audio Empty
PostSubject: Re: help with function to play audio   help with function to play audio EmptyWed May 11, 2011 9:53 pm

my slideshow has 2 images, the images are shown on the page and the user can specify an effect and sound for each image. There is then a button to play the slideshow, the first image, then the second. Currently the sound that the user selects in dropdown menu 1 (the first image) plays again when the second image is displayed, i want the second drop down menu sound to be played.

Hope that makes more sense?
Back to top Go down
Sponsored content




help with function to play audio Empty
PostSubject: Re: help with function to play audio   help with function to play audio Empty

Back to top Go down
 

help with function to play audio

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Seeing If File Is Audio
» Live steaming audio
» audio editing program is free and can help make my singing better?
» How to play DFO in australia
» Why are DJs always play Cha cha slide and cupid shuffle

Permissions in this forum:You cannot reply to topics in this forum
Easy A :: help with function to play audio Edit-trash Useless :: Trash-