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




Newbie W/ Sound--Please Help



I'm a newbie with sound and I am creating a Flash CD-Rom business card/presentation and I have two sound clips--a voice over and some background music. I have NEVER had to use sound and have to control when it stops, volume, etc...but that's basically what I need to know. I need to stop and start the voice over at certain frames and I need to lower the volume of the background music when the voice over begins. Tried putting the sounds in movie clips and that didn't seem to work. I'm pretty familiar with actionscripting and the program itself--just never used sound really--any help is GREATLY appreciated, thanks a lot!!!



FlashKit > Flash Help > Flash MX
Posted on: 09-23-2003, 03:21 AM


View Complete Forum Thread with Replies

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

Newbie Sound
right now i have sound on my website and i wont an option to have it play or not. right now its just on the timeline and i want a button to make it stop or start what is the code for this button?

Newbie Sound Help
Good evening!!!

I have large mp3 files sitting next to my flash files in a folder on my desktop. By pressing corresponding buttons, I would like for the user to be able to play each song.

I've read the bits and pieces on it, though I must be doing something wrong because I hear nada!!! This is for a class project in Studio 8 and the instructor is out and ill — great, eh?

Can anyone provide a sample of what the whole of this might resemble so I might trouble shoot the code I now have. I need to figure what I am missing.

I don't know why I am having such a spat with sound today...

thank you.

Newbie: How Can I Add A Sound Loop?
Hi there,

I'm new to Flash MX and would like to know how to add a mp3 sound loop on my site. All I want is music in the background once it loads with no fancy buttons, equalizers, etc.

Thanks to all of you that help!

[MX04] Sound (newbie)
Sorry for this question but i really been searching the web for like 2 days..



I have a sound loop and my flash loops it real crappy. How do i do something like this.




if (sound is like .2 seconds from the end){
end it and start a new loop.
}



I dont get it, i make perfect sounds for looping (wav and mp3) but when flash does it it puts this horrible sound and a pause between loops.



im guessing if i stop the sound .2 seconds before it finished it wont contain that ugly clicky sound.

Newbie Sound Question
I'm having trouble controlling sounds within my Flash movie. In the first frame of my timeline, I declare two new Movie clips at the root, then define the sounds 'qsaudio' and 'music':

_root.createEmptyMovieClip("soundClip1", 1);
_root.createEmptyMovieClip("soundClip2", 2);

var qsaudio = new Sound("soundClip1"); // Quickstart sound
var music = new Sound("soundClip2"); // Music sound

Shouldn't I be able to attach sounds to, start, and stop the sounds 'qsaudio' and 'music' from within other movie clips?

For example, if I have a sub movieclip with the code:

_root.qsaudio.stop();

Shouldn't that stop the qsaudio sound? Currently I can manipulate the qsaudio and music sounds at the root level, but not from within other sub clips. How is this done?

Newbie Sound Questions
Hey there I'm pretty new to flash, just about getting the hang of buttons....I have a college project that I'm working on and have to include some sound. I wanted to know whether you could add actionscripts to imported sound files at all? You see, I wanted to lay some background music over a scene in my project, but want the music to fade out and stop once you have clicked on a button to move on to the next scene. Is this possible? I have tried laying the music down on the stage, but the duration of the tracks ususally isn't long enough, or too long!! Another thing was that because i have quite a few buttons placed in my project, I'm not sure if when the user (target audience) viewed the work, that the music would suddenly stop at any time, because he/she hadn't clicked to on to the next scene in a sufficient amount of time...

sorry if it's really hard to understand, I tried my best to explain in words, hopefully one of you guys/girls will understand.

HELP Newbie Needs Help With Sound Button
Hi everyone and anyone,

I'm new to flash and actionscripting. i've made these buttons that are to run a wav file. the stop and play functions work, but if you don't click stop the file loops over and over. I'm wondering what the actionscript would be to fix this problem so that once the wav runs once the sound stops and the play button returns. I tried writing in a prevFrame command on the stop button, but that doesn't seem to be working and I get a syntax error every time.

Help anyone please,

- D -

Complete Newbie Needs Sound Advice
Hey Everyone,

