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




Problem With Sound Object



So I am building a presentation player in flash using xml and some of the mp3 player code from Lee's awesome tutorials. This site is wonderful.Now, I had all of this working correctly 2 days ago, then yesterday I tried adding preloading functionality for the external swf files this shell will be loading. After that, it seems my sound object is bugged. I even took out the preloading code and went back to what I had when it was working properly, and still no dice.The problem seems to be with onSoundComplete. Right now it is set up to call the next swf in the array and the next soundclip in the array when the first soundclip finishes (this is so when we add the voiceover it will only advance when the voiceover is finished).The weird thing is, it works on the first soundclip. It plays through, then advances to slide2 and sound2. However, when sound2 plays through, it just stops at the end and nothing else happens. It's like it doesn't realize there is a new sound playing for some reason.here is my as code:Code: // Array of Moviesvar urls:Array = new Array();// Array of Sound filesvar voice:Array = new Array();// Currently Playingvar progNum:Number;var pos:Number;// Sound Objectvar s:Sound = new Sound();s.onSoundComplete = playNext;s.setVolume(75);// XMLvar x:XML = new XML();x.ignoreWhite = true;x.onLoad = function() {   var slides:Array = this.firstChild.childNodes;   for(i=0;i<slides.length;i++) {      urls.push(slides[i].attributes.url);      voice.push(slides[i].attributes.soundfile);   }   holder.loadMovie(urls[0]);   s.loadSound(voice[0], true);   progNum = 1;   _root.controlBar.progressBar.progressNum.text = progNum.toString();   _root.controlBar.progressBar.progressTotal.text = urls.length;}x.load("px_slides.xml");// Play Next Movie function playNext():Void {   if(progNum < urls.length) {      s = new Sound();      progNum++;      holder.loadMovie(urls[progNum-1]);      s.loadSound(voice[progNum-1], true);      _root.controlBar.progressBar.progressNum.text = progNum.toString();   }   _root.controlBar.controlButtons.playPause.gotoAndStop("pause");}// Pause The Movie/Soundfunction pauseIt():Void {   pos = s.position;   s.stop();   holder.stop();}// UnPause The Movie/Soundfunction unPauseIt():Void {   s.start(pos/1000);   holder.play();}// Back Button_root.controlBar.controlButtons.btnBack.onRelease = function() {   if(progNum > 1) {      progNum--;      holder.loadMovie(urls[progNum-1]);      s.loadSound(voice[progNum-1], true);      _root.controlBar.progressBar.progressNum.text = progNum.toString();   }   _root.controlBar.controlButtons.playPause.gotoAndStop("pause");}// Next Button_root.controlBar.controlButtons.btnNext.onRelease = playNext;// Play/Pause Button_root.controlBar.controlButtons.playPause.onRollOver = function() {   if(this._currentframe == 1) this.gotoAndStop("pauseOver");   else this.gotoAndStop("playOver");}_root.controlBar.controlButtons.playPause.onRollOut = _root.controlBar.controlButtons.playPause.onReleaseOutside = function() {   if(this._currentframe == 10) this.gotoAndStop("pause");   else this.gotoAndStop("play");}_root.controlBar.controlButtons.playPause.onRelease = function() {   if(this._currentframe == 10) {      this.gotoAndStop("playOver");      pauseIt();   } else {      this.gotoAndStop("pauseOver");      unPauseIt();   }}Here's a link to the .fla (its a zip archive of my project folder)http://oxyfresh.com/RobertL/px_presentation.zipI am working in Flash 8 Pro. Any help would be great, I think my brain is fried from trying to find the problem.



Actionscript 2.0
Posted on: Thu Jan 18, 2007 5:33 pm


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

.stop() For Sound Object Stopping Embedded Video Sound
I have a problem where the stop funtion for a sound object is stopping the audio in an embedded video. Has anyone ever encountered this? Ihave poured over my code and there is no cross-linked intance names, so I do not have a clue what is happening.

Stoping And Playing Sound At A Particular Point (using Sound Object)
Hi,

I have a movie in which i have a voice over and some animations which is in sync with the VO. I have a play button and stop button.

I am using the sound object method to play the sound and the animations are in timeline.

