-
3dfa sound problem
Hi guys...
I have a problem here... i am working at a game called BEATBOX 2 (beatbox 1 sucked so nvm)
it's a game where you have some sounds... wich are activated by keys like "A,B,H,D,F" ... so on
the sounds are specialy edited so they start RIGHT when you press the button
example : http://img165.imageshack.us/img165/8913/soundok5.jpg
the problem is .. when i export the .swf file and play the game... when i press a button it takes about 0.2 sec. to start the sound.... i really don't want this thing in the final export.
it's all ok and work fine inside the program (when i press play) but at the exported file it's the 0.2 sec. problem :)
the movie settings looks like this
http://img165.imageshack.us/img165/6132/infodl1.jpg
(nothing compressed)
and you can see a test version .swf here
also i plan to send the final version as a sample for 3dfa :P
-
This problem is common across all Flash tools, and it is an unavoidable side effect of MP3 compression.
When a sound is compressed using the MP3 format, a short silence gets added to the beginning and end of the sound. Since the introduction of the MP3 format, people have tried various workarounds.
The most common workaround for Flash is to use a script to start playing the sound using an offset value.
-
can you post that script please.... thanks
the problem is .... my sounds are .wav's and as i said.. in the program they work PERFECT.... (they are set to be exported inside the swf and no compression)
:)
-
The 0.0 for the sound option looks bad - the option should say "no compression". If sound export is set to no compression then there should not be any problems.
Maybe you might like to send a link to a downloadable zipped project so we can work out why it says 0.0
-
Well it's pointless to post the .movie cuz there are just a bunch of sounds activated bykeyboard ("play sound" option .... no scripting)
The sound compresion drop menu is set on "no compression" but after export it's "0.0"
I really wanna know the script for the offset play or any other method...
I also wanna ask if there is a script to change the pinch \ tempo of the sound :)
(You can find the sounds played in that movie here (1 mb - 18 .wav's) if someone can help me i would appreciate :P
thanks
-
Try using this script on your key presses...
element("your_sound").play();
element ("your_sound").position = 0.2;
you can try reversing this order, or changing the position of the sound
-
thanks a lot ^.^ :P
works fine :D
-
Also, if you want to stop users from restarting the sound before its over, try this on your key presses...
if (element ("your_sound").position == 0){
element("your_sound").play();
element ("your_sound").position = 0.2;
}
this should work, however, it may interfere with the players ability to put out a fast beet. To avoid this, trim any extra space off of the end of your sounds, or don't bother putting the "if" statement in at all. (your sounds are so short, it may not even matter)
glad to help
Zoranan
-
thanks but yeah .. ur right the sounds are TOO short.... doesn't matter :D
thanks again :)
-
glad I could help
Zoranan