PDA

Volledige versie bekijken : geluid regelen met 1 knop


wolkk
%Europe/Berlin %666 %2005, 17:00
dit is het probleem:
ik heb een achtergrondgeluid dat zich herhaalt doormiddel van de actie go to and play (dus bij het einde van het gluid stuur ik em terug naar het begin)
nu wil ik dat als ik op een knop play klik een animatie gaat starten met een ANDER geluid en dat het achtergrondgeluid stopt.
het andere geluid laten starten is geen probleem (heb de wav in de timeline van de button geplaatst)
MAAR hoe stop ik het andere geluid?????? (met stopallsounds stopt ook het nieuwe geluid)

alvast hardstikke bedankt, ik heb al heel wat forums afgespeurd maar de vraag betrof dan altijd het aan en uitzetten van geluid met twee knoppen

Pimm
%Europe/Berlin %716 %2005, 18:12
Kun je je FLA posten?

wolkk
%Europe/Berlin %724 %2005, 18:23
sorry pimm, maar hoe doe ik dat???
ik zie nergens een bladerfunctie op dit forum zodat ik naar mijn fla kan brouwsen of een attachmentfunctie

jonasvermeulen
%Europe/Berlin %871 %2008, 20:55
sorry pimm, maar hoe doe ik dat???
ik zie nergens een bladerfunctie op dit forum zodat ik naar mijn fla kan brouwsen of een attachmentfunctie
als je een wil reageren kan je kiezen voor uitgebreide editor (onderaan)
ook onderaan vind ge de knop "beheer bijlagen"
als je hier op klikt kan je bijlagen toevoegen

greetz jonas :)

Jan
%Europe/Berlin %075 %2008, 01:49
MAAR hoe stop ik het andere geluid?????? (met stopallsounds stopt ook het nieuwe geluid)
Sound constructor
public Sound([target:Object])
Creates a new Sound object for a specified movie clip. If you do not specify a target instance, the Sound object controls all of the sounds in the movie.

Availability: ActionScript 1.0; Flash Player 5

Parameters
target:Object [optional] - The movie clip instance on which the Sound object operates.

Example
The following example creates a new Sound object called global_sound. The second line calls setVolume() and adjusts the volume on all sounds in the movie to 50%.

var global_sound:Sound = new Sound();
global_sound.setVolume(50);The following example creates a new Sound object, passes it the target movie clip my_mc, and calls the start method, which starts any sound in my_mc.var movie_sound:Sound = new Sound(my_mc);
movie_sound.start();
start (Sound.start method)
public start([secondOffset:Number], [loops:Number]) : VoidStarts playing the last attached sound from the beginning if no parameter is specified, or starting at the point in the sound specified by the secondOffset parameter.

stop (Sound.stop method)
public stop([linkageID:String]) : VoidStops all sounds currently playing if no parameter is specified, or just the sound specified in the idName parameter.

Groeten,
Jan