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




Help Me Is About Sound And Music With Actionscripts



hi people I need help I wanted for example when the user enter the flash it straight play music instead of pressing a button for the music to play anyone can help I wanted the music to be auto play rather than pressin button
this the code when press button how to make it play without pressing button?

on(press)
{
mySound = new Sound();
mySound.loadSound("http://www.rit.edu/~vjc0721/No_Strings_AZ.mp3" , true);
}



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-18-2006, 02:53 PM


View Complete Forum Thread with Replies

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

Sound Actionscripts
hey,

i'm aware of actions in relation to sound such as playsound, stopsound, stopallsounds,

but i was wondering if there's a script out there that allows you to prevent new sounds from coming up? kinda like a 'silent' mode

Playing Sound Using Actionscripts.
Hey everyone.

I'm sure this is a simple question but i can't find the answer anywhere.
How do i play a sound using actionscipts?

for example, "on Mouse over play this sound".

thanx guys.

Loop Sound With Actionscripts?
Hi there,
does anyone know how to loop sound (external mp3 file) with actionscripts?

my code are like this:

------------------------------
mySound = new Sound();
mySound.loadSound("bubblor.mp3", true);
------------------------------

it works like a charm then i tried to loop it with this:

------------------------------
mySound.start(1,8)
------------------------------

but it aint working, does anybody knows why and how to loop it?

(maybe it isnt possible, i dont know.)

thanks for any advise/help.

/J

Loop Sound With Actionscripts?
Hi there,
does anyone know how to loop sound (external mp3 file) with actionscripts?

my code are like this:

------------------------------
mySound = new Sound();
mySound.loadSound("bubblor.mp3", true);
------------------------------

it works like a charm then i tried to loop it with this:

------------------------------
mySound.start(1,8)
------------------------------

but it aint working, does anybody knows why and how to loop it?

(maybe it isnt possible, i dont know.)

thanks for any advise/help.

/J;)

Sound & Music
I recently discovered that adding music and sound to movies via actionscript is much better than streaming or using events. But whenever I have actionscripted music, and I add a sound effect that stops before the music, all sound stops.

Example:
frame 1

Code:
myMusic = new Sound();
myMusic.attachSound("myMusicLink");
myMusic.start( 0, 1 );
frame 100

Code:
mySound = new Sound()
mySound.attachSound("mySoundLink");
mySound.start ( 0, 1000 );
frame 120

Code:
mySound.stop();
Here only the sound effect is supposed to stop, but the music stops as well. What is the problem?

The Sound Of Music,,,,
Well, here we go again,,, say i have 20 mp3s
I want to have a player on my site so that when i click a link from a list of the songs anywhere on the site, it will control it. Id love it if it hand rew and fwd to run the songs back and forth, and i would love it all to be streamed so that I can have a small movie.

I have looked over the posts here and found one similar in concept by flashkit member Quarterturn, but i dont know the coding or whats involved. I am a musician, so obviously this would be the heart of my site.... can anyone help?

Help On Sound/music
Hey Guys...

Need some opinions. I'm designing a multimedia presentation and i need your opinions on suitable music/sound/audio that i can use for the start and ending of the presentation.

Basically at the start there will be introduction of presenters plus some background info (total time = 1 minute) and at the end there will be closing statement (1 minute).

For the starting, i'll be having a video and i'm looking for a sound that can set the mood or attract the viewers.Something in the middle of serious and suspense.

For the end part, i need to find a music that can close the presentation with a BANG! I'll have animation with lots of images plus music background and suddenly a BANG and the end.

Any suggestions on suitable audio that i can use? This is for a presentation within my class and for non-profit, is it ok to use MP3 or music which is not free? Thanks.

Sound / Music
event
start
stream

can someone tell me the difference between these 3?

and.. for that the timelines are not constant.. i figured out its due to my laggy pc.. but its pretty different everytime so i cant realy get the exact timeline...