I need to know how to make a button that plays an MP3, and then one button that stops that same sound. How do I do it? I'm using Flash MX.

Much Thanks,

_Eck

Newbie Sound Issues (Flash MX)
I'm creating a presentation for my company in Flash MX, and I've had some moderate success using one of the built-in templates. The basic objective of the presentation is to teach people how to use a piece of software, using animated screenshots and a recorded voice-over. Now, the way I currently have this designed (and I imagine I'm going the wrong direction here), I'm using a sort of slideshow template, with arrow-buttons to navigate back and forth between frames. The template was designed more like a powerpoint presentation, so I may be trying to smash a square peg through a round hole, but I'm trying. What I've done is to create movie symbols for each frame, and inside of each movie/symbol, I've created what is essentially a stand-alone chapter. So far the individual chapter creation isn't too hard - simple layers with simple animations, no interaction.
So, now to the problems:
1) I'm been recording my voice-overs in .wav and converting to MP3 before importing, but for some reason the program doesn't seem to want to import larger mp3 files. Is there a limitation I haven't found?
2) When navigating back and forth between frames, the sound does not stop and start properly. What it should do is when I move from frame 1 to frame 2, the sound from frame 1 should stop, and the sound for frame 2 should start. I'm not using scenes (although I probably should be) because the tutorials I read first and the template I was using had no scenes in them. I'm not averse to even a drastic action at this point - I'm coming down to the wire with my boss breathing down my neck expecting me to be a genius programmer.

Any thoughts?

A Newbie In A Dire Need For Some Sound Advice
Before all, thanks guys for all your input. I have a sound loop that I have set up to play once and fade out. On a MAC it just cuts off right in the middle. I think I know what the problem is. I have an AVI and a SWF of the same sound clip. Because I couldn't figure it out how to import the SWF of the sound and use it (there are some commands that need to be added for it to work as far as I know) I just imported the AVI, compressed it and just placed it on the main timeline in the first of two scenes on its own layer with no commands. It just stretches out till the last frame. I know that is the wrong way to do this or rather not the best way. Importing and using a movie with the sound makes the file size smaller as well. If any of you guys know how to do this, would you give me a hand with it? I've seen posts here that explain it and I tried it but had no luck and gave up on it. I'd really appreciate some help with it. I'll search around to see if I can learn how it is done on my own as well of course. Thanks again guys.

Here's my intro:

http://www.ntd.com/intro.html

SlideShow And Sound Issues For NEWBIE
Hi,

I am working on a slide presentation and I am having this problem.

I have created a Layer on a slide in a slideshow and attached an MP3 file to that layer. When I advance the slide presentation to the next slide the sound from the first slide continues to play until it completes. I would like the following to happen and I dont understand how to do it.

I would like to have a sound attached to a slide and when I advance the slide I would like the sound on the first slide to stop and the sound on the second slide to begin.

All help is greatly apperciated. Remember I am a newbie and you can dumb it down as much as you want.

Note: I am using FLASH PRO MX and started my project using one of the provided templates

Newbie Question About Background Sound
I've got a flash template that I've been working with which includes a background sound file that loops through out. I can't figure out where the sound file is being loaded - can anyone give me a general idea of where to begin to look?

Newbie With Sound Control With AS Headaches
Hello,
This is probably really easy to do, but I'm still new at scripting, so please be gentle ...
Here's what I'm trying to do:

When the main swf loads, welcome.mp3 plays once automatically.

On the timeline, I have a movie clip with an instance name of BGM_controls. Inside it are two buttons, stop_btn, and play_btn. The movie clip contains some simple tweening to allow the buttons to fade in or out. I use frame labels to control the animation.

When the movie begins and the music starts playing, stop_btn fades into view. On click, the music stops; stop_btn fades out from view; and play_btn appears. Then, when a user clicks play_btn, the music begins again; play_btn disappears and stop_btn re-appears.

In case the user allows the music to play without interruption, stop_btn turns into play_btn when the song ends.

