Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Too Many Simultaneous Sound Objects?


hello all,

i've got this Flash movie that has six objects running around and i've attached the same looped sound to each one. the closer the object gets to the 'viewer' the louder the sound gets.

it works fine if i have only one of the sounds playing (the others with volume 0), but once i try to run all 6 together i get this choppy hacked-up sound. some of them will play correctly, but some will jump on and off, all jittery-like or not there at all.

am i just trying to run too many looped sounds at one time?

Thanks!




FlashKit > Flash Help > Flash ActionScript
Posted on: 08-19-2005, 10:10 AM


View Complete Forum Thread with Replies

Sponsored Links:

Simultaneous Draggable Objects
Hey everyone,
So i finally got a movie clip to be draggable in flash...just when I think it's downhill from here, I run into another problem.. I want to make multiple objects draggable in the same scene depending on which object the user chooses to drag first. However when I try to make other objects draggable it still only works for the first one I did. And as a side note the object that I did get to work, somehow can be dragged from anywhere on the screen that the mouse is. I would like to make it so it will only move when the mouse is directly over it.. Any help would be appreciated!

The script I've been using is:

onClipEvent(mousemove) {
my_mc.startDrag(0,40,0,40,0);
}
onClipEvent(mouseUp) {
my_mc.stopDrag(0,40,0,40,0);
}

View Replies !    View Related
Issues With Simultaneous Sound - Looping And Buttons
Issue:
1. Can't get the button sounds(genericPress,genericOver) to play at same time as loopSound.
2. Can't get loopSound to stop onPress.

I can get all the sounds playing simultaneously onEnterFrame.
I can get button sounds playing if I comment out "loopSound_sound" from onEnterFrame.

Any thoughts?

Code in second frame of movie:

Code:
stop();

_root.loopSound_sound = new Sound(loopSound_mc);
_root.loopSound_sound.attachSound("loopIntro");
_root.loopSound_sound.setVolume(40);

_root.genericPress = new Sound(genericPress_mc);
_root.genericPress.attachSound("pressGeneric");
_root.genericPress.setVolume(100);

_root.genericOver = new Sound(genericOver_mc);
_root.genericOver.attachSound("overGeneric");
_root.genericOver.setVolume(100);

_root.onEnterFrame = function() {
_root.loopSound_sound.start(0,5);
//_root.genericPress.start(0,5); // used for test
//_root.genericOver.start(0,5); // used for test
}
Button code in another mc:

Code:
stop();

//case study button
play_mc.onRollOver = function() {
_root.genericOver.start(0,1);
play_mc.gotoAndPlay(7);
};
play_mc.onRollOut = function() {
play_mc.gotoAndPlay(13);
};
play_mc.onPress = function() {
_root.genericPress.start(0,1);
};

//stop audio loop
audio_mc.onRollOver = function() {
_root.genericOver.start(0,1);
audio_mc.gotoAndPlay(7);
};
audio_mc.onRollOut = function() {
audio_mc.gotoAndPlay(13);
};
audio_mc.onPress = function() {
_root.genericPress.start(0,1);
_root.loopSound_sound.stop();
};
Thank you,
Timateo

View Replies !    View Related
Sound Objects - How-to Preload Multiple Sound Objects
Im basically making a site for a sound engineer friend of mine, and like Im trying to make a music interface for his site, thats able to preload tracks, and play & load those multiple mp3 tracks dynamically (mp3s are in the same folder). Or the setup could be like multiple sound objects that have their own progress bar etc for loading kinda like the will-musser example. Im up for any suggestions as the MM docs dont help in this area very much

A good example of this would be @t http://www.willmusser.com. I under-stand how-to create and use 1 sound object for example, but when i try and use 2 sound objects etc, for 1 dynamic textfield named "progress", heres the coding to call-upon a sound object, which is basically 1 mp3 thats getting loaded, and shows progress in percentage via that dyamic textfield. What Im wondering, is if anyone knows of the AS for the btns to load tracks ie: on (release), load mp3"blaghla.mp3" ? if anyone knows the coding to load mp3s, feel free to leave a reply ;p And any good ways of calling upon multiple sound objects at once seperate dynamic textifelds or progress bars for loading etc.


PHP Code:




sound_1 = new Sound();
sound_1.loadSound("http://themakers.com/sounds/atmospheres_1.mp3", true);
function checkLoad(){
    var percentLoaded = (sound_1.getBytesLoaded()/sound_1.getBytesTotal())*100;
    progress.text = Math.round(percentLoaded)
    message.text = "MEK - Far From Home";
    
}
checkProgress = setInterval(checkLoad, 1000);

