PDA

View Full Version : Setting volume to score....



nathan99
March 28th, 2005, 04:52 AM
Is it at all possible to set the volume of a sound equal to a score.

Say i have a sound called "beep1", could i set the colume of that sound to something called "score" using a code like this...

_root.Sound.beep1.setVolume(_root.score) or something?

A7RSTR7K3
March 28th, 2005, 07:53 AM
Yes you would just say beep1.setVolume(score); and that would do it.

nathan99
March 28th, 2005, 04:39 PM
didnt work:puzzle: where do i put it..

A7RSTR7K3
March 28th, 2005, 05:26 PM
well it depends on where beep1 is and wehre score is...Did you create the sound object correctly?

nathan99
March 28th, 2005, 11:09 PM
to insert the sound i dragged it on the keyframe... an example would be appreciated if u hav it working for u

scotty
March 29th, 2005, 01:33 AM
http://kennybellew.com/tutorial/index.html#index.html

scotty(-:

nathan99
March 30th, 2005, 05:02 AM
ok i tried that site, it had all these codes n i got confused, i think im gonna need an example, his were hard 2 understand.... for me n e waz

nathan99
March 31st, 2005, 01:04 AM
if i post a fla example would someone be able to help?

A7RSTR7K3
March 31st, 2005, 07:44 AM
we could try.

nathan99
April 1st, 2005, 07:43 PM
ok i have a fla of wat i have done... but i cannot upload it... it is 208 kb or something i dont know how but it is, know of anywhere where i can upload it?

Jjp productions
April 2nd, 2005, 12:46 AM
www.freewebs.com

nathan99
April 2nd, 2005, 07:05 PM
Thanks for that,
heres the fla
http://www.freewebs.com/nathan990/volprob.fla

nathan99
April 3rd, 2005, 08:17 PM
hmmmm :puzzle:

nathan99
April 3rd, 2005, 11:25 PM
ok i have figured out the sound thing but when i use attach sound it doesnt work, it is no longer an isue of setting the volume more playing the sound

nathan99
April 4th, 2005, 01:35 AM
hey, dw i got it:D thanks to n e 1 who took the time to read this anyway