its constantly changing. can someone tell me how to make it better..

if u dont know what i mean.
try checking
http://www.geocities.com/devilros3/intro.html
the music does not go as the movie as i intend it to be..

help~

Sound/music
I am trying to add music to an swf movie but I can't find out how to do it (I'm using KoolMoves).

What I want to do is this: Add "music.mp3" to "movie.swf" and I want the .mp3 file to start in the first .swf frame and end with the last.

I just downloaded/bought my KoolMoves yesterday so you might have to explaine it in a simple way - so to speak

Music And Sound
Need help, I want to have a music loop run through-out a movie that
was created using seperate scenes ? Thanks for your time Gene

No Sound Of Music :(
Hi, This is my first post. I purchased a template online because I am not good at flash and I am using flash 8 to edit the template. I have managed to edit it to my basic needs now but the template has a music player embedded in it that plays 3 tracks. It has a stop, play and skip button feature but my problem stems when I try and change the track it plays from their short loop to my composed song. It will not play my mp3 file (that is 1minute long) for the full length of the song and instead cuts out after about 20 seconds and repeats (as it did with the old track). I have tried increasing frames for the track (upto over 2000!) but this has absolutely no effect at all.
Why is the track repeating after 20 seconds and not after the end of the track and how can I get it to play my music in full?

Whoever can solve this is a total star

Sycronize Sound And Music
How can I syncronize sound and images ??? for the animation be the same on every kind of pc

Tanks
[Edited by Isabela on 07-06-2002 at 12:39 PM]

I Have A Question Regarding Music/sound
Hi, I'm making a site entirely with flash, which has proving to be a large task, I have all of the bulk of my site/interface and everything done. However, one of the cool things I want to do, is be able to provide users with access to tons of tracks from real cds (not just sound loops), basically like a mp3 archive. I have noticed that I am probably going to need to put each song on an entirely different flash file in order to minimize space while mataining maximum quality, and I have got alot of the work done.
However, there is one thing I am trying to do. Right now, I have a list of tracks, you click one, and it loads the appropriate swf file. Here is my problem: I want to make it so that when one track ends, the next track automatically plays (essentially, after one sfw file has loaded, the next swf "in sequence" will load automatically after it). I believe it is simply an action which I have not learned yet. Obviousely, simply puting the different music files in one swf file doesn't work, because it plays the first song, and immediately begins the next frame (with the next song on it) making both songs paly at once which is horrible. The only way (i know of) to stop this is to put a stop action on the first frame, so the sound will play but it won't goto the next frame until told to. But how do I make it "wait" for the song to end before going on to the next frame without haveing the user select a button or something? Becuase right now, when the first track is clicked, I make a button appear saying "next track?" so when the one track is over, the user can simply goto the next track were he left off, but this seems like it would kinda be a pain for people, so I'd rather have it keep going to the next swfs (much like an actual cd) unless told to play a specific track. I think you get the picture...any suggestions will help! thanx!

Fadeout Sound/music
Does anyone know if it's possible to fadeout a sound/music in a flash movie using action scripting?

F.ex. When I push a button I want the music that is playing in the movie to fade out, not just stop. When I use stopAllSounds(); it just stoppes and not fades out.

So what I need is a button that when I press it. It fades out the music that is playing at that moment in the flash movie.

I'm new at this
Can anyone help me. Please

Looping BG Music/Sound
Hi,

I am trying work out how to start a looping BG Music as soon as my movie starts, how would I be able to do that?

Music Control Sound
Hi,

I would like to know how we can can control a music event only by a script code (fade in, fade out, volume...). If you have reference to suggest, tell me!

Thanks

Sound/music Problem
ive posted in Music/Sound section but not many people seem to browse this section as much soo i plee for help here:

http://www.flashkit.com/board/showth...hreadid=515615

Thanks.

Sound/Music In Cartoons
I'm sorry if this question has been asked a million time before, but I just got started in Flash Cartooning and the one question is throwing me.

*I'm using Flash MX2004*

In the scene in question, I have a car chase type scene...complete with music and dialogue. Problem is, I was wondering how I could make the my "music" layer quieter in the frames where the dialogue kicks in. I have gone under the sound file's properties and used the Custom "handles" to quiet it for those frames and it worked well. But then, for some reason, I noticed it would only allow me to have so many "handles" to manipulate the file. And seeing as there are numerous "cut shots" to characters talking, I can't use this for a whole song that stretches the entire length of my movie. I'm sure there is something for this (actionscipting? of which I know nothing about) Any help would be greatly appreciated.
Thanks in advance.

Music/sound Editing...
I know flash isn't that great for editing sounds/music beyond volume control, so what do you guys use to edit all your sounds? (program wise )

Sound/Music Questions
Ok...Im making a flash video and want to have a song playing from scene 2 to the end of the movie. I've got 2 problems though. First when I try to import an MP3 file into Flash it says that the file wasn't imported because there was a problem reading it. I want to use MP3 instead of WAV because of the smaller file size. My next problem is getting the song to play through the whole movie. I can get it to play for one scene but it stops the next scene. How can I get it to play through the whole movie? Thanks for any help.

Edit:Forgot to mention I'm using Flash CS3 Professional

Sound Clips/music?
Hey everyone! Just wanted to know where I can find some sound clips/music to use for buttons/rollovers etc?? Anyone know any good free sites? Thanks!

How To Drag A Music Sound
"drag your music sounds in 4th keyframe"
how i can drag a sound to the keyframe? my questions sounds silly but im able only to drag a sound icon (speakce rsimbol) into the scene...does not let me to timeline...

Sound Obj "music Off" Turns Video Sound Off Too...help Meh
this im sure is very noob, but i cant figure it out...
here is my code for the sound object. its in a mc, dropped on the main timeline. the videos are in an mc on the main timeline.
onClipEvent(load)
{
_root.soundstatus="on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume=100;
minvolume=0;
}

onClipEvent(enterFrame)
{
if(_root.soundstatus=="on") {step=5}
if(_root.soundstatus=="off") {step=-5}

maxvolume+=step;

if (maxvolume>100) {maxvolume=100;}
if (maxvolume<0) {maxvolume=0;}

_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}

hot sake
View Public Profile
Send a private message to hot sake
Find More Posts by hot sake
Add hot sake to Your Buddy List

Sound-bars Movin Up And Down On The Music.
when you look at "soundloops" on this site...
you can see a lot of sounds...
when you play a sound...
you see some bars in the rectangle going up and down....
they are going up and down synchronised with the music...

does anyone know how to make that???
I couldn't found it in the tutorials.

gr. rene
(i speak english not very well, so you can also repeat in dutch if you can)

Question About Background Music/sound
hi everyone!

is it possible to have streaming audio (like music/song) play in the background while you move from one scene to the other? or can it only be during a certain specific scene?

let me know if you can!
thank you for your time

Fading In Sound W/ Music Controls
i need 2 know how 2 make my looping music fade in when the the movie starts, fade in when the music on button is clicked, and fade out when the music off button is clicked. all i have so far is:

Frame 1:
mySound = new Sound();
mySound.attachSound("musicLoop");
mySound.start(0, 9999);

Music On Button:
on (release) {
mySound.start(0, 9999);
}


Music Off Button:
on (release) {
mySound.stop();
}

if u don't mind write tha exact script fa each frame

Sound FX And Music Slowing My Movie WAY Down
My Flash site is running at 60fps. When I add a small button sound I compress it to mp3 at 16kbps and it brings it down to 2.1kb. But even that makes my site slow down way to much to make it even come close to 60fps. The minute I get rid of the sound, the movie runs smooth and fast. What should I do?

Flash MX Sound/Music Tutorial
Hey,

I was wondering if someone could give me a tutorial on how to add an mp3 music file in without it being too laggy and not streaming. I wanna know how to make a control thing and have a slider and preloader for the time in the song that u are at when u are playing it! Thanks a lot!

How Do I Change The Sound (music) In This Template?
Very new to Flash. I'm using Flash MX.

I am trying to change the sound.swf file in the attached template. The sound file does not appear to be in the library.

Here is the README file that came with the template:

How to place the music file in your flash template?

Your flash templates comes bundled with an option of loading music externally which makes the whole process of feeding music into your template very easy.

1. Choose the music file (say-mymusic.wav) you want to load into your template.
2. Import your music file in the shockwave file (mymusic.swf).
3. Rename the mymusic.swf file to sound.swf.
4. Place sound.swf in the same folder where you stored your flash template.
5. The music from your sound file automatically gets loaded into the template and starts playing.

Thanks for your time in helping. I have no idea what to do at this point.

Stop One Sound But Leave Music On?
I am a practiced newbie.

I am creating a simple slideshow in MX (Professional version). I have a .wave music-loop accompanyment that starts at the first slide and continues throughout the show. I have my own voice .wav running in a different layer on each slide. The idea is to have the background music as the presentation continues.

I am having difficulty finding out how to cancel just the voice layer when I advance from one slide to the next - and then start the next slides voice - without also cancelling the music loop.

I am trying Stop Sound from behaviors; but I am not understanding the Help file's intructions on "linkage" etc.

stopAllSounds does just that. Once called, the remainder of the show is silent; even when using actionscript to call another sound.]

Your help is greately appreciated.

The Hills Are Alive...with The Sound Of NO MUSIC
Hello Crazy Flash People!! I have a large ish song in my movie. It starts at frame 1 scene 1. All good 'till scene 2. IT STOPS!!! Can I get some advice from some smarty bum ?

Music & Sound FX Lagged After Export
Hey -- i made a game with sound effects and uploaded it to the internet -- but whenever it plays on the internet all the sound fx are lagged about 1 second (the animations are not lagged)

what can I do to remedy this problem?

thanks for your help.

Sound (Music) Won't Stop When Testing.
I searched but didn't find anything guys. Just FYI.

When I hit enter to watch the movie I made while also viewing the timeline, if I hit enter again, everything stops, but not the music. I HAVE TO LISTEN TO IT ALL THE WAY THROUGH!! AHHHHHHHH!!!! It's driving me mad I tell ya.

Anyone know the trick?

Load External Sound/music
I would like to be able to load an external music file when a button is clicked for example i want this to play http://music.celestialrain.com/remenissions.mp3

Music Crossfader To Fade Sound
Hi guys,

I need help with creating a crossfader for a DJ mixer in Flash 8.

There are two turntables one on the left and one on the right. As i drag the slider to the left i want the music playing on the right turntable to fade out. And therefore if the slider was dragged to the right the music playing on the left turntable would fade out.

I have two sound objects - "mySound" and "mySound1"

I have two volume sliders which work perfectly at present using these sound objects. The volume slider is called 'vslider' and the base is called 'vbase.' Both vslider and vbase are on separate layers on the _root timeline.

The code for the 'vslider' is as follows:

----------------------------------------------------------

onClipEvent (load) {
_root.vbase._height = 113;
_root.vbase._x = 516.5;
this._y = _root.vbase._y+_root.vbase._height/2-this._height/2;
left = this._x;
top = this._y+_root.vbase._height/2;
right = this._x;
bottom = this._y-_root.vbase._height/2;
//
volCalc = _y+_root.vbase._height/2;
}
// End of onClipEvent load
//
onClipEvent (enterFrame) {
// -----------------------------------------
volCalc2 = (_y-volCalc)*(-100/(_root.vbase._height));
_root.mySound1.setVolume(volCalc2);

// ------------------------------------------
this.onPress = function() {
startDrag(this, false, left, top, right, bottom);
}
this.onRelease = function() {
this.stopDrag();
}
} // End of onClipEvent enterFrame

----------------------------------------------------------


I have tried altering this however with no success.

Anyone any ideas? Any help would be much appreciated as this is for a University project.

Many thanks.

Any Sound FX & Looped Music SITES?
know of any hot sites out there to download sound FX & looped music- Besides the obvious Flashkit? I'm working in Flash MX. I'd prefer the sounds/loops that i'm able to preview before downloading them.