View Replies !    View Related
Problem: [sound].setVolume(x) Controling Two Sound Objects In One Call...?
Hi there, hopefully some or at least one of you will be able to figure this out because it's wrecking my head!

Basically I'm writing a little looper player movie, that will play [x] number of techno/jungle/house/whatever music loops at the same time, and the user will be able to switch loops and turn loops on and off whenever they want to. I'd like to avoid putting sound in the timeline so I'm using sound objects to trigger the sound properties.

For a test, I've created two sound objects (these will later be in a 2D array), but for now- just two sound objects, I've attached the sound to the links in the library, and set the volumes on both sounds to 0. Both WAVs in the library have the linkage on "Export this symbol" and they are labelled/identified as "loop1_link", and "loop2_link"... (obviously without the quotes in the properties box). Here's the code:

// ---------------------------
loop_test1 = new Sound();
loop_test2 = new Sound();

loop_test1.attachSound("loop1_link");
loop_test2.attachSound("loop2_link");

loop_test1.setVolume(0);
loop_test2.setVolume(0);

loop_test1.start(0,999);
loop_test2.start(0,999);
// ---------------------------

So the sounds are triggered when the movie loads, and the start playing silently in the background for 999 loops.

Here's the problem:

In the interface of the movie, on click of a play button, I'm making a call to _root.loop_test1.setVolume(100) to turn that sound on, but when I make that call, the volume is set to 100 for BOTH loop_test1 AND loop_test2 !! I'm hearing both loops playing at the same time and I only want to hear just the one. Makes no sense to me because I'm only telling that ONE sound object to set it's volume to 100...

Any ideas? Any feedback/comments would be greatly appreciated.

Cheers,
Anthony
-Dublin, IE

View Replies !    View Related
Sound Control Volume For Multiple Sound Objects?
I've got a file with several scenes.

Each scene has controls with different sound object defined on the first scene. There is a constant background sound object playing over all scenes. I need to control the volume of multiple sound objects playing simultaneously and setting each to different volumes from these scenes.

e.g
_root.bgmusic.setVolume(20);
_root.s001.setVolume(100);


can this be done? When I try, all sounds playing are set to the same volume.

Thanks heaps in Advance!

View Replies !    View Related
Sound Control Volume For Multiple Sound Objects?
I've got a file with several scenes.

Each scene has controls with different sound object defined on the first scene. There is a constant background sound object playing over all scenes. I need to control the volume of multiple sound objects playing simultaneously and setting each to different volumes from these scenes.

e.g
_root.bgmusic.setVolume(20);
_root.s001.setVolume(100);


can this be done? When I try, all sounds playing are set to the same volume.

Thanks heaps in Advance!

View Replies !    View Related
Multiple Sound-objects Causes Sound To Overdrive
hey guys..

I've built a small game with multiple enemies firing stuff at the same time. And here's the problem.. each shot makes a sound by simply creating a sound-object like this:

var es:explSound_1=new explSound_1();
es.play();

..it can get very crowdy, and multiple sounds of the same type are played at the same time. The sound now overdrives and gets disturbingly loud.
Does anyone know how to prevent this from happening?

View Replies !    View Related
Sound Objects
Well just trying to see if anyone can help with this.
I have a basic sound object looped lets say 500 times.
here is an example.
on (press) {
mysound= new Sound();
mysound.attachSound("mysound");
mysound.start( 0, 500 );
}


Now, my question is, does anyone know how to script it to fade out the volume to say about 50% after around 10 loops for an example. Any help would be appreciated. Thx

n.u.r.v

View Replies !    View Related
Sound Objects
Well my question is..
Im trying to figure out the script to fade a music loop in and out.
Example:
on (press) {
loop3 = new Sound();
loop3.attachSound("loop3");
loop3.start( 0, 500 );
}

If i have that script and want it so when u press the button, it will fade from 0% to 100%. And vice versa on a press fade it from 100% to 0%.

If anyone can help it would be greatly appreciated.
Thnx

n.u.r.v

View Replies !    View Related
>>FFD RWD<< Sound Objects
i was wondering is it possible for me to fast forward and rewind sound objects in flash 5???

i know how to create sound objects and control volume etc... i've not seen this before, and i'd like to know if there is anyway i can >>FFD and <<RWD a sound object