Below is the script I put on the first frame of the timeline. The music plays, and the onSoundComplete function operates as planned, but the buttons themselves don't do anything. Can someone tell me what I'm doing wrong? Thanks a bunch!
-------------------
//Start playing welcome.mp3
var my_sound:Sound = new Sound();
my_sound.attachSound("welcome.mp3");
//When song stops playing by itself, switches stop button to play button
my_sound.onSoundComplete = function() {
tellTarget ("_root.BGM_controls") {
gotoAndPlay("stout");
}
};
my_sound.start();
//Behavior for stop button
_root.BGM_controls.stop_btn.onRelease = function() {
my_sound.stop();
tellTarget ("_root.BGM_controls") {
gotoAndPlay("stout");
}
};
//Behavior for play button
_root.BGM_controls.play_btn.onRelease = function() {
my_sound.start();
tellTarget ("_root.BGM_controls") {
gotoAndPlay("stin");
}
};
-------------------

Hey All - Newbie Problem - Little Confused About Sound
Hey everyone,

I've only been using Flash for about a month now, well, maybe less. I read as much as I can but I have a little problem I just can't figure out.

I have a small swf file that contains the sound for the site and the button to toggle the sound. There are 2 layers in this small swf (65k). The first layer for the sound with 2 labeled keyframes and the second for the button with 2 keyframes (1st for music on -2nd for off). Here's the code on the button:

on (press, release) {
if (bass == "true") {
bass = "false";
gotoAndStop(2);
stopAllSounds();
} else if (bass == "false") {
bass = "true";
gotoAndPlay(1);
}
}

Like I said this is in an swf file of its own so GotoandStop doesnt affect the main swf. The main file uses the loadmovie command to link the sound swf into an empty container. Kinda weird I guess.

I have a preloader too - *compliments of Kirupa* -

PROBLEM IS: The 400k main movie loads before the sound swf as you'll see if you click on the link below. I tried to import the sound swf into the main and use attach movie, but the swf won't work.

Same problem if I just try dragging it out of the Library. It plays like a regular movie file with 2 frames, not a button.

If I open the sound fla file and try to copy the frames into my main fla, the button ends up stopping the whole movie, not just the sound (despite changes to the code). I'd like to attach the source but the files are huge.

Can anyone out there help out a newbie?

And BTW, you can lemme know what you think of the site too. It's still a work in progress Thanx all.

AutoTile

Newbie Question: On/Off Sound Button
I was looking for a tutorial for this but couldn't find one, so I came here, hoping that someone could help. You know those buttons in those movies where when you click 'em, they turn the sound off (usually a loop) while turning into a different image usually depicting that the sound is off, and when you click 'em again, vice versa? I just wanna know how to do that. If you've got an answer, please try to include how they swap the image as well. Thanks to anyone who is willing to help, screw those people who can help but won't XP. (Joking.)

By the by, I suck enough that I probably require a step-by-step thing. Sorry!

Newbie Question: On/Off Sound Button
I was looking for a tutorial for this but couldn't find one, so I came here, hoping that someone could help. You know those buttons in those movies where when you click 'em, they turn the sound off (usually a loop) while turning into a different image usually depicting that the sound is off, and when you click 'em again, vice versa? I just wanna know how to do that. If you've got an answer, please try to include how they swap the image as well. Thanks to anyone who is willing to help, screw those people who can help but won't XP. (Joking.)

By the by, I suck enough that I probably require a step-by-step thing. Sorry!

Sound To A Mouse Down Event: Newbie
How would I add a sound to a mouse down event? ie,. I would like to add a gun shot sound to a mouse click. I hid my mouse and made it crosshairs. Any help would be appreciated. Thanks...

Roger

Problems Starting And Stoping A Sound... Help A Newbie Please
Hi,

All I want to do is add two buttons that will stop and start sound.

Here's what I've done:
I created two buttons and added the following action script to each one.

on (press) {
Sound.stop();
}

on (press) {
Sound.start();
}

The sound name is "Sound". I thought that by reffering to the sound name and the stop or start methods, I could control the sound... I guess not! Can anyone help?

Regards
Nelson Cardoso

Sound Problem - Moved From Newbie Shock
Hi all.

