Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

  • 4 odgovora
  • 4.319 pregleda

Najnovija ↓

Problem sa kontrolom zvuka!!! 29.10.2005. u 23:18 · pre 255 meseci
izmenjeno 1 put, poslednji put kelja 30.10.2005. u 18:35
  1. kelja30.10.2005. u 18:35zapis iz teksta poruke
#1
Na _rootu je kod sledeci:
zvuk = new Sound();
zvuk.attachSound("muzika");
zvuk.start(0, 1000);
glas = new Sound();
glas.attachSound("glas");
glas.start(0, 1000);
glas.setVolume(50);
stop();
Na klizacu za kontrolu jacine zvuka bitan deo koda je:
onClipEvent (enterFrame) {
_root.zvuk.setVolume(_x-levo);}
( Klizac uradjen po primeru iz flash mx2004)
Problem je u tome sto klizac stisava,odnosno pojacava oba zvuka!Zvukovi su u istom frejmu,ali,naravno u razlicitim layerima.Probao sam i da jedan od zvukova smestim u poseban movie clip u okviru glavnog,ali problem ostaje...Da li neko zna resenje?Unapred sam zahvalan na pomoci!
Re: Problem sa kontrolom zvuka!!! 12.11.2005. u 01:18 · pre 255 meseci #2
Flash podrzava do 8 kanala.Mozes li da okacis FLA (ako je do 200 KB) da probamo da resimo?
Re: Problem sa kontrolom zvuka!!! 12.11.2005. u 04:53 · pre 255 meseci #4
Evo sta kaze:
Citat:

I left out an optional parameter when first introducing the Sound object constructor function (new Sound()). Think of the parameter as the way to attach a sound to a Movie Clip instance. Then that instance and attached sound is independently controllable just like any other property of that clip. The way it works is that you need to provide a reference to a Movie Clip as the parameter, and then the sound's properties will be independently controllable. Otherwise, the volume of all Sound objects will be the same. The following code shows how you can start playing two sounds and then control their respective volume levels:

Code:

music_sound=new Sound(clip1); 
music_sound.attachSound("music"); 
music_sound.start(); 
voice_sound=new Sound(clip2); 
voice_sound.attachSound("narration"); 
voice_sound.start(); 
music_sound.setVolume(50); 
voice_sound.setVolume(80);

Citat:

You'll need two clips on the Stage (clip1 and clip2) and two sounds in the Library with linkage set and identifiers ("music" and "narration"). When the sounds start, you'll hear their respective sounds change when calling music_sound.setVolume(toWhat) and voice_sound.setVolume(toWhat). It's weird because you'd think by having the two sound objects stored in two separate variables (music_sound and voice_sound), you'd have independent control. Just remember, though, that you need to attach the sound to a specific Movie Clip instance (by providing the clip as a parameter) to have independent control. Lastly, variables (as always) are indeed part of the timeline where they're created (so you'll need to apply all that you know about addressing if you want to refer to them from other timelines). But interestingly, including a clip reference in the new Sound() constructor has no impact on addressing (so you don't need to worry about it).


A pogledaj i ovaj mixer:

http://www.macromedia.com/devn...les/html/sound_completion.html
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme