dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: 3dfa sound problem

  1. #1
    Member
    Join Date
    May 2008
    Posts
    46

    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 :


    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

    (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
    Don't blame me cuz' my English sucks ) i'm from romania XD

    www.xelubest.ro

  2. #2
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681
    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.
    Cheers,
    kusco
    (3DFA Support Team)

  3. #3
    Member
    Join Date
    May 2008
    Posts
    46
    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)

    Don't blame me cuz' my English sucks ) i'm from romania XD

    www.xelubest.ro

  4. #4
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681
    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
    Cheers,
    kusco
    (3DFA Support Team)

  5. #5
    Member
    Join Date
    May 2008
    Posts
    46
    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
    Don't blame me cuz' my English sucks ) i'm from romania XD

    www.xelubest.ro

  6. #6
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    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

  7. #7
    Member
    Join Date
    May 2008
    Posts
    46
    thanks a lot ^.^ :P

    works fine
    Don't blame me cuz' my English sucks ) i'm from romania XD

    www.xelubest.ro

  8. #8
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    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

  9. #9
    Member
    Join Date
    May 2008
    Posts
    46
    thanks but yeah .. ur right the sounds are TOO short.... doesn't matter

    thanks again
    Don't blame me cuz' my English sucks ) i'm from romania XD

    www.xelubest.ro

  10. #10
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    glad I could help

    Zoranan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center