I wanted to fade a sound in and out in Flash when the user clicks a button. I used two invisible MC's to achieve it and it works great. However, now when I try to add another sound later in the timeline, nothing plays! Aaargh!! I'm wondering if I've accidentally muted all sounds or something.

I've been playing around with this for ages and am about to explode! I just think I don't have the AS knowledge to figure it out. I've uploaded the fla here if somebody much more talented and intelligent than me could have a look at it, that would be great.

Thanks in advance, Bren.

Bizarre Sound Distortion On Export - Not Newbie Compression Issue
I'm trying out the Flash CS3 demo - OSX. (Using OSX 10.4.10.)

I've got a slightly complicated timeline with about 8 layers and some things alpha fading in and out, and a bunch of sound samples being used as timeline sound effects (forget the term, but attached to frames not streaming). No scripting.

The sounds are mostly too long for the amount of time allotted to them in the timeline, and cut previous sounds off. I'm speculating this might be a possible issue. That is, I have say a 5 second sound, which has only 3 seconds of time to play, before another sound interrupts it in the same timeline layer.

There are two separate layers of sound playing at the same time.

All the original sounds are imported into the movie as 44.1/16bit AIFFs. They are mono files (might be another possible issue).

I'm trying to export with quality of 128k MP3. I've been trying different variations:

- setting the compression for the audio files in the Library/setting movie export settings to use Library settings

- setting audio files in the Library to use "default compression", and specifying the correct 128k MP3 setting in the export settings

- or both of these (set individually in library, then overridden in export settings).

I've tried with and without the "use mono" setting (both in Library files and export settings). (This is a question for me: what should be the correct setting for that when the original file already is mono?)

Sometimes everything's great. I test or export the movie and the sound is fine.

Other times I test or export the movie -- with exactly the same audio settings as the last time when it worked -- and now get unbearably hideous hissing/cracking instead of the correct sound.

Most dangerously -- I think but haven't quite convinced myself -- the same flash export file may sometimes play fine, and sometimes play with the distortion. So I'm not sure if this is an export issue, Flash player issue, or combination of export doing something semi-weird that the player only sometimes chokes on. A "bad" export is distorted both in the desktop Flash player that comes with the Flash demo, and in a browser with Flash plugin 9 r45 (OSX).


GUH!

And this is the $800 product which is little more than a basic text editor for scripting and an animation timeline that hasn't gotten updated functionality since 1999.

Action Script 2.0 Making A New Sound Play After One Has Completed. Newbie.
Hi again.

I hope I can find some help on this subject. I used this code:

mySound = new Sound(this);
mySound.attachSound("sss-short");
mySound.start(0, 1);

to attach a sound and make it play using AS. BUT I want to know if after that sound has completed playing can you have another sound play in the same action script box. Or do you have to make a new actions keyframe with the new sound on it? Can it be on the same layer? I tried a few different variations but I get the two different sounds playing overtop of each other. I hope someone can help me on this subject.

Thank you!

Sound Bleed From Scene To Scene: Newbie Needs Help
im just learning flash mx

i have a simple scene with a background sound looping on a layer continuously.

once that scene is done the next scene loads up with its own back ground sound

my problem is that the first scenes background sound bleeds into the 2nd scene.. and so on..
it does end eventually
but how do i make it stop exactly when that scene is done.??

this must have an easy explanation

please help the newbie

Gibbosniper Vs Munkie Or Newbie Vs Newbie
Ok Gibbosniper,

This is the start of the thread, for our contest of Newbies brains in action. Let us set a time limit of sorts, and go from there.

Again, I am far from an MX master, I just started just over a week ago, so it might take a while for me to produce something worthy of public display, but if you are patient, so am I.

Game on!

Munkie!

Keyboard Control-for A Very Newbie Newbie
I was wondering if there is a simple way to control flash animations when
pressing a key on the keyboard. Example: Scene 1 is an animation of a
circle, this scene will continue to loop until I press the 'f' key, and
then the flash movie will change to Scene 2 where we see the circle
explode. I looked around flashkit.com and found some tutorials, but I
think they used an earlier version of flash, because I can't find the
instance properties in order to change the action from mouse click to key
press. I own flash professional 8. Anyway, I can use as much help as I
can get, so if you know of an action parameter in which I can execute
this...action, it would be greatly appreciated! Thank you for your time!
-Timmy