Thanks!

ActionScript To Turn Sound/music Off/on
What I want to do:

Use a single Movie Clip to turn sounds/music off and on using Actions. I also want the movie clip to fade up on rollOver and down on rollOut.

What I have:

A flash file with a movie clip in the first keyframe. The keyframe has a stop action and the button frame has the following actions:

var snd = new Sound();
snd.attachSound("musicsample");

On the music sample in the Library I added the linkage identifier “musicsample” to export for ActionScript.

On the button itself I have these Actions:

on(rollOver) {
this.gotoAndPlay("btnup");
}
on(rollOut) {
this.gotoAndPlay("btndown");
}
on (release) {
// Toggle a flag between TRUE and FALSE:
IamActive = not IamActive;
// Do different things depending on flag's current state:
if (IamActive) {
// various actions to be performed for "on" state of button
_root.snd.start(0, 1);
else {
}
// various actions to be performed for "off" state of button
_global.Behaviors.Sound.music.stop("music");
}

}

Here is the Flash File I’m working with: http://www.designmx.com/temp/buttonfademusic.fla

Please help: This might not be the best way, and if there’s a better way please let me know, but if not please help me to figure out why this isn’t working right.

Thanks for your help!
- James





























Edited: 12/28/2006 at 08:42:28 AM by JamesD

Sound/Music Equalizer In Flash 5
Ya know, with those bars and peaks that scale according to bitrates and stuff?

I heard that you need to turn an mp3 file into swf and add some variables (heard about a program that does it automatically) and then "loadMovie" from another swf that "reads" the variables in the first swf... I don't know... Something to do with streaming and timelines... It's just too much for me!

Is there any easy way to do this???

Sound/Music Equalizer In Flash ?
Ya know, with those bars and peaks that scale according to bitrates and stuff?

Here are some sites that have this thing:
www.echo27.com (bottom left)
www.flashkit.com (in the sound loops section)
www.creative-flow.com (bottom left)

I heard that you need to turn an mp3 file into swf and add some variables (heard about a program that does it automatically) and then "loadMovie" from another swf that "reads" the variables in the first swf... I don't know... Something to do with streaming and timelines... Flashkit has this thing but it's just too complicated for me!

Is there any easy way to do this???

P.S.
FlashAmp won't help because it only scales objects in sync to VOLUME, not bitrates...

Thanks for any help!

Flash Sound/Music Player
I am looking to add a flash sound/music player to my website. Could anyone provide direction in how doing this? How do i compress the Mp3's involved so download time will be short.

Loaded Music Player - No Sound
Can anyone help me out - Im sure the solution to this is a simple one.

I have a main.swf file which has a blank movie clip on the stage. I load into the blank movie clip a file called "music_player.swf" using:

loadMovie("music_player.swf","blankmov");

This works simple enough . . . . however, for some reason I cannot hear the music tracks even though the linkages in the music_player.swf file are setup correctly. All the script etc. for the music player resides in itself so when I test the music player on its own, it works perfect.

However, as soon as I load the music_player.swf file into the main movie, I can see the graphic equaliser work etc. etc., its fully loaded in with the preloader, but I cant hear anything.

The only way I can hear any of the music is by copying the music files from music_player.fla into main.fla and setting up the linkages within the main.fla.

Any help much appreciated

Flash Tutorials About Sound/music
hi i have to build a simple flash player in flash,
that streams a song and every 30 seconds pauses.