thanks

View Replies !    View Related
SOUND OBJECTS
I got this really awesome game im making. Only I've never gotten sounds to work by using scripting. I tried this:

fire = new Sound();
fire.attachSound("fire.mp3");
fire.setPan(93.75);
fire.setVolume(100);

that is in main timeline

fire.start();

that is in moiveclip actions.

Why doesn't it work?!
do u put fire.mp3 if it shows it in the library as fire.mp3 or do u write fire? Tried both ways still doesn't work.

game is at http://www.doms.150m.com/West_Stick.swf (hotlinking not allowed)
controls are:
Player 1:
arrow keys, '| ' to fire gun.

Player2:
w,a,s,d
'~`' to fire gun.

(have to work out the bugs in game, tell me if u find any)

View Replies !    View Related
Sound Objects
hi there,

i need to make a button that when you rollover it a looping sound fades in and when you roll off the looping sound fades out. how would i go about doing this?

thanks for your time, amy

View Replies !    View Related
Sound Objects() ?
Hi

I am trying to link sound to my scrolling thumbnails,
The scrolling thumbs is in a component I got from flashloaded.com
I asked them how I could do it and they said I would need to do is:

Create sound objects() and then trigger them when a user rollOvers or cliks on the thumbnails. Then trigger them like this:

tnailer.onThumbOver=function()
{
myReleaseSound.start(0,1);
}
etc.

All I have done at the moment with sounds is import it into my library from a CD-ROM (deusx sound design) and attach it to buttons. So I don’t have much experience with playing around with sounds.

Can any one explain how I would make sound objects, and where in the actions panel I would need to go to create them, and where I would put that code in the first place lol.

Thanks.

P.S I probably should have posted this in the sounds forum but I felt that as I am a newbie, I would get an answer that I would be able to understand better in this forum.

View Replies !    View Related
Sound Objects.....
Hi Guys,

I'm trying to make smth similar to that:
http://www.dartdesign.de/

Please excuse my English.....
There is a MainSound playing until a button is clicked, the MainSound is faded and the new movie I guess is loaded with the a different sound. After the Loaded movie is Closed the MainSound i faded in back.

What I did is I attached to a Movie Clip(called - "Hello") in the
Main.swf the MainSound

onClipEvent(load) {
MainSound= new Sound;
MainSound.attachsound("ambient");
MainSound.start(0,0);
}


I made several buttons within this movieClip "Hello"
The actionscript to the button is
1st a fade out the MainSound
then loadMovie Sound1.swf

Within the Sound1.swf I have the different Sound and a button to unload the movie
_root.unloadMovie


But I don't know how the fade in the MainSound back.

Can I do that from within the loaded Sound1.swf


Mamma Mia, I hope you will understand what I'm trying to explain...

Thank you so so much for any inputs.....

Thank you.........

View Replies !    View Related
Sound Objects
hi to all,

i have a web page with multiple sounds objects that are dynamically generated at runtime from php (the code to embed them and their source files, that is)

i would like to be able to be able to stop all other sound objects when i click on one of them. that is if the first clip is playing and io click another i want the first to stop playing. i can do this when i know the name of the sound object, but this is generated at runtime, so its unknown.

is this possible, or do i need to maintain another flash movide that i set the sound objects names into, say an array, then itereatethe aray turning each object's sound off or stopping them?

also there is something wrong with my embed tags as all sounds are auto playing.

$autoplay evals to "0" or "1" and when its 0 on page the player still autoplays.


Code:
<OBJECT id="intro"
codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
height="21" width="63" align="texttop"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" VIEWASTEXT>
<PARAM NAME="Movie" VALUE="/player.swf?mid=<?= $mediaFile ?>">
<PARAM NAME="WMode" VALUE="transparent">
<param name="autoPlay" VALUE="<?= $autoplay ?>">
<PARAM NAME="Quality" VALUE="High">
<PARAM NAME="BGColor" VALUE="#<?= $backColor ?>">
<embed src="/player.swf?mid=<?= $mediaFile ?>"
width="63" height="21" align="middle" wMode="transparent" autoPlay="<?= $autoplay ?>"
pluginspace="http://www.macromedia.com/go/getflashplayer">
</embed>
</OBJECT>

kind regards,

g00fy