Newbie Asking A Newbie Question
Thanks for looking at my post. I am very new to Flash and I want to make a simple movie withsome text. I know how to insert text and customize it, but I wanted to know how I could jazz it up a bit. Add some effects to it. I was wondering if anyone could help show me how to make it shine, or glimmer, or glow, or something of tht sort, you know? You know on the Ultrashock logo when you put your mouse over it, it shines? I wanna know stuff like that. Can anyone help? Is there a tutorial or we page I can go to? Thanks in advance, and thanks for looking even if you can't help...

Attach Sound, Play Sound & Stop Sound.
Hey there,

I was wondering if any of you could help me please.

I want to play a song which I have named "rundmc" The file extension is ".mp3"

I want a button to play this mp3 which I read you need to attach that sound, then play it and I want to a button to stop that sound, or preferably the play button to change into a stop button.

I've read the help files, but none of it works and I've changed the linkage for the mp3 to export for action script, but nothing works!!!

Please help,

NK.

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

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

Is It Possible To Change The Sound Volume On Individual Attached Sound Clips?
For instance, I have 2 attached sound samples, both playing continuously. I want to be able to control the volume for both separately.

All I know I can use is setVolume, but that one seems to be global only and changes the volume on both.

I tried having different names on the attached sounds (sound1, sound2) and had the volume buttons refer to sound1.setVolume and sound2.setVolume, but each of them controlled both sounds. Also tried attaching the sounds into individual MCs, but got the same result .

So, can this be done?

Edit: oh, there was a forum for sound and music, my bad. Can seem to find how to delete this thread so have to leave it here or if some mod moves it.

Edit2: Ok, think I got it to work, was trying this method before posting (from FAQ), but couldn't get it to work... might have now... buggy it seems.

Quote:




Why is my sound object controlling volume or pan of all sounds in the movie?
a sound object without an associated mc is a "global" sound object and controls volume and pan of all loaded sounds.

to ensure that a sound object controls just one sound pass the target path of a unique movie clip to the sound function.

myuniquesound = new Sound(target path to unique mc);

OR

// dynamically create a mc and associate it with a sound object
soundobject = new Sound(createEmptyMovieClip("snd",getNextHighestDep th()));




Edit3: Problem solved .

AS3 - Sound Bug - Multiple Copies Of The Sound File Plays/loads
AS3

I have a script that loads an mp3 file. Then, there is some visualization with to the music. When first loading the flash file, there is one copy of the sound. When the flash file is loaded again, there are multiple copies of the sound file being played. When I used the stop button it only stops one of the copies.

Here is the script:
var url:String = "currentMix.mp3";
var request:URLRequest = new URLRequest(url);
var s:Sound = new Sound();
s.addEventListener(Event.COMPLETE, completeHandler);
s.load(request);
var song:SoundChannel = s.play();
song.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
var ba:ByteArray = new ByteArray();

var gr:Sprite = new Sprite();
gr.x = -850;
gr.y = 25;
var blur:BlurFilter = new BlurFilter(2, 8, BitmapFilterQuality.HIGH);
gr.filters = [blur];
addChild(gr);

var time:Timer = new Timer(10);
time.addEventListener(TimerEvent.TIMER, timerHandler);
time.start();

function completeHandler(event:Event):void {
event.target.play();
}

function soundCompleteHandler(event:Event):void {
time.stop();
}

function timerHandler(event:TimerEvent):void {
SoundMixer.computeSpectrum(ba, true);
var i:int;
gr.graphics.clear();

var mat:Matrix = new Matrix();
mat.rotate(1.57079633);
gr.graphics.beginGradientFill(GradientType.LINEAR, [0xFF0000, 0x000000], [1, 1], [66, 175], mat);
gr.graphics.moveTo(0, 0);

var w:int = 5;
for (i=0; i<550; i+=w) {
var t:Number = ba.readFloat();
var n:Number = (t * 55);
gr.graphics.drawRect(i, 0, w, -n);
}
}