I have to stop the movie at any point in time and when i click on play the sound should start from the point where it stopped..But it is not happening.

Please help me..

am having a deadline today..

lamus

Glitch With Sound.position And External Mp3 Sound Object
Hi,

I am in the midst of build a flash mp3 player and have chosen to load all of my mp3s externally and streaming using this method:

sndAudio.loadSound(track01, true);

The problem I am running into is that when track01 starts playing and I switch to another sound i.e.:

sndAudio.loadSound(track02, true);

the value in sndAudio.position doesn't get reset. This is causing havoc for me in my pause function and my counter as well... I am guessing I have to somehow delete the sound object and repopulate it when I stop a sound or start a different one but I am having trouble figuring this out. Has anyone had any luck with this before? Here is how I am initializing my sound object:

this.createEmptyMovieClip("mcSoundHolder", this.getNextHighestDepth());
var sndAudio:Sound = new Sound(mcSoundHolder);

I am running Flash MX 2004.

Thanks to anyone who can lend a hand,

Cheers,

T-Dawg.

Stop Sound File Early (using Sound Object)
I know I can use the play() method of the Sound object to offset the beginning of a sound. Ex:

mySound.play(2000) - plays the sound beginning at 2 seconds

Is there a way to get a sound to stop early? For example, if it is a 20-second sound, can I get it to stop at 18 seconds? Thanks!

How Do I Load External Sound Into A Movieclip Vs. A Sound Object?
I have a sound player movie clip that is designed to play the sound loaded into the parent movie clip. In particular, it uses "_parent.gotoAndPlay(targetFrame);" to start playing the sound. And it works well for statically loaded sounds.

However, how can I use this sound player movie clip with dynamically loaded sounds? The player requires a sound to be loaded into the parent movie clip, but the only way I know of loading an external sound is instantiating a new Sound() object and then using .loadSound(...). But loadSound doesn't load the sound into a movie clip.

So, how do I load an external sound into a movie clip versus a Sound object?

Thanks!

_global Sound Element/ Shared Object Sound
THIS IS DRIVING ME CRAZY
Im programing a childrens game that teaches music.
Needless to say there are a lot of sounds involved, so natuarrally I only want the sounds to load one time then just be referanced later to be played.
However, this game consists of about 10 different .swf files, that jump back and forth depending on user navigation.
I have tried defining the sounds as _global like so

_global.mysound = new Sound ();
_global.mysound.loadSound("noise.mp3")
playsnd = function(){
_global.mysound.start(0,0)
}
However this will only play in the clip it was defiend in, and I need it to be able to be called from any of the .swfs

I use this code to transpher between movies

unloadMovie(this)
loadMovie("new", this)

I have also tried converting the sound to a Shared:Object but it two only plays in the clip it was defiend in

user_so = SharedObject.getLocal("sndz");
_global.sndz = new Sound(this);
sndz.loadSound("soundz/parry.mp3");
user_so.data.song = _global.sndz;
_global.playsnd = function() {
trace("getting called");
user_so.data.song.start(123, 1);
};
user_so.flush();

OMFG, I have a deadline on Thursday, and I have not been making any progress
PLEAS HELP!!!!!!!!!!

Synchronsing Sound Using Sound Object Method
before flash 7 you were able to synch the sound to the timeline with and option in the properties window (using the "stream" or "event" setting) - this would ensure any animation would keep up with the soundtrack, and if need be would skip frames.

how can you do this with the new sound object and actionscript??? - is there a method for it? at the moment im creating a new sound object and then use the attachSound method to bring the sound in from the library, but it doesnt automatically synchronise with the graphics on the timeline

anyone any ideas?

cheers

steve

HELP Sound Object Stop Kills Flv Sound Too
code:
if (!firstTime) {
_root.introMusic = new Sound();
_root.introMusic.attachSound("music");
_root.introMusic.setVolume(50);
_root.introMusic.start(0, 1);
firstTime = true;
}

music_btn.onRelease = function() {
if (!rockNow) {
_root.introMusic.setVolume(0);
this.gotoAndStop(2);
rockNow = true;
} else {
_root.introMusic.setVolume(50);
this.gotoAndStop(1);
rockNow = false;
}
};
stop();


