You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, February 16th 2010, 3:39pm

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 :

Source code

1
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 ;-)

Tuur

Sage

Posts: 3,279

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Tuesday, February 16th 2010, 4:27pm

tween volume?

Tuur
*thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

3

Tuesday, February 16th 2010, 7:31pm

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 ;-) Just want to do a nice job ;-)

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*

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Tuesday, February 16th 2010, 9:34pm

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 :

Source code

1
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.

5

Wednesday, February 17th 2010, 1:51pm

Thank Michel, that's great news !!

I'll try it now !

Salut !

6

Wednesday, February 17th 2010, 7:39pm

Thank you Michel for the tip.

I didn't notice that there were a new sound plugin in the krpano beta 1.0.9 ( soundinterface.swf beta) ...

There are so many improvement in krpano recently !!

The plugin works fine with fade effect. *thumbup*

image360

Intermediate

Posts: 207

Location: Austin, TX and Chicago, IL

Occupation: Photographer

  • Send private message

7

Friday, February 19th 2010, 4:10pm

Using Tween when starting sound

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

This post has been edited 1 times, last edit by "image360" (Feb 19th 2010, 4:36pm)


michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

8

Friday, February 19th 2010, 9:20pm

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.

image360

Intermediate

Posts: 207

Location: Austin, TX and Chicago, IL

Occupation: Photographer

  • Send private message

9

Friday, February 19th 2010, 10:23pm

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