//tracking playing
var isPlaying:Boolean=true;
var pos:Number=0;

stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
play_btn.addEventListener(MouseEvent.CLICK, playSound);
pause_btn.addEventListener(MouseEvent.CLICK, pauseSound);

function stopSound(e:Event):void
{
song.stop();
nowPlaying.stop();
pos=0;
isPlaying = false;
}

function playSound(e:Event):void
{
if(!isPlaying)
{
song = s.play(pos);
nowPlaying.play();
isPlaying = true;
}
}

function pauseSound(e:Event):void
{
pos = song.position;
song.stop();
nowPlaying.stop();
isPlaying=false
}

stop();

How To Control The Sound Volume On A Timeline Base Streaming Sound?
Hello everyone,

I have a MovieClip "Animation" with added sound as a Streaming. I have also created a Volume SiderBar which I would like to use to adjust the volume of the sound on my Flash.

The Volume SliderBar work fine and I need to some how assign the volume to the position (Value of) volume. I was wondering if someone can tell me how I can do this on a sound which is timeline based?

Thank you very much and have a great day,

Khoramdin

How To Use A Value Of A String Variable As A Sound Class (as Linkage Name Of A Sound File)?
Hi,

I need to use the value of a string variable as a linkage name of the sound imported in the library, I have this code:

var SoundArray:Array=new Array;
SoundArray[0]="S1";
SoundArray[1]="S2";
SoundArray[2]="S3";
var MySound = new SoundArray[0];
B1.addEventListener(MouseEvent.CLICK,PlaySound);
function PlaySound(event:MouseEvent) {
MySound.play(0,0);
}

where S1,S2,S3 is the name of the classes in the linkage name for the 3 sound files in the library.

I get this Error for the highlighted line of code:

TypeError: Error #1007: Instantiation attempted on a non-constructor.
at Untitled_fla::MainTimeline/frame1()

How Do I Call Sound Files For A Sound Player Created In Flash
I want to create a sound player for a website in Flash 5. However, i do not know how to play the files without importing them into the flash movie. If i imported all of the sound files i am using, my flash file would end up being about 25meg in size. This would obviously be stupid, as it would take forever to load up. Could someone please tell me what action i eed to use to play a sound file which is stored in the same directory as the swf file.
Im only just learning flash so im not 100% sure that this is the way to do it. Is there a way of telling flash flash to only load a certain part of the movie as it is neded.
I want to create something similar to the player found at this address
http://www.newfoundglory.com/player.html

Any help you can give me would be much apreciated
Thank you
David

Sound Problem. Doesnt Sound That Complicated But No One Has Answered Yet.
im posting this question for the third time now, because noone has answered it before or the answer didnt help. so if you know how this is done please answer. for my animation site, i have a song in the beginning. and when you click on animations i want the song to PAUSE and have the movie go to a different frame. so something like
on (release) {
gotoAndPlay (99);
sound.pause
}
except have it work(lol).
and when the user clicks back, the sound would unpause.

thanks in advance.

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!

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

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!

Adding Sound Buttons, Cutting Off Prev Sound
Hi - I want to add a few audio narration clips via buttons to this page, inside each section:

http://www.chartscans.com/csalerts.swf


When the movie starts, it autoplays a bg music + narration nonlooped single track.

How can I add say a button that loads/plays an external mp3 And also shuts off the first sound that had started?

any ideas?



thx flash dudes..

Whats The Best Sound Format For Webpage Sound Effects?
what should my button roll-over sound effects be format wise and does anyone know of some good Freeware that converts sounds between formats fairly well?

Is Sound.onLoad Triggered When Sound Fully Loaded?
Hi everyone,
i'm loading mp3s as event sounds into empty movie clips.
i'm getting confused about how/when exactly the sound.onLoad event is triggered.
If onLoad is triggered, does that mean that the sound has been fully downloaded? Or could onLoad success be true if the player has successfully started loading the mp3 file, but hasn't fully downloaded it yet?
So far i'm only aware of onLoad success being false if flash can't find the file to load. Is there anything else that could result in onLoad success being false?
I don't care much about displaying download progress, so if onLoad is only triggered when the file is fully downloaded (or if there's been an error trying to download), then is there any point in me using a sound preloader to check if all bytes are loaded? Couldn't i just do what i want to do with the sound when onLoad success is true?