View Replies !    View Related
Sound Objects
i am most amazed of this little thing called sound object
i am not that good with actionscript
but i managed the way of making this web page
http://www.boatj.com
this web has an mp3 player made by me, that its supposed to play and LOOP
files streaming them via the load of the SOUND OBJECT

but they dont loop
they only play once
here is my code


Code:
stop();
var x;
var sname, sname2;
label.text = sname;
musikita = new Sound(this);
//---botonStopMusic---
bb.onRelease = function() {
musikita.stop();
};
//--------------------
b1.onRelease = function() {
x = 2;
if (x == 1) {
sname = "Tijuana.mp3";
} else if (x == 2) {
sname = "Bongo.mp3";
} else if (x == 3) {
sname = "Ritmo.mp3";
} else if (x == 4) {
sname = "Musica.mp3";
}
sname2 = "http://www.boatj.com/swf/"+sname;
musikita.loadSound(sname2, true);
musikita.start(0, 99);
label.text = sname;
};
b2.onRelease = function() {
x = 4;
if (x == 1) {
sname = "Tijuana.mp3";
} else if (x == 2) {
sname = "Bongo.mp3";
} else if (x == 3) {
sname = "Ritmo.mp3";
} else if (x == 4) {
sname = "Musica.mp3";
}
sname2 = "http://www.boatj.com/swf/"+sname;
musikita.loadSound(sname2, true);
musikita.start(0, 99);
label.text = sname;
};
b3.onRelease = function() {
x = 1;
if (x == 1) {
sname = "Tijuana.mp3";
} else if (x == 2) {
sname = "Bongo.mp3";
} else if (x == 3) {
sname = "Ritmo.mp3";
} else if (x == 4) {
sname = "Musica.mp3";
}
sname2 = "http://www.boatj.com/swf/"+sname;
musikita.loadSound(sname2, true);
musikita.start(0, 99);
label.text = sname;
};
b4.onRelease = function() {
x = 3;
if (x == 1) {
sname = "Tijuana.mp3";
} else if (x == 2) {
sname = "Bongo.mp3";
} else if (x == 3) {
sname = "Ritmo.mp3";
} else if (x == 4) {
sname = "Musica.mp3";
}
sname2 = "http://www.boatj.com/swf/"+sname;
musikita.loadSound(sname2, true);
musikita.start(0, 99);
label.text = sname;
};
if (holder._framesloaded==holder._totalframes) {
//----autoloadmusic---
sname = "Tijuana.mp3";
sname2 = "http://www.boatj.com/swf/"+sname;
musikita.loadSound(sname, true);
musikita.start(0, 99);
//--------------------
}


the code listed above is located on a frame, wish contains the buttons and a holderMC
it works like a charm
i just wish they could really LOOP
i am sure this is a really simple error i am having
but i am too deep into this code, that i really need a third eye on this one
thanks for your time

View Replies !    View Related
Sound Objects
I have created two sound objects and want one to play continuously and the other to start and stop in intervals. The problem is when I actionscript the second one to stop it also stops the first one. Any ideas / solutions?

View Replies !    View Related
Sound Objects In Same MC?
Hi,
I'm creating a sound module for our future games.
This module is for far only a few preloadable MCs loaded by the game itself.

I'm attaching the sound to the same MC with the following code:

function SoundObj(linkageName){
var tmpSound = new Sound(this);
tmpSound.attachSound(linkageName);
return tmpSound;
}

Everything works fine except when i'm either trying to fade the volume or fade the channel the sound is played in, with more than one sound object attached.
It seems like both setPan() and setVolume() are changing the properties for the MC the sound is attached to rather than the object specified.

A solution would be to create a seperate MC for each sound, but this solution might eat too much speed and RAM (and would hurt my programmers soul).

Any suggestions?

If you need the fla files (loader + module) to help me (or pure curiosity) please mail me.

Thanks in advance
Tor Christensen

View Replies !    View Related
Prelaoding With Sound Objects
Okay,
I'm trying to preload a movie that is using sound objects. The problem is that nothing will show up untill the whole movie has been loaded. If I remove the sound objects the preloading works perfectly. Is my preloading not working because my sounds aren't in the main timeline?

View Replies !    View Related
Array Of Sound Objects?
Anyone out there know if its possible to have an array of Sound objects? that way I would just be able to do something like

soundArray[1].start();
soundArray[78].start();

The reason for all this being that I'm using Generator to dynamicly load in MP3s and i gotta figure ona way to do the attach sounds....

