Is it possible to add "fade effect" with soundinterface.swf

  • Hello,

    I'm using for the first time soundinterface.swf and it works fine.

    I have buttons which play mp3 files and other buttons which stop playing mp3 files.

    I was just wondering if it is possible to add a fade effect when i stop playing a sound/loop ?

    Maybe not ? I guess the "stop playing sound action" close the stream immediatly as in as3 :

    Code
    mymp3.stop();

    It's the same with "close method" for video, it stops the stream without fade effect.

    Do you know if it is possible to make a fade effect, and then close the stream ?

    Thanks

    ps : Sorry, maybe this topic should be in plugins/souninterface topic ... But it is also related to AS3 *wink*

  • Hi Tuur,

    I'm really not sure i can fade out the sound before stop with "soundinterface.swf" plugin.

    I think this parameter is not available... I've read the doc, a simple plugin with play / loop

    It's a good plugin, for playing music in background, or add sounds FX to buttons.
    In my project, when you clic on HS, windows appear (with video in them) and stop the background music. Works fine but looks bad, because the music is cut without fade out...
    It's not a major issue *wink* Just want to do a nice job *wink*

    I'll check the source files or i''m going to do something in AS3 (i'll try with SoundTransform).

    I'll tell you when it's done... If it's done *question*

  • Hi Vinyl,

    • volume
      • set the global volume for all sounds
      • 0.0 - 1.0, default=1.0
      • can be changed dynamically via actions (set/tween/...)
    • mute
      • set the global mute for all sounds
      • true or false, default=false
      • can be changed dynamically via actions (set/switch/...)

    So, for example, to make a fade out in 2 seconds, you can use :

    Code
    tween(soundinterface.volume,0,2);

    But make sure you have a recent version of the sound pluging... I have made a lot of try outs that did not work before I realised that it was a version issue *rolleyes* ...

    SAlut.

  • Is there a way to start sound with a tween?

    I've tried setting the sound on play to "0" then using a tween, but I don't get any sound that way. If I put a tween before starting the sound I get a full volume sound then it tweens.

    Also tried putting a tween into the volume part of playsound but that did not work either.

    Any ideas?

    Also, anyone getting a different volume level from tweens verses just playsound?

    I start a playsound2D at volume ".3", tween when paused to "0", but when I resume to ".3" The sound is NOT as loud as it was when started. Does this perhaps have something to do with specific verses global sound settings? If I understand the examples I found, the tweens are only changing the global sound level. I guess perhaps there is a way to code a specific sound tween?

    Global tween for sound:

    tween(soundinterface.volume,.3,1);

    How would a specific one be done?

    Regards,

    Robert

    Regards,

    Robert

    Edited once, last by image360 (February 19, 2010 at 4:36 PM).

  • Hi image360,

    playsound2D(id, mp3file, volume*, pan*, loops*, oncomplete*); seems to set a specific volume value for the given sound...
    The GLOBAL volume is not affected...
    Because of the id argument, I have tried to access the volume value in this way:
    trace('id_volume= ',get(soundinterface[id].volume));
    the trace() returns a value *smile* but not the one from the given id *sad* ... it return the GLOBAL volume value *whistling*
    So, it seems that the volume of a given id can not be changed dynamically ... Only the GLOBAL volume can be changed dynamically...

    SAlut.

  • Thanks Michel, yet again!

    I think I should just start ever question post with a preamble thank you to you *thumbsup*

    Klaus should be paying you with many thanks.

    And Klaus, if you read this, or probably when you read this, please do NOT consider this an enhancement suggestion that slows down a formal release with website updates and documentation consolidation *smile*

    Regards,

    Robert

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!