Any advice would be much appreciated.
Thanks,
Skinnyot.

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!

On Press Play Sound On Release Stop Sound
I have a button that is inside a movie clip 'forward'.
When you press the button it plays another movie clip 'time' forwards

on (press) {
forward = "1";
}
on (release, rollOut, dragOut) {
forward = "0";
}

on the button and:

if (forward eq "1") {
tellTarget ("/time") {
nextFrame();
}
}

on the first frame of the 'forward' movie


I would like sound to happen when you press the button and stop when you realease the button

but I not sure how any help would be gratefully excepted

Sound.position And Sound.duration On Flash Lite 2.1
I'm using the code below to trace the position and duration of a loaded mp3 file. This works fine when I export as normal flash 9 version swf, though when I export as flash lite 2.0 or 2.1, the trace returns 0 for both position as well as duration. Here is suggested that the two members should be available for all flash lite 2.x versions. Is there a way to find the duration and position of an mp3 file in flash lite 2.x? Am I doing something wrong?

Thank you in advance,
Harry










Attach Code

var mySound:Sound = new Sound();
mySound.onLoad = function(success){
if(success == true) {
mySound.start(0, 0);
}
}
mySound.loadSound("sound.mp3");
function onEnterFrame() {
trace(mySound.duration + " " + mySound.position);
}

























Edited: 02/05/2008 at 08:42:28 PM by Harry Vermeulen

Random Sound Load And Start Is Speeding Up The Sound. Any Help?
Hello,

My first post here at Kirupa. I thought I'd give it a try.
I'm trying to load sound dynamically into a clip and then play it randomly. The AS I came up with works great if the sound is embedded and I use the .attachSound() method instead of loadSound(). Now, when I load it dynamically and use the code below, the sound plays very fast and at a higher pitch.

I'm new to AS. Any help or insight into the issue would be much appreciated!

Thanks everyone!


ActionScript Code:
var crows = new Sound(this);    crows.loadSound("Raven.mp3", false);    crows.setVolume(100);rNum = function(){    var i = 0;    var randNum = Math.round(Math.random()*500);    if (i>=randNum) {        crows.start(0, 1);    }};randSound = setInterval(rNum, 100);

_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!!!!!!!!!!

Stopping Timeline's Sound But Continue The Video's Sound
Hi folks!

I need help to solve this problem. I can't seem to get it work out.

I have a music playing in Timeline (looping forever) when the flash site starts.
In some sections of the flash site, there is a video section where users can watch a video.

When the video is played, I would like to stop the sound in Timeline so it doesn't interfere with video's sound.

For loading the video, I am using Video Object, the code is simply:

var my_conn:NetConnection = new NetConnection();
my_conn.connect(null);
var my_stream:NetStream = new NetStream(my_conn);
my_video.attachVideo(my_stream);
my_stream.setBufferTime(3);

Many many thanks in advanced for your help!!

ps: I have tried following links, but no luck to me.
http://www.kirupa.com/forum/showthre...ht=sound+video
http://www.kirupa.com/forum/showthre...ht=sound+video
http://www.kirupa.com/forum/showthre...ht=sound+video

Drag N Drop Sound Vs Actions Script Sound
I've been putting together a flash demo the last few days, and until recently, I have always dragged the sound onto the stage and then modified it through the GUI (fade in/fade out etc.).

Before starting this project, I thought I'd do a little research into the new action scripting sound object from Flash 5 onwards, seeing as it seems to be 'the way to do it'.

Long story short, the action script sound object method seems like a huge pain in the a$$. It's slower to implement than just dragging and dropping it on the stage. Fading in/out is a hassle, and I really can't see the use of this technique.

Please convince me why I should keep working at learning this new technique, rather then just going back to the old way... Or, if you think the old way is still useful, let me know your opinion.

I'm usually all about keeping current with web dev trends, but I'm getting a little disheartened .

Thanks!

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