This script for my "music on/off" btn kills ALL audio and not just the sounds object audio. It also pauses FLV playback (I'm using the FLVplayback component). Any insite?

I've tried modifying the above AS not using the "_root." to target the obj and also stop() and start() on the obj instead of just volume control. HELP!!!

Thanks,
1M.

Load New Sound Into Existing Sound Object
I have an extremely simple AS3 mp3 player that I'm trying to create but the problem I'm running into is that I can't seem to load a new song into my sound object when I switch tracks. Here's the basic code I'm using:


Code:
var sound:Sound = new Sound();
var sControl:SoundChannel = new SoundChannel();
var isPlaying:Boolean = false;

function triggerAudio(id:Number, path:String, type:String):void {
if(isPlaying){
sControl.stop();
sound.close();
isPlaying = false;
} else {
sound.load(new URLRequest(path));
sControl = sound.play();
sControl.addEventListener(Event.SOUND_COMPLETE, completeHandler);
isPlaying = true;
}
}
Right now, playing an initial song works
Stopping a song works
But loading a new song over top of a previously loaded song doesn't.

I'm brand new to AS3, what am I missing?

Streaming Sound Distorted - Sound Object
I have a streaming sound that is loaded into my flash movie (will end up on CD) that is very distorted, it sounds like someone is slowing down the audio, the voice sounds deep and slow. its kinda funny, but I doubt my boss will think so.

anyone ever run into this before?

[F8] Recording Sound From A Sound Object To Mp3 Using AS - Brainstorm Here
Hi guys,

Im creating a number of little flash instruments, that I need to be able to record the sounds/songs they create. AFAIK, there is no official way to do this in AS, but I was hoping the more creative scripters around here might be able to help me find a solution?!

The worst case scenario is using the microphone I guess, but i would like to avoid that if at all possible.

Please brainstorm with me here!

Steve

Streaming Sound Distorted - Sound Object
I have a streaming sound that is loaded into my flash movie (will end up on CD) that is very distorted, it sounds like someone is slowing down the audio, the voice sounds deep and slow. its kinda funny, but I doubt my boss will think so.

anyone ever run into this before?

Sound Object Attach Sound Or Load
Hi

I am wanting two sounds in my FLA one for movie clip buttons and one for background music.

In the past I have created a sound object and just loaded the file from a location on the server, but I've just seen an aletrnative method thats works very much in the same way but you import the sound files into the library and then export for action script and then attach them to the sound object.

Which is the best method to use? If I bring them into the library do they contribute the FLA size? and if they do is this worse than just loading them?

What are the pros and cons of each method? and which is best to use?

Thanks

Ricky55

Advance Sound In Sound Object?
Hey all. Check this:

I need to advance a sound to a certain timeframe. For example, go to 120000 (2 minutes). Is there an way of doing so?

Thanks,
Leo

The Sound Object 'mySound=new Sound();
I had an Idea of using dialogue sound and background loops together on my demo. I wanted to do this using the Sound object using linkage to export all sounds embedded in the same .swf. I also wanted to have two volume sliders. One controlling the volume of the Dialogue, the other controlling the background loops, using the mySound.setVolume(); method.

The problem: everytime I instantiate a new Sound() object it supercedes the old one, even though I give the two objects unique identifiers (names)

Can you only have one sound object playing at a time?

Loading Sound With Sound Object() 'DAP'
Hello,

i was running a test in trying to preload mp3 dynamically using the loadSound function and notice that if am running DAP which is the download accelerator program the flash file doesnt work and instead DAP tried to download the mp3 file. however on diasbling the DAP it worked.

did any one ever encounter a similar problem? was there a solution

Sound Object To Tell You When Sound Stops?
I'm having a problem. I'm developing an intro/offline presentation in flash for a client and it has music in the background to go with it. I have imported the sound and attached it to the first frame after the preloader using the sound thing in properties panel. Now how do I know when the sound ends? If i put a frame down a couple 1000 frames i see where it says it ends, but i added a keyframe on a different frame there and put something like "music ends" in a text box, but when i play it the music ends about 30 seconds before that. And the worst part is it ends at different times depending on the computer. I want to display something right when the music ends. Is there some way (probably with sound object) i can do something like this:

[on frame 999]
if(!sound.on){
gotoAndPlay(1000)
}else{
gotoAndPlay(998);

so it keeps testing to see if the sound ends, and when it does it continues to play the rest? I took out moock's Actionscript the Definitive Guide, but all i can find on the sound object is how to control stop and play, not to test if it is playing.

Thanks

Sound Object - End Of Sound Detection?
Hi all,
is there a possibilty to detect the end of a sound called by a sound object?
i have a few sound objects which i need to play in a raw.
Thanx

[F8] AS2 Sound Object - Sound Never Plays
Hi there, I'm trying to build a JS sound control class using some simple ActionScript and ExternalInterface.

Problem is that the sound never works when I try to play it. Is there a glaring omission in my code?


PHP Code:




import flash.external.*;
import System.security;

System.security.allowDomain("*");

var sounds = new Object();

function registerSound(url) {
    var s:Sound = new Sound();
    log('URL is: '+url);
    s.loadSound(new URLRequest(url), true);
    sounds[url] = s;
    log(sounds[url]+' registered.');
}

function startSound(url) {
    log("Starting sound: "+url);
    log(sounds[url]);
    s = sounds[url];
    s.start();
    s.onID3 = function() {
        for(var i in s.id3){
            log(i+':'+s.id3[i]);
        }
    }
}

function log(mess) {
    ExternalInterface.call('console.info', 'Flash: '+mess);
}

ExternalInterface.addCallback("startSound", this, startSound);
ExternalInterface.addCallback("registerSound", this, registerSound);







Thanks for the help!

Looping Sound Using Sound Object...
Hi i have the following AS code:


ActionScript Code:
var song_sound:Sound = new Sound();
song_sound.attachSound("background_music");
btnSoundOn.onRelease = function() {
    song_sound.start();
};
btnSoundOff.onRelease = function() {
    song_sound.stop();
};

At the moment on clicking sound on, it plays the track once, is there a way i can make it loop continuously?

Sound Object - Specifying Only Certain Sound To Stop
Hi everyone. I'll try to make this as brief as possible. I am creating a flash project which contains video on a few pages. The project also contains background music which loops contiuously.

The goal is to have the background music stop whenever the user is on a page containing video and for the music to play again when the user leaves said page.

The script I created works to stop the music, but it also stops the audio contained within the video and causes the video player (by proxxus) to lock up.

The solution is probably a simple one, but I'm having difficulty figuring it out.
If anybody can see where I've gone wrong, your help would be greatly appreciated. Here's the setup:

Library:
music.wav - linkage = "myMusic01"

Main Timeline:

Code:
//-- create a variable to determine if the current movie contains video
var currMovie:String = "notVideo";
//-- start playing sound object
myMusicMc.myMusic.start(0, 999);
myMusicMc (residing on main timeline)
frame 1

Code:
//-- set up sound object
myMusic=new Sound();
myMusic.attachSound("myMusic01");
frame 2

Code:
//-- check the variable "currMovie"
if (_root.currMovie == "Video") {
_root.myMusicMc.myMusic.stop();
} else {
_root.myMusicMc.myMusic.play();
}
frame 3

Code:
//-- create a loop to continuously check the variable
gotoAndPlay(2);
on the actions layer of the movie clip containing my navigation controls
snippet of the callback used

Code:
videoLink_mc.onRelease = function() {
_parent.prodDetail_mc.gotoAndPlay("video");
_root.currMovie="Video";
}
on all the other buttons currMovie is set to "notVideo"

Sound Object
Hi everybody!
Can anybody tell me where I can learn about the sound object in Flash??
I already know how to put sound in the "classic" way in flash, but I need something much complex.
I tried with actionscript documentation but I couldn´t understand.
Thank you very much.
Best regards,
Strato

Sound Object
please help

mix is sound object
mix.start(0,50);
mix plays, 50 loops right?

how does flash know it's done with 50 loops ?
and doesn't play sound again.
there must be a counter in there somewhere.
what is it, how do i get to it.

please, anybody know?

how about this.
mix.start()
sound is playing
is there a boolean test?
true when sound is looping
false after looping done, sound off?

help, i've been looking for 6 hours.

thank you,
^_^

Sound Object
Is there a way to have sound object load an outside file then so that u can have many sounds but still keep the main movie small? if ther is how? Thx a lot!

Charles <><

Can Everyone Try This One Concerning Sound Object
Basically I'm bringing in a sound dynamically - I have imported a sound gone to linkage called my sound "adultTune4" clicked Export for ActionScript and Export for first frame

Right on the first frame of the main timeline I have this


function goPlay(){
moviesound = new Sound();
moviesound.attachSound("adultTune4")
moviesound.start(5,0);
}


I then have a button with this(which is simply a call to the function


on (release) {
goPlay();
}


Great this works my tune starts playing 5 seconds into it
however when I simply replace

on (release) with on (keyPress "Enter") (with the arrows around Enter dont show up in this post)


It fails to play my tune at all!!!!!


very frustrated - does anyone know why??? or how to resolve this problem

thanks in advance

Sound Object
It seems I've seen this posted before, but I couldn't find it. I'm using sound objects, and when I stop one sound, all sounds stop. I don't mean using stopAllSounds(). I mean:

_root.mysound.stop()

Which, I thought should only stop "mysound," but it stops all sounds. Anyone know what's up with this?

It would also be helpful to know if anyone else has sucessfully used the stop() with a sound object and NOT had the background sounds stop (like stopAllSounds). This way I would at least know that what I need to do is possible.

Thanks very much.

Sound Object
I want to use the sound in my library rainHeavy with the sound object. I have a movie clip called heavyRain to have the sound attached.

What I'm using now is:
RainHeavy = new Sound(heavyRain);
RainHeavy.attachSound("rainHeavy");
RainHeavy.start(1,999);

this doesnt work.

I have read through the help files exstensively and it doesn't help. If you could give me some brand new code, or maybe spot whats wrong with mine... it would be great.

Sound Object
I want to use the sound object that the user can control the volume of sound they here but I can't figure out how to get the sound to loop when I add it programatically.
Can anyone help?
thanks,
Jeff

Sound Object With Mac OS X
hi everyone,

i'm using code like this:
mySound.setVolume(0);

to mute streaming sound. ist works fine (as it should). except for mac osx obviuosly because i still can hear the sound there - using either ie or mozilla.
is this a bug and is there another possibility to mute the sound (streaming sound, not event sound)?


thx
eman

Help With Sound Object Please...
Hello everyone.

I'm working with the sound object and I need to know if it is possible to get the name of the attached sound. For example, if I do this:

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

Is there a function that returns "firstSound01"?

You know, something like this:

function returnName(){
return (firstSound.getmyNamePlease);
}

Anyone have any ideas... thanks for everyone's time!

Javier Cerdas
Atlanta, GA

Sound Object
I've read the MX tutorial about Sound Objects
( http://www.flashkit.com/tutorials/Au...-824/index.php ) a couple times, it's been helpful but I do have a question.

Quote from Page #2:
"For this section of the tutorial, "firstSound" will refer to the name chosen for the instance of the sound object. Similarly, "firstSound01" will refer to the identifying name inserted in the linkage properties of the sound file that will be imported into the Flash library.


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

Is it possible to attach different sounds to an object at different times, like a function that will reset "firstSound" so I can then attach "firstSound02" to it?

Sound Object Help
I'm producing some CD-Roms at the moment that have animation running with voice overs and music.
Dumping the sound on the timeline has always worked for me until now. On checking the exe on other machines of a lower spec, and on laptops the s-s-s-sound and m-m-m-usic it a bit stuttery.
I've heard of sound objects but the tutes i've seen so far haven't been very helpful.

Can anyone point me to a really wicked sound objects tutorial please?!

T-T-T-Thanks

Sound Object
Does a sound object have to follow the same rules for path as a movieClip.

For example if I create a sound object in a movie clip that is itself loaded into a movie (swf) that is itself loaded into a main movie, what should I do?

mySound = new Sound();
_root.mySound = new Sound();

Somehow I cannot turn the sound on and off anymore for the sound object that was peviously working when it was directly in the main movie.

???

Sound Object
I have three swf.files, namely main, sound file, text file. The main file host the main controls and animation. Depending on user interaction a certain textfile will load into the main movie and subsequently load accompanying sound.swf. I use the Sound object to have better control over the sound, ie. mute sound etc. However I need to be able to calculate when I am at a certain point in the sound file to trigger an specific animation in the main movie. At first I did this from within the text file as I used animated scrolling text at first. The problem was that different processors move the text at different speeds, thus resulting in an impossibility to syncronize the sound to the moving text or animation.

Thus now that I am using static text how would I be able to trigger the animation in the main movie at a certain point during the sound playback.

Hope this makes some sense to someone.

Could realy use some help.

Sound Object Help....
Hello, I'm a newbie/student. Would anyone know of any tutorials out there that deal with the sound object in particular. The tutorial here on flashkit was helpful, but it didn't answer all of my questions.


I'm trying to create a horizontal scroll bar that will enable the user to scrub through audio much like the ones on any of the media players such as quicktime, media play and real player. However, the question that I have is that the audio clip does not exist on the timeline, but exists in the Sound Object.

I'm not looking for people to tell me how to do this, I'm just looking for a tutorial so I can learn this myself. THanks.

Sound Object
whats the simplest and best way to with a click of one flash button pause and then start a sound object


any help would be great

Sound Object
In a movie clip I name and start a sound object with such a script

risk01Sound=new Sound();
risk01Sound.attachSound("risk04a");

{ risk01Sound.start()
}


The i want to from the main timeline be able to pause the soundobject playing and also start again

I had it working fine but now due to the soundobject starting in a movieclip i cant seem to comunicat to it..

the scripts i was using on start and stop buttons were

stop=====

on (press) {
myMusicPosition=_root.riskSound.position/1000;
_root.riskSound.stop("risk03a");
}



start=====
on (press) {
_root.riskSound.start(myMusicPosition,0);
}


any help would be awesome

cheers luke

Sound Object
Is this possible (assing one sound object to another):

//initializing
sound = new sound();
sound_prev = new sound();
sound_next = new sound();

sound.loadSound("song1.mp3", true);
sound.loadSound("song2.mp3", true);
sound.loadSound("song3.mp3", true);

//if NEXT button is clicked then:
sound_prev = sound;
sound = sound_next;
delete sound_next
sound_next = new sound();
sound.loadSound("song4.mp3", true);

AS Sound Object
I have the following code below on the main timeline in my movie. The problem is that when the deactivate button is pressed the rollover sound is turned down. From what I have read here and from Kenny Bellew it should work but it doesn't. Does anyone know what I am doing wrong?


Code:
audio.activate._visible = false;
mySound = new Sound(music);
mySound.attachSound("ambience");
mySound.start(0, 9999);
mySound.setVolume(50);
audio.deactivate.onRelease = function() {
mySound.fadeToStop(0, 1000);
audio.display.gotoAndPlay(45);
audio.activate._visible = true;
audio.deactivate._visible = false;
};
audio.activate.onRelease = function() {
mySound.setVolume(0);
mySound.setPan(0);
mySound.onFadeChange = null;
mySound.onFadeComplete = null;
mySound.start(0, 9999);
mySound.fadeTo(50, 1000);
audio.display.play();
audio.activate._visible = false;
audio.deactivate._visible = true;
};
navigation.home.onRollOver = function() {
buttonSound = new Sound(sfx);
buttonSound.attachSound("beep");
buttonSound.start();
};

Sound Object
hey everyone,
In Flash 8, I created a sound object, like this:

function soundchange(theSound) {
var music:Sound = new Sound();
music.attachSound(theSound);
music.start(0,99999);
}

It works pretty well, except when I call the change the sounds overlap, where as I was expecting them to replace one another. Can someone tell me how to make this happen?

Thanks!
-B

Sound Object...
I am trying to create a sound object to be played whenever a rollover of a movie clip occurs. Here I have the actionscript from frame 1 of the time line. This doesnt seem to work but I cannot find any example that would. Can anyone help?

var focusSnd:Sound = new Sound();
_root.focusSnd.attachSound("focus");

_root.tempButtonMC.onRollOver = function() {
_root.bgMC.gotoAndPlay("fOut");
_root.focusSnd.start();
}

_root.tempButtonMC.onRollOut = function() {
_root.bgMC.gotoAndPlay("fIn");
}

Sound Object Help
hi, I have a problem regarding Sound Objects.

this is my code on the first frame of the movie.

var Theme:Sound = new Sound("GlobalSound");

Theme.attachSound("heyBlondie");
Theme.start(0,99);
Theme.setVolume(25);

later on, in a nested movie clip, I'm trying to perform the setVolume command on my Theme object, like so:

_root.Theme.setVolume(0);

and it doesnt mute the sound (I tried with and without the _root);

if you know whats the problem with the code, please help.

thank u.

Sound Object Help
I have a sound object in an array named myAmbSound[1], I am trying to create a string so I can turn that sound off like this:

var yourAmbSound:String = '_level0.audio_mc.myAmbSound['+i+']';

I get the trace perfect (_level0.audio_mc.myAmbSound[1])

but I cannot use this string to turn the sound off like this:

ambSoundToFade.stop();

Any ideas?

Thanks, Dvl

Sound Object Help
I'm on a project right now that uses an audio player that's giving me issues. What happens is that sometimes the audio that's called gets cut off a bit too early. I went back and manually added a second of silence to a couple audio clips, and that seemed to fix the issue. Problem is, we have hundreds of clips like this and no time to go back and fix them all.

So I was wondering, is it possible to make sure onSoundComplete is called a little later? Or failing that, to add a second of silence to the end of an audio clip using the Sound object? Nobody here knows, and I havent been able to find a way to myself.

Sound Object
NB question-
is there a way to cause a sound object that plays when my site loads to not play when a track is opened that includes talking, so we only hear the talking without the music?

the talking track is on another layer....

thanks for any help.

Sound Object
face some problem here : Have 2 page of text to be show with sound. Also have 1 page let user to click on radio button to choose whether want to listen to the sound or not listen to the sound.

how to load the sound to play while the user click on tat page n if the user choose to off the sound all the sound on page 1 n page 2 will off.

how to do this with using as?

Sound Object ?
In my movie I set up a sound object VSound. This object is used to control all my movies voice overs. The code looks like this

ActionScript Code:
_root.stop();
// Load voice
VSound = new Sound(Voice1_mc);
VSound.loadSound("Voices/Voice1.mp3", false);
// zero offset, repeat 10 times
VSound.start(0, 0);
///////////////////////////////////////////////////////////////////////////////////
VSound.onSoundComplete = function() {
    _root.gotoAndPlay("v1");
};

Now on my menu buttons I want to add some script that will stop the current voice from playing. So I tried something like this.

ActionScript Code:
on (release) {
    //stop all voice overs
    _root.VSound.Stop() 
    //////////////////////
    for (var i in _root) {
        if (typeof (_root[i]) == "movieclip") {
            removeMovieClip(_root[i]);
        }
    }
    _root.gotoAndPlay ("EarnMore")

}

The problem I have is the line "_root.VSound.Stop()", stops all the voice overs, not just the one that is playing,which is not what I want.

Whats the best way to turn off the current voice? I know I could specify the exact voice I want turned off. Like Voice7 or Voice55, but I may not be on Voice7 or Voice55 when I click the button.

Sound Object
I have loaded a music loop with the sound object and have it playing over several scenes. In one scene though I have two flv's with dialogue playing on top of the music.

What I want to do is just have the sound quieten for this one scene so I can hear the flv's. How would I do this?

Sound Object Help
Hello all!

I have a main menu, from there i have buttons that link to videos and such. I have a sound object created right now in the "main menu": - by the way "main menu" only has one frame on the timeline everything is on frame 1.

myMusic = new Sound();
myMusic.attachSound("loop");
myMusic.start( 0, 1000 );
myMusic.setVolume(100);

when i click on button on this menu, it loads in a swf over top and the sObj is shopped.
on(release) {
myMusic.stop(["loop"])
this.loadSwfs.loadMovie("about.swf", swfLoaded);
}

the problem is, on the "about.swf" there is a button that takes someone back to the "main menu". here is the code on that button:
on(release) {
unloadMovie(this);
}

However, when this swf unloads, the main menu appears, but the background music will not play.

Can anyone help me and point me in the right direction to get my audio to play?

Thanks so much!

Sound Object
Can we load sound dynamically without playing...........

Copyright © 2005-08 www.BigResource.com, All rights reserved