Sound Looping Problems
I got a sound to work in my actionscript for a flash movie. But when i put the loop in that frame it doesnt work, where do i want to put the onSoundComplete loop in the flash?
And I want to know if there is a way to make the onSoundComplete loop only loop 1 sound, rather then looping all the sounds in the scene.
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 03-22-2003, 08:24 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Looping Sound And Looping Animation Sync
I'm working on a navagation interface for a new site, and I'm running into a few issues.
1) when you click on a button, it activiates an MC. within that MC, the first frame is the initial "off" state, and clicking on a button triggers the rest of the clip to play, from frame 2. I have a sound that starts in frame 2, and I set up an animation of a VU meter that is supposed to be synced very closely to the music. In the last frame of the MC is an action, gotoandplay, that sends it back to frame 2. The idea here is that once the button is pressed, the music loops and the animation loops with it.
When I test the movie, do a publish preview, or view the swf file in the flash player, the animation seems to be synced to the music for the first few times it loops, but then the animation drifts ahead of the music, getting progressively further out of sync with each loop. The other real problem here, is that when viewing the swf in any web browser, the animation is immediately behind the music, and seems to be running much slower than it should.
you can see the swf here:
http://www.lsrdigital.com/flash/index.html
Does anyone have any ideas about how to get this to work the way I am trying to get it to?
the .fla file is here if you want to look at it as well:
http://www.lsrdigital.com/flash/LSR.fla
2) The other problem I'm having is that the stage is set to be 680 pixels wide, and the graphic that fills the background is 680 pixels wide, BUT Flash MX publishes the movie at only 679 pixels wide! You can see the line of white pixels on the right side of the movie here:
http://www.lsrdigital.com/flash/index.html
I've double checked the html file and the table cell holding the movie element is 680 pixels wide. You can also tell that Flash is cutting off the last column of pixels because the background image is visibly just missing the edge to the right of the screws.
Any ideas on that one?
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 Looping Over Each Other?
my site at http://www.kadlac.com ......I am using a loadMovieNum command to load the sound controls, and the sound control level loads the soundtrack layer containing the sound loop. My question is, it seems to loop over each other like every 3 sec or so? What could be causung this? Thanks in advance!
Looping Sound
i run a nightlife web site and find that people sometimes browse the site upwards of 45 mins. in designing my new site, i have a loop which i play 99 times
sndBack.start(0,99);
and while doing other things, this loop will stop eventually. is there a way i can keep the loop going forever? maybe loading it externally or changing my code somehow.
thank you
Sound Looping
i want to now how to make a sound loop as i have made a play and a stop button and when i press play it only plays the song once, i'm using flash mx
Sound Looping.HELP
OK this is my problem.
If you look at my code below that I attached to
a bottun it works fine,but I'm trying to set
offset becouse when my sound plays every time it loops
I have brake (or space,or pause what ever you call it) before it plays again.
What do I do to make my looping go smooth
so it looks like one long song.
(If I listen in Cakewalk sound loops fine,no brake)
PLEASE HELP.
Thnx
PAUL DJ MAX
on (release) {
stopAllSounds ();
mixSound1=new Sound(this);
mixSound1.attachSound("mix1");
mixSound1.setVolume(100);
mixSound1.start(0.065,9999);
}
Looping Sound?
Does anybody know how to just loop a backgroung soung.I thought u could do it in the properties but u cant. Pleae help.
Thanks
Looping Sound
I'm loading external mp3's which are embedded into swf's - when I load movie to play the sound the looping of it has a small gap in the sound, only a fraction of a second , but enough to make it sound bad. I've tried other ways of doing this but they all seem to fail in terms of looping the sound seemlessly. We've tested the sound files in pro tools and they loop perfectly. please help.....cheers.
Sound Looping Help
ok im working on this http://www.masterfuldesign.com/index2.htm for the opening page to my site. Now it still needs some work and am gonna change some of the sounds the letters make when rolled over. But I want the last 3 letters to loop the sound file when clicked. And turn off the sound when clicked again. Whats the best way to do that. Right now I just have them so when rolled over they play the file not even looped.
Thanks
MIKE
Looping Sound
looping sound ....how do i loop a sound file continuosly ......?
anyone know
Sound Looping
Ok Does any one know how to loop sound in flash mx forever. like is there some sybole or somthin you put in the how many loops thing in the properties inspecter.
Looping Sound
I'm struggling with making a series of buttons that loop different sound.....
i have a loop in the background we'll call it A
and when you hit button1
i want "A" to stop and "B" to begin.
but "B" will play until another button is pressed
How would i script this?
thanks
toondude
Looping A Sound.
Hi guys, im wanting to be able to allow a user to pick up an object, and move it. While its moving i want it to make a sound - but the problem is the sound only plays once, and i want it to loop (ie when the user shakes a maracca it loops a shake sound, and when they stop moving it, the sound stops.
Heres my current code
on (press) {
_root.sounds.sound1.play();
this.startDrag(true);
}
on (release) {
this.stopDrag();
}
this plays a moive with said sound in it when the user clicks on the object.
Any ideas chaps?
Thanks, matt
Sound Looping
Hey there!,
I have been playing arround with this script but cant seem to fix a little problem that is bugging me like crazy!. I need to stream the mp3 and then i need to loop. Everything is working fine but it has this Gap, where it starts streaming again.. My loop tracks are with no blanks.. but it gaps as it tries to stream the thing again.. i only want it to stream the first time and run off the memory next time... can any one tell me what im doing wrong...
loopSound = function () {mp3.loadSound("/music/track.mp3", true);};
mp3 = new Sound();
mp3.loadSound("/music/track.mp3", true);
mp3.onSoundComplete = loopSound;
Thanks alot! and love this place,
ND
najamd.com
Sound Looping
there is probably and easy answer for this and i think i already know how to but i want to know for sure. How do you make a sound loop that i got from this site actually loop in my flash movie
Looping Sound
I'm using Flash MX. I just dropped a sound byte into the first frame. I'd like it to loop. Suggestions.
The page is at:
http://www.inkcommercial.com/
Sound Looping
Hi All,
I'm working with Flash MX 2004 on a PC.
I'm trying to create a game where the background music (a 30 second sample) loops for an undefined number of times and then stops when a user clicks the play button.
The difficulty I'm having is getting it to loop. Here's my code:
function playBackgroundMusic()
{
_global.BG_MusicSound = new Sound(this);
_global.BG_MusicSound.attachSound("backgroundMusic ");
_global.BG_MusicSound.start();
}
playBackgroundMusic();
_global.BG_MusicSound.onSoundComplete = playBackgroundMusic();
When I put a trace on " _global.BG_MusicSound.onSoundComplete ", my trace message appears just before the music starts and doesn't appear after the sample has finished playing.
Advice appreciated.
Thanks in advance.
Looping Sound
can someone please help me with this?
I would like to have a sound on my main menu looping over and over again.
at the moment i have linked my sound for actionscript and put in the keyframe
var my_sound = new Sound();
my_sound.attachSound("backround.wav");
my_sound.start();
do i need to put parametres somewhere in the script?
please help.
cheers
quark1
Looping Sound
Is it possible to loop a sound indefinitely with flash? Surely there must be but I cannot find out how.
[F8]Why Isn't My Sound Looping?
On the first frame of my scene, i have a simple actionscript which loads an external mp3. Here are the problems
1.) The sound will only play when I set isStreaming to True
2.) Despite entering 100 as the value for loops, it plays only once and then it stops.
If it helps, I should mention that the track is made in FL Studio with "Save as Acidized" selected. As for the timeline there is only one frame in the root timeline.
Code:
MySound = new Sound();
MySound.loadSound("mytrack.mp3",true);
MySound.start(0,100);
EDIT: Forgot to mention that I'm using Flash CS3 with AS 2.0
[F8] Looping A Sound
I am wondering if anyone can help me loop an audio file (its a song actually) that I'm using in a flash. I have the sound on the main timeline and a few other movieclips on the main timeline also. At the end of the movie I want it to stop on the last frame, but continue playing the music forever.
I put a stop() in the actionscript of the last frame I want to end the movie with and it stops the movie exactly how I wanted it to. The sound clip has no stop on it so I thought it would continue playing but it stops at the end of the song. I thought the stop() I inserted in the last frame was causing both the frame and the sound to stop but the song ends way after the stop() in the last frame.
I'm not really concerned with a smooth loop, even if it has to pause for a second that would be ok, as long as it starts up again. Thank you in advance to anyone who could help me!!!
Looping Sound...
Hi I am using the following code to attach a sound in my project...
var song_sound:Sound = new Sound();
song_sound.attachSound("xxx.mp3");
song_sound.start();
Does anyone know how I can make it loop when the song is finished?
Thanks in advance...
JP
Sound Looping
I'm using soundVariable.play(start, loop, trans); to play a background music MP3, but I don't seem to be able to have it loop indefinitely with that function. I could put 9999999999 in the loop setting and hope nobody watches it for days straight, but that seems kind of silly. Is there a function that allows me to play an indefinitely looping sound? Thanks.
Sound Looping
Hey guys... new to Flash. I bought a flash template and am reworking it to for my site. I replaced the original sound files and 1 works (loops correctly) and 1 doesnt. The new one is longer than the old one and I cant get it to work right. It starts over in the middle of the wav file. I cant figure out where to go to fix this problem. I've changed every variable that I could find associated with the sound file. The main site is set up to play a music file. The musi file has 3 layers. layer 1 has the sound file attached. Layer 3 is under that and has stop frame at the beginning and end with a frame labeled S7 in frame 2. Layer 2 is on the bottom and has a motion tween in it for an ease in. Not sure what that all means. All I need to know is what to change to make it play the entire file before it loops? Thanks!
Looping Sound
Recently I submitted a post in regards to help on an issue that I'm experiencing with looping a streaming mp3 file to where I want the music to loop over and over after its reaches the end of its song.
I was too quick to check off "This Post Answers My Problem" and well here I am again with the same problem.
My file:
2 layers - 1 Action Script, 2 Music Controls
My action script:
var tune:Sound = new Sound();
tune.loadSound("breathe2.mp3", true);
tune.start(0,50);
play_mc.onPress = function() {
tune.stop();
tune.start(0,50);
}
stop_mc.onPress = function() {
tune.stop();
}
Now what I was lead to believe is that the "tune.start(0,50);" would do is loop (repeat) this song 50 times before it actually stopped playing. However this does not. It plays once and stops.
Any help would be great!
Looping Sound
I have a page that plays an MP3 file but I want the music to loop. My code is below HOW do I ad the loop language.????????
Attach Code
var music:Sound = new Sound(new URLRequest("music/simply the best.mp3"));
var sc:SoundChannel;
var isPlaying:Boolean = false;
media.addEventListener(MouseEvent.CLICK,stopMusic);
function stopMusic(e:Event):void
{
sc.stop();
isPlaying = false;
}
play_btn.addEventListener(MouseEvent.CLICK, playMusic);
function playMusic(e:Event):void
{
if (!isPlaying)
{
sc = music.play();
isPlaying = true;
}
}
Sound Looping Pb [MX4]
Hello,
I'm having a little problem that i don't know how to solve...
My swf works with scenes. In the 1st scene i build a sound object :
PHP Code:
mysound = new Sound();
mysound.attachSound("thesound.wav");
mysound.start(0,loop);
mysound.setVolume(100);
but when i move to the 2nd scene, the sound stop looping... I could restart it using _root.mysound.start(0,loop) but it would restart the sound when you move from scene1 to scene2 so cut it up in the middle and restart which isn't so nice...
Any idea??
Looping Sound
Hi,
I looked everywhere, throughtutorial after tutorial, but I can't seem to find a basic AS that allows a sound to play throughout a scene continuously (loop). I have a bunch of stops in my scene and when I put a new layer for the sound, the sound stops at the stops as does everything else. I just want something that plays the sound loop no matter what...no buttons, just play the sound and don't stop until you close the site.
Any help would be appreciated...I just need simple...if simple is pointing to an external swf...then let me know...and I will try and understand.
THX
Sound Looping Gap HELP PLEASE
:confused:
I have a .wav file that I want to loop over and over, and never stop, but I placed it in it's own movie clip withouth any commands just a sound loop in a movie clip. The key frames are exact or less to the amount of key frames needed to play the full loop.
The problem is that when the audio is playing it will loop, but at the end of the sounds movie clip frames it takes a second to start over. Thus I have a small silence in my audio loop how do I get arount this problem?
Sound Looping ?
Im new to flash and I try a lot of ways to sound loop but not one works
Can someone tell me the simple way to sound loop and how to stop it, can yo stop it on a keyframe?
Looping A Sound
hey guys, i have made my sound so that when some presses control the sounds starts and plays until they release it. how would i do this?
Looping Sound
Hey yall question I am trying to get a loop repeating as back ground noise I have implemented this within an MC on maintime line.
Code:
myLoop = new Sound;
myLoop.setVolume(80);
myLoop.attachSound("final");
myLoop.start(0 ,99);
var pos:Number;/////user interface below
By me starting loop at 0, playing back 99 shouldnt that loop it endlessly? However it stops after first play. Whats the dealio? Any ideas hit me. Muchas Gracias Amigos
[FMX] Looping Sound
Hello everyone!
first of all i have to admit that i am a total
flash noob. but now to the topic:
i do have a problem with a mp3 file.
its length is 7 seconds and it should be
looped in my main movie (i am using loadmovie
for the content). my problem is that the file starts and
after 7seconds there is a short break and the mp3
file starts again. how can i fix this problem? i want to
"disable" that sound gap.
thank you for your replies.
mawo
__________________
flash beginner
Sound Looping Pb [MX4]
Hello,
I'm having a little problem that i don't know how to solve...
My swf works with scenes. In the 1st scene i build a sound object :
PHP Code:
mysound = new Sound();
mysound.attachSound("thesound.wav");
mysound.start(0,loop);
mysound.setVolume(100);
but when i move to the 2nd scene, the sound stop looping... I could restart it using _root.mysound.start(0,loop) but it would restart the sound when you move from scene1 to scene2 so cut it up in the middle and restart which isn't so nice...
Any idea??
Looping Sound
Hi,
I looked everywhere, throughtutorial after tutorial, but I can't seem to find a basic AS that allows a sound to play throughout a scene continuously (loop). I have a bunch of stops in my scene and when I put a new layer for the sound, the sound stops at the stops as does everything else. I just want something that plays the sound loop no matter what...no buttons, just play the sound and don't stop until you close the site.
Any help would be appreciated...I just need simple...if simple is pointing to an external swf...then let me know...and I will try and understand.
THX
Sound Looping ?
Im new to flash and I try a lot of ways to sound loop but not one works
Can someone tell me the simple way to sound loop and how to stop it, can yo stop it on a keyframe?
Looping Sound
how do i make a sound not repeat before one instance of the sound is completed. for a couple of my buttons in my app i've got sound attached to the down state.
Sound Not Looping
ok, I want to put a backround sound on my page with a flash controller with stop and play, it works fine except it only plays once the stops and I have to press the play button again, then it still just plays once. I got the loop from flashkit.com in mps format.
code for:
On Button:
on (press){
gotoAndPlay(1);
}
Off Button:
on (press)
{
stopAllSounds();
}
on on the layer that has the sound wav:
stop();
_____________________
the hole movie is only two frames long, and when put in dreamweaver, the property is also set to loop , but does not...
I'm ver new to flash and not sure whats going on with this,... any help would be great.
Looping Sound
I have a sound file that loops continuously on the website. That's fine, but the problem is that when the sound stops/starts, there's a clicking like the speakers turn on/off (or the sound card re-initializes). How would I keep the sound continuous without that undesireable noise?
The site: http://www.appalachianlogandtimberframe.com/home.php
Looping Sound Gap
theres a gap when i try to loop a beat sample, heres the code :
var myBeat = new Sound();
myBeat.loadSound("beat2.mp3",false);
myBeat.start(0,50);
Thanx
Korivo
Looping Sound
i know there are heaps of threads on here about looping sounds and i've checked them out - but it seems to me that everyone says to put this code:
mySound.start(0,100);
where the '100' is the number of times you want to loop.....makes sense, only it's not working for some reason....i can get the sound to play, but no looping. Does anyone know of any time when that code doesn't work?
I'm trying to do this for an assignment and it's due kinda soon....so if anyone can spare the time today, that would be fantastic : )
Sound Looping
Hi All,
I'm trying to create a game where the background music (a 30 second sample) loops for an undefined number of times and then stops when a user clicks the play button.
The difficulty I'm having is getting it to loop. Here's my code:
function playBackgroundMusic()
{
_global.BG_MusicSound = new Sound(this);
_global.BG_MusicSound.attachSound("backgroundMusic");
_global.BG_MusicSound.start();
}
playBackgroundMusic();
_global.BG_MusicSound.onSoundComplete = playBackgroundMusic();
When I put a trace on " _global.BG_MusicSound.onSoundComplete ", my trace message appears just before the music starts and doesn't appear after the sample has finished playing.
Advice appreciated.
Thanks in advance.
Looping Sound?
I want the sound in my flash movie to loop...forever.. or at least for 99 times...
I am using loadSound to load an extarnal mp3 file, here is the code I'm using but it is not looping...:
(The code is in the first frame of my time line)
mySound = new Sound();
mySound.loadSound("Sound/music.mp3", true);
mySound.setVolume(100);
mySound.start(0,99);
Help please...
Thanks
A
External Sound Swf's Not Looping
I'm creating a Powerpoint-like presentation in Flash. Using a main control swf, I preload graphic swf's and sound swf's into various levels in the first scene. Each of the swf's has a stop action in the first frame, and the movie starts on the second frame. As I need the swf's in later scenes or slides, I point to their level and play the second frame. This starts the swf when I need it.
Example:
PRELOAD SCENE
loadMovie ("graphic1.swf", 3);
loadMovie ("graphic2.swf", 2);
loadMovie ("sound.swf", 1);
SCENE ONE
//This plays graphic swf in level 3.
_level3.gotoAndStop(2);
//This plays sound swf in level 1.
_level1.gotoAndStop(2);
SCENE TWO
//This stop graphic swf in level 3 because frame 1 has stop action.
_level3.gotoAndStop(1);
//This plays graphic swf in level 2.
_level2.gotoAndStop(2);
HERE'S THE PROBLEM ...
The sound swf that I launched in scene one on level 1 inexplicably stops in Scene Two and does not loop. Any ideas on how the sound.swf can be looped over multiple and ensuing scenes in the main movie.
Thanks in advance,
Sound Looping In ActionScript ?
once i instantiated a sound object, is it possible to loop that sound x times using actionscript ??
(or can it only be done via the sound panel ?)
Sound Looping In Flash 5
Man - the exact same loops that I saved and USED in flash 4 don't loop right in FLASH 5????????????????????
what's that all about ????
Low
Sound Looping Problem
I was wondering if there was a way to play a sound looped twice followed by a smaller portion of the same sound and then the original sound again, to create a larger loop without using more samples. I tried that by lining up all the appropriate sound frames on a mc timeline but it doesn't work very well as the sounds don't get synchronised perfectly, everytime I test the movie I get different audio results. I tried to use streamed sounds but filesize, of course, was getting bigger and bigger plus the fact that didn't synchronise very will either...any suggestions?
Sound Help On Looping...hope You Help
Hi!
I just dunno how to add a sound into a scene that plays forever, and stops whenever i click on a link to another scene! Can you teach me?
Thank you!
|