so i'm looking for any good tutorials concering sound in flash (preferably complete songs).

couldn't find any, do you guys know anyone?

thx.

Getting Music/sound To Play At Start Frame
How do I get music to play at the starting frame of a Flash MX file? Like the music for a website or something.

What is the code?
Any help would be greatly appreciated.

Flash MX - Sound&Music Problem (Urgent Help )
Hi All,

I'm new to the site. But I'm sure I will find a solution from here about a serious problem with a program we developed for a customer.

Problem Description:
We have developed an elearning solution for a big company. For performance issues we have left the sound and music outside. When a certain page loads, related sound, narration and music are read from a foleder called sounds. This was working properly localy (e.g. d:localhostmigmenu1.html), but when we use it through web services (e.g. http://localhost/mig/menu1.html) performance is superb. But the sounds are missing after first page. All the first pages are loading both graphical layout and sounds. But after that no sound is heard.

We have put a sound button for on-off usage. We switch it on and off only then we can hear the sound of the page.

What can I do with this? We know if we put all the sound inside flash it is resolved, but we should aslo consider performance issues.

Can someone help me with this?

Thanks in advance.Problem Description

Music Player Loads Sound On Trackselection
I've made this little musicbar that should load an swf file when a track is selected. It also contains a little display box that displays when the swf containing the sound will be loaded.
The code behind each track would be the same so here's what I've got so far :

Code:
on (release) {
displaymovie.textdisplay.Text = "*** Loading track ***";
loadMovie("http://www.sin.khk.be/~peterm/MagieWeb/music/track1.swf", "movieClip");
}
GotoAndPlay('start');
This way, as I was told, a movieclip will be loaded into the scene named 'movieclipname.music' because the movieclip in the swf file I'm trying to load (containing the music )is identified by 'music'.

Now here's the problem, I want to do a loop to check if the swf file containing the sound is loaded. I've done the following :Created a keyframe called 'start' on frame 5Created a keyframe called 'stop' on frame 15When the trackselection button is clicked I put the following code (as above code) : GotoAndPlay('start');Problem :
What is the code to check if the movie has been loaded ? Something like : If(IsLoaded("track1.swf")){...} ?!
When it has been loaded how do I control the sound ? (Play, Pause, Stop, Go To Begin of song, Go To End of song)

What i've allready got : http://www.avaweb.be => check the top musicbar.

Stopping Music Also Stops Other Sound FX Problem
Hi,

I got this script for a music on/off. Problem is that when I stop the music it also turns off all the other sound on my main timeline as well as sound FX for my buttons.

How do you set this without affecting all the other sound?

THANKS!


Quote:





onClipEvent (load)
{
_root.soundstatus = "on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume = 100;
minvolume = 0;
}
onClipEvent (enterFrame)
{
if (_root.soundstatus == "on")
{
step = 5;
} // end if
if (_root.soundstatus == "off")
{
step = -5;
} // end if
maxvolume = maxvolume + step;
if (maxvolume > 100)
{
maxvolume = 100;
} // end if
if (maxvolume < 0)
{
maxvolume = 0;
} // end if
_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}

Sound Troubles...(music Wont Match Up)
I have a music soundtrack that I have put in my flash movie and I sync. it with the actions, but when I go back to it later, it is all out of sync. and needs to be fixed again. I am using the " event " style of sync. I understand I may have to use "stream" but then the music sounds like absolute crap.
I really need help! thanks!
-Joe-

Need Music And Sound Effects For Flash ECards...
Hi All,

I was wondering if anyone knew where to get music and sound effects for some Flash eCards we are creating. The more resources the better

Thanks a lot...

Sound Spectrum Display Of Music File
I am new to Actionscript 3 and have finished numerous tutorials on sound spectrums but I could not find one that showed how to display the audio information as a static timeline (like in Cool Edit Pro). Is this possible?

Thanks,

Hoss

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