View Replies !    View Related
Preloading Sound Objects
i have sound objects in a flash 5 movie that are loading before my preloading routine. the movie is structured as follows:

i have a background image on frame 1.
the preloader starts on frame 2.
on frame 3, i have mySound=new sound ();
on various buttons in the movie, i have mySound.attachsound ("loop"); mySound.start("",999);
(where loop has been linked to object in the library)

given that the sound files are the bulk of the movie, this problem renders the preloader redundant (it finally kicks in at 80% loaded).

any help greatly appreciated.

yjk

View Replies !    View Related
Sound Objects And SmartClips
I'm trying to create a SmartClip with the sound object inside. How do I pass the attached sound inside the clip as a variable? for example, I want to assign each clip instance a different sound. Smartclip code would look something like

mySound = new Sound();
mySound.attachSound( //I want a variable to be here so I can pass it with the smart clip, but it has to be in parentheses?! help! )

how do I pass a variable that has to be in parentheses for the object? I tried to include the parentheses in the object, but it didn't work. Do I have to convert to string or something?

Thanks,
K

View Replies !    View Related
How To Operate Sound Objects
How can i operate sound objects like create a new sound objects from the existing one , to get the dimension of the attached sounds , to play the sound from some point until some point and etc ?

something like this :

s1=new Sound();
s2= new Sound();
s3=new Sound ();
s1.attachSound("id1");
s2.attachSound ("id2");
s3= s1 + s2;
s3.start(from_point,to_point);


Thak you

eldar52

View Replies !    View Related
Preloading Sound Objects?
I am using a lot of sound objects in a new project and it is mucking up my pre-loader. What happens is that the sounds are loading in frame 1 even before the preloader graphics appear on the screen, so that by the time the preloader appears on the screen the movie is about 75% loaded already.

I know that I can load the sounds in as another swf using "load movie", but that's pretty impractical in this instance. Any other ideas would be greatly appreciated.

Thanks.

View Replies !    View Related
Problems With Sound Objects
Hi,

I have multiple sound objects saved as swf files that i'm importing into a placholder in my main movie.

The problem i'm having is when I try and move around to different frame lables on my timeline, then say choose a new track to import. the first sound movie will not stop playing so i have two playing at the same time.

What I can't understand is when i 'm static on my first frame label i can import as many of my sound movies as I like and they start & stop fine.

Can anyone offer any advice, please?

View Replies !    View Related
Preloader For Sound Objects
HI ALL
I am using sound objects and have the linkage properties as "Export for Action script" and "Export in the First Frame".

The problem is that the preloader doesnt work if i have those 2 setttings selected, if i just have "Export for Action script" selected, the preloader works, but the sound doesnt load.

ANY SOLUTIONS????????


THANKS

View Replies !    View Related
Preloading Sound Objects
I thought this would work, but no such luck. I'm loading a Sound Object , and I want to start loading another when the first one is loaded.


Code:
mainSound1=new Sound();
mainSound1.loadSound(_root.baseURL+"sound/amon.mp3", true);
mainSound1.start(0,1);

nowPlaying = mainSound1;

bytes_loaded = nowPlaying.getBytesLoaded();
bytes_total = nowPlaying.getBytesTotal();
if (bytes_loaded == bytes_total) {
Function(loadNext);
}
// FUNCTIONS
function loadNext() {
mainSound2=new Sound();
mainSound2.loadSound(_root.baseURL+"sound/djshadow.mp3");
}
function nextSong() {
mainSound2.start(0,1);
nowPlaying = mainSound2;
}
mainSound1.onSoundComplete = Function(nextSong);
stop();
Any ideas???

View Replies !    View Related
Pre-loader For Sound Objects
Hi All

Does anyone know of a tutorial for creating a preloader for a movie that contains Sound Objects?

I'm having trouble as in the Linkage properties, I am exporting the audio in the first frame and it is loading before the preloader

Thanks

View Replies !    View Related
Targeting Sound Objects
I am having problems targeting sound objects on the root. It works fine when
calling it from the root but when I try and call it from within a movieclip

_root.sound0.start();

nothing happens. Any ideas???

on the root I have this script to attatch the sound to a series of movie clips

soundArray = new Array("drop", "click", "bkg", "chopper", "batch", "dogs_dinner", "not_bad");
for (i = 0; i < 6; i++) {
_root.createEmptyMovieClip(["sound_holder" + i], (50 + i));
_root["sound" + i] = new Sound(["sound_holder" + i]);
_root["sound" + i].attachSound(soundArray[i].toString());
}

globalSound = new Sound();

View Replies !    View Related
Attaching Sound Objects
Please help, I think i'm being very thick.

I am trying to attach sound objects into individual movie clips so that they can be called upon when pressing a button on the main timeline. I want to be able to mute & unmute each sound individually (prefably with a toggle button). At present I seem to be getting nowhere and have looked at every tutorial possible. I must be missing some major concept and as I cannot even get my sound to play correctly yet.

Please have a look at my test flash file and show me the error of my ways.I've deleted the sound file which is called "myloop" so that the file is small enough to upload.

Thanks

View Replies !    View Related
Sound Objects And LoadMovie
Hi...

I'm having a problem getting my sound objects to work in a site I'm putting together. I have a music player in a flash movie in level 2. I believe it is a path problem since the movie works on its own, but not when loaded from the root level.

On the first frame of this movie, I define the sound objects:
track_breathe=new Sound(this);
track_feel=new Sound(this);
track_together=new Sound(this);
track_feel.attachSound("feel");
track_breathe.attachSound("breathe");
track_together.attachSound("together");

When the player reaches a certain frame, I load the sound object like this:
_root.track_breathe.start();

Everything works great when I publish the movie by itself. But, when I view this within an html page (where I load the music player into level 2), the music does not start.

I tried using _level2.track_breathe.start(); but that doesn't seem to work either.

Anyone have any ideas?

thanks!
tony

View Replies !    View Related
Preloading Sound Objects
I've working on a site for a composer and I need to play a number of mp3s. I followed this tutorial:

http://www.kennybellew.com/tutorial/...d_multiple.htm

I works pretty nicely, but I'd like to adjust one thing. At present, you click the button once to load the mp3, then you usually need to click the button again at least once (and sometimes a few more times) to get it to start playing. I'd love it if it could just start automatically once it's loaded.

Here are my results:

http://www.timothywilliams.net/flash...reloaders.html

Any ideas? I'm open to a completely different solution...

Thanks!

Julia

View Replies !    View Related
My Sound Objects Are Deleting My MCs
Hey there

I have managed to come up with another stupid problem in flash!!
I have a lot of different Mcs in my file and some sounds are attached to them, everthing was going fine until I decided to use different sets of sounds,
when I replaced them some of my MCs have disappeared( it seems that new sound objects somehow deletes some of my MCs!!) I don't know if this makes any sense to anybody here but I can't manage to figure out what's causeing this. all of my sounds identifiers have unique names so this shouldn't be the problem, the old sound objects have been unattached and I can't think of anything esle. Anyone has any idea what might be the problem?!!!!

Many thanks in advance.

View Replies !    View Related
Finding Sound Objects
Hi,
I was wondering if anyone had any idea how to find a reference to a sound object in AS3.0.
I am loading in a swf that has a sound object embedded in the timeline. I do not have the fla for that swf. So i cannot set linkage to the library asset.
I need to read properties in that sound object once i have found it

Please, any help or direction would be great. After hours on end of attempts, I am stuck
thank you for any help or insight
devcajun

View Replies !    View Related
Attaching One Sound To Different Objects Not Possible?
hi!

I am trying to take the same sound and attach it to multiple sound objects and control them independently, however it seems not possible to achieve all this with actionscript?

I tried this code:


Quote:




for (i=1; i<10; i++) {
this["kast"+i].gotoAndStop(1+(Math.floor(Math.random()*5)));
this["kast"+i].i = i
this["kast"+i].sound = new Sound();
this["kast"+i].sound.attachSound("ketas_loop2.wav");
}




and only first mc got the sound attached.

then I tried "manually"


Quote:




...
var sound4:Sound = new Sound(kast4);
sound4.attachSound("ketas_loop2.wav");
var sound5:Sound = new Sound(kast5);
sound5.attachSound("ketas_loop2.wav");
var sound6:Sound = new Sound(kast6);
sound6.attachSound("ketas_loop2.wav")
...




and it was the same, only one object attached.

What am I doing wrong?
Please help!

View Replies !    View Related
Multiple Sound Objects
I am loading two different sounds and playing them at different volumes. The problem is that they both play at the same volume. As if one inherits the others volume. Anyone else have this problem?


Code:
var sound1:Sound = new Sound();
sound1.attachSound("loop");
sound1.setVolume(100);
sound1.start();

var sound2:Sound = new Sound();
sound2.attachSound("loop2");
sound2.setVolume(20);
sound2.start();

View Replies !    View Related
Tracing Sound Objects
Is there any way of tracing the status of a sound object? for example, testing to see if it is playing/stopped?

Thanks

View Replies !    View Related
Finding Sound Objects
Hi,
I was wondering if anyone had any idea how to find a reference to a sound object in AS3.0.
I am loading in a swf that has a sound object embedded in the timeline. I do not have the fla for that swf. So i cannot set linkage to the library asset.
I need to read properties in that sound object once i have found it

Please, any help or direction would be great. After hours on end of attempts, I am stuck
thank you for any help or insight
devcajun

View Replies !    View Related
Path To Sound Objects
Hi, first post here so any help much appreciated.

I have a main swf, lets call it main.swf ! and into I am loading an external swf called...external.swf. This external swf has sound objects in it that need to play when a user rolls over a button contained with in external swf.

I've defined my sounds in the root timeline of the external swf like this:

firstSound=new Sound();
firstSound.attachSound("kitchen1");

and set up the linkage from the library to those sounds, the sounds are contained in the library of the external swf

When the mouse rolls over a button I activate the sound using:

firstSound.start();

When this is played as a stand alone file ie: when i test the external swf without it being loaded into the main.swf, it works fine and dandy, but when I go through the main.swf, load in the external.swf and try the rollover nothing happens. I know this is something to do with the paths and I've tried lots of variations on the buttons by adding 'this' or '_root" and tried adding those to the sound definitions as well but to no avail !! I'm guessing this is pretty easily fixed but I'm afraid I'm at a loss to do so....any and all suggestions welcomed.

Thanks.
LS.

View Replies !    View Related
Sound Objects Not Visible
When I drag a sound from the library to the canvas, it isn't visible. A bunch of the tutorials I have read, say that some kind of "waveform" should be showing. I see a waveform in the timeline, but not on the canvas.

Any ideas?

View Replies !    View Related
Flash MX Sound Objects?
I have 4 buttons. Each are a movie clip that has 2 frames (the down and over).
the rollover has a click sound to it. Is it worth my while to do that with AS? or just put it up in the timeline (the sound).
Thank you for your time!

View Replies !    View Related
Attach Sound Objects- Please Help
Please help, I think i'm being very thick.

I am trying to attach sound objects into individual movie clips so that they can be called upon when pressing a button on the main timeline. I want to be able to mute & unmute each sound individually (prefably with a toggle button). At present I seem to be getting nowhere and have looked at every tutorial possible. I must be missing some major concept and as I cannot even get my sound to play correctly yet.

Please have a look at my test flash file and show me the error of my ways.
I've deleted the sound file which is called "myloop" so that the file is small enough to upload.

Thanks

View Replies !    View Related
Problems With Sound Objects
Hi everybody,

I have a timeline that contains the declaration of two different Sound objects (that should affect the volume of the sound in two different movieclips) in two different frames of the main timeline.


Code:
var movieSound1:Sound=new Sound(image_mc);
movieSound1.setVolume(0);

Code:
var sound2:Sound=new Sound(movie_m3);
sound2.setVolume(700);
When I test the movie, I get this message in the Output panel: "SWF contains multiple copies of a sound item"


Could anyone please let me know what I am doing wrong?
Thanks a lot

View Replies !    View Related
Sound Objects....simple ?
my ? is this

ive recently replaced sounds on my timeline (on frames) with this

_root.snd=new Sound();
_root.snd.attachSound("snd1");
_root.snd.start(-3,0);


now i noticed that...when i did this, the sync was off...i added this code to the same frame i had the music on thinking that it was gonna keep the sync.....since it didnt i added a -3 sec delay so it can play along with animation and although it worked,

my ? is, using this method of sound objects....will it keep sync with my animation or does it depend on the users connection?

ijust wanna make sure, dont want my animation to go one way and the music be trailing behind

View Replies !    View Related
Help With Multiple Sound Objects
hi everyone

i'm working on a flash game at the moment which uses a few sound objects in one movieclip.

eg, when one sound is playing, and the time's up, a buzzer sound should play.

but when i want to stop one sound and start another one, it seems that stopping that one sound is stopping all the sounds. it even seems to interfere with sounds in the movieclip which should play after the current one...

any ideas what could be the problem ?

here's the code of the specific movieclip. here you see that the buzzer should start and the beat should stop. but when stopping the beat, the buzzer doesn't even play. i tried with the volumeTo (mctween function) but that fades all the sounds, even the next ones in the next movieclip.

it's getting quite frustrating really


Code:
stop();

buzzer = new Sound();
buzzer.attachSound("buzzer");
buzzer.setVolume(100);

beat = new Sound();
beat.attachSound("beat");
beat.setVolume(100);
beat.start();


//Maak het interval aan

function gotoScreen(){
trace("goto");
gotoAndPlay("freeze");
}


function count() {
// trace("Seconds left: "+lengte);

lengte--;
teller_mc.teller.text = lengte;
if (lengte == 0) {
buzzer.start();
// beat.volumeTo(0,0.1,"Linear",0.5);
//beat.setVolume(0);
beat.stop();
teller_mc.teller.text = "0";

// de "game over mc" visible maken
gameOver._visible = true;

//ofwel naar de root gaan en de eind animatie laten zien
//


//evt nog de ballen van de stage verwijderen ?
ballenKader.removeBalls();




//de teller stoppen
clearInterval(countInterval);
screenInterval = setInterval(gotoScreen(), 90000);

}
}
countInterval = setInterval(count, 1000);
thanx!

View Replies !    View Related
Flash MX Sound Objects?
I have 4 buttons. Each are a movie clip that has 2 frames (the down and over).
the rollover has a click sound to it. Is it worth my while to do that with AS? or just put it up in the timeline (the sound).
Thank you for your time!

View Replies !    View Related
Attach Sound Objects- Please Help
Please help, I think i'm being very thick.

I am trying to attach sound objects into individual movie clips so that they can be called upon when pressing a button on the main timeline. I want to be able to mute & unmute each sound individually (prefably with a toggle button). At present I seem to be getting nowhere and have looked at every tutorial possible. I must be missing some major concept and as I cannot even get my sound to play correctly yet.

Please have a look at my test flash file and show me the error of my ways.
I've deleted the sound file which is called "myloop" so that the file is small enough to upload.

Thanks

View Replies !    View Related
Sound Objects + Preloaders
Help!!!

I have several sound objects identified in my movie. I linked them to identifiers in the library and are “exported them” into the first frame. All is good.

The problem lies in the pre-loader. The pre-loader is not "seeing" these files as “bytes” when is calculating “bytesTotal” so my pre-loader appears about halfway, skipping over all of the sound objects as part of the total movie filesize.

My preloader is a three frame gimmick as follows:

FRAME 1
loadpercent = "0";
loadBytes = "0 of "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb"

FRAME 2
loadPercent = (Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"% LOADED");
loadBytes = (Math.round((_root.getBytesLoaded()/1024)*1000)/1000+" Kb of "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb total Loaded.");
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
loadPercent = "100% LOADED";
loadBytes = (Math.round((_root.getBytesLoaded()/1024)*1000)/1000+" Kb of "+Math.round((_root.getBytesTotal()/1024)*1000)/1000+" Kb total Loaded.");
gotoAndPlay("entermovie");
}


FRAME 3
gotoAndPlay(2);


Any Ideas

Thank you in advance.

Mike

View Replies !    View Related
Two Sound Objects One OnRelease
Hi

I have to sound objects setup for my main menu. The first is an intro section of music that loads the sound from a location on the server. The second one just attaches the sound from the library as its just a small click noise for my menu buttons.

What I'm finding though is that whenever I instruct both of my sound objects in one function one of them is ignored.

For example on my menu buttons I have this code

Code:

test_mc.onRelease = function() {
   homeIntro.stop();
   buttonPress.start();
}

Now the sound object buttonPress only works if I remove the code for the homeIntro sound object.

So if I remove the homeIntro.stop(); line I can hear the buttonPress sound just like I should be able to.

How can I get around this and have keep both lines of code but still hear my button click??

View Replies !    View Related
Question About Sound Objects.
Hi!
I've heard that one sound object can not play more than one mp3 file so how do I make a mp3 player?
Would I have to create many sound objects and load each song on a different object?

thank you

View Replies !    View Related
Finding Sound Objects
Hi,
I was wondering if anyone had any idea how to find a reference to a sound object in AS3.0.
I am loading in a swf that has a sound object embedded in the timeline. I do not have the fla for that swf. So i cannot set linkage to the library asset.
I need to read properties in that sound object once i have found it

Please, any help or direction would be great. After hours on end of attempts, I am stuck
thank you for any help or insight
devcajun

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved