Pause Music
How can i make a mp3 inserted into a flash movie pause then be able to be played from the same frame?
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-24-2001, 07:11 PM
View Complete Forum Thread with Replies
Sponsored Links:
Music Pause Help
I hope that this is simple enought... ...well I need a pause button, not a stop button...so when you click on the pause button and play it again it will remuse from the current position. If anyone knows any good tutorials or or can help me I would really appreciate it. Thanks
View Replies !
View Related
Pause Music
Hello, im trying to create a pause function for my music player.
I've got this so far, but it isnt working, can someone help me out with this.
This is the play button
Code:
on(release)
{
if(pause_track == true)
{
sound._sound.start(trace(sound.position));
}
else
{
doAction = true;
track1.start();
pause_track = false;
this.nextFrame();
}
}
This is the pause button
Code:
on(release)
{
pause_track = true;
sound.position = trace(sound._sound.position);
this.prevFrame();
}
View Replies !
View Related
Pause Music
Hello! i have a problem with my music palyer i can't get it to just pause/mute the music.
could sombody help me? here's the code.
Code:
bgSound = new Sound();
bgSound.loadSound("ChrisBrow-RunIt.mp3",true);
playIt.enabled = false;
slider.slideBar._x = 130;
slider.slideBar.onEnterFrame = function()
{
bgSound.setVolume(0+this._x);
};
slider.slideBar.onPress = function()
{
startDrag(this, false, this._x, 130, this._y, 0);
};
slider.slideBar.onRelease = function ()
{
stopDrag();
};
stopIt.onRelease = function()
{
bgSound.stop();
playIt.enabled = true;
stopIt.enabled = false;
};
pauseIt.onRelease = function()
{
timeIt = bgSound.duration
bgSound.stop();
playIt.enabled = true;
stopIt.enabled = true;
pauseIt.enabled = false;
};
playIt.onRelease = function()
{
bgSound.start(timeIt);
playIt.enabled = false;
stopIt.enabled = true;
pauseIt.enabled = true;
};
stop();
View Replies !
View Related
Pause Button In Music How?
Hey, I have a mediaplayer on one of the pages that I created. The player has three 20 second loops, a play button, a stop button, and a pause button. How do I make the pause button function as a pause button, for as of now the pause button is just acting like a stop button. Here is my code for the pause button.
on (release) {
if (action eq "pause") {
action = "play";
status = "playing tr. " add playtrack;
tellTarget ("tracks") {
gotoAndStop("track" add ../laytrack);
}
play();
} else {
if (action eq "play") {
action = "pause";
status = "paused tr. " add playtrack;
tellTarget ("tracks") {
gotoAndStop("stop");
}
stop();
}
}
}
View Replies !
View Related
Pause Music For Flv Playback
Hi, i have a complex issue:
i have a flash website that loads pages (onto layer 1) via external swf files. one of these pages is a video page. i also have a external swf for music, on layer 2 so that the controls appear over top of the pages, and so that the music is continuous while browsing.
i have buttons for a movie gallery, which loads the flvs fine, but the music on layer 2 keeps playing during the flv.
i want to put a "mute" command into the thumbnails on my video page, so that when you click on a video, the music stops while the flv audio is heard. is this possible?
View Replies !
View Related
Can't Restart Music After Pause
I need some help getting my song to start playing again. My pause works using the code:
on(press){
musicPosition = my_song.position/1000;
my_song.stop();
}
but when I use this code to replay, it doesn't start back up:
on(press){
my_song.start(musicPosition);
}
I am using an array of 3 songs that play back to back so let me know if that may be causing the problem.
Thanks!
View Replies !
View Related
Pause Music In SWF File?
When I play back SWF files from Newgrounds that have background music, and I pause the movie with Enter, the music pauses as well to keep in synch with the animation. Yet when I play back test movies in Flash, the music keeps playing even when I pause the animation. Why?
View Replies !
View Related
Flash 8 Pause Music
Hi
I have a site that loads up some background music. However i need the music to pause whilst the portfolio section loads from an external .swf into a target, (its too slow otherwise) and then start again once it is downloaded, but from where it left off, not the begining. I am currently just using the stop all sounds on the portfolio button as a work around for now.
Many thanks
http://www.victoriacharlesphotography.co.uk
Greg
View Replies !
View Related
Pause And Mute For Music?
I have followed the Music Player and Volume Controller tutorials and as a result, can now play, stop and adjust the volume of a music file that is defined in the code. My apologies in advance if the questions below have been answered in the past.
However, I have searched the forums and can't seem to find anything directly answering the two following questions:
i) What code would be required (I would assume code would only be required for the button used for pausing) for a button to pause the music playing when pressed?
ii) What code would be required (I would assume code would only be required for the button used for muting) for a button to mute the music playing when pressed?
Thanks for any and all help,
JK.
View Replies !
View Related
How Do U Pause A Looping Music? Pls Help.
Folks
How do u pause music which is looping-
My code below works fine but fails once the music loops. I'm doing something wrong here-
var soundreq:URLRequest = new URLRequest("../sound/music2.mp3");
var sound:Sound = new Sound();
var sndControl:SoundChannel = new SoundChannel();
var sndVol:SoundTransform = new SoundTransform(0.2, 0);
sound.load(soundreq);
var resumeSnd:Number = 0;
var btnState:Number = 0;
// button to play & pause
sndbars.buttonMode = true;
sndbars.enabled = true;
sound.addEventListener(Event.COMPLETE, playSound);
function playSound(event:Event):void
{
sndControl = sound.play(resumeSnd, int.MAX_VALUE);
sndbars.addEventListener(MouseEvent.CLICK, soundStatus);
sndControl.soundTransform = sndVol;
}
function soundStatus(e:MouseEvent):void
{
if (btnState==1)
{
sndbars.play();
sndControl= sound.play(resumeSnd, int.MAX_VALUE);
sndControl.soundTransform = sndVol;
btnState =0;
}
else
{
// the flaw is in this next line. if i remove it then the music will play normally from start
resumeSnd = sndControl.position;
sndControl.stop();
btnState =1;
sndbars.stop();
}
}
Any insight would be of great help. Thx.
View Replies !
View Related
Pause Button In A Music Player.
ok, i have been digging around and i have found nothing on this! how would i go about making a pause button that freezes the song in the current position? and when you press play it resumes or when you press pause again it resumes, whatever. alright, heres my code so far:
play button:
Code:
on (release) {
music = new Sound(this);
music.attachSound("song");
music.start(0, 99);
}
stop button:
Code:
on (release) {
stopAllSounds();
}
any help would be nice! thanks ahead of time.
View Replies !
View Related
Pause/Resume Background Music
Hey guys, I've got a question for you. I'm new to scripting, so I can use some help here.
I've got an animation that has background music. Right now it's just in it's own layer on the timeline and is set to stream. There's a point in the animation where I want the music to pause (on it's own, no buttons or anything), and then it should resume later. I can sort of achieve this just by inserting a key frame in the music's layer and setting it to stop, but then when it picks back up it starts over, and I don't want that. Can someone help me with the code to make this happen?
Also, I want the music to fade in at the beginning of the animation. Then fade in again when it resumes, and finally fade out in the end. I figured since I'd be using action script I'd have to go about including the sound in a different way (rather than as it is now, in it's own layer), so I imagine I'll need extra code to make the fading work.
Thanks in advance for any and all help. And if I haven't been clear enough as to what I'm wanting (I've never been great at explaining things), just let me know and I'll try to explain it further. :)
View Replies !
View Related
Pause Music When External Movie Is Loaded
Hi
I have the famous "cleoplayer" (kind of music jukebox)in the main timeline. It works fine.
But my problem arises when I load an external movie (section1.swf)with its own music, as both musics play at the same time.
What I would like to do is to fade out the music of the current track playing in the cleoplayer, and fade it in when "section1.swf" is unloaded...but I guess this is too much for me.
So, I would be glad if I even know how to pause the music while "section1" plays. That would be enough.
If it is of any help, the actions inside the "pause" button of the cleoplayer are the following:
on (release) {
if (action eq "pause") {
action = "play";
status = "playing tr. " add playtrack;
tellTarget ("tracks") {
gotoAndStop("track" add ../laytrack);
}
play();
} else {
if (action eq "play") {
action = "pause";
status = "paused tr. " add playtrack;
tellTarget ("tracks") {
gotoAndStop("stop");
}
stop();
}
}
}
I guess I should "call" this button at the same time I call "section1" to load...
on (release) {
_root.container.loadMovie("section1.swf");
}
...but I don't know how.
Can someone help me?
View Replies !
View Related
Can't Remove Pause In Background Music Loop
Hi. I am wondewring how to make a background music loop that doesn't pause when the song restarts. I have seen flash files that loop and you can't really tell where the loop ends and begins again because it imediately begins again. Is this possible with Flash MX 2004 or do I need to use another program?
Thanks
View Replies !
View Related
::: MUSIC PLAYER - STOP And PAUSE Buttons :::
Hi all,
I had this problem the other week concering an audio player that im creating for a Flash application. Ive looked at examples online, but alot do not use a range of tracks or are linked to online tracks. I am currently using .swf files to play the music, but I think this is where the problem begins (also these are not set to stream but 'event'), the pause and stop button is not working!!. Anyone know how to get these working?? thanks!
View Replies !
View Related
Music Player - Pause Button And Next Track Problem
Hi,
I'm new to Actionscripting as I've always made a point of avoiding it in the past due to being a wimp. However, for my latest project I've had to make a Music Player, which can be viewed here... www.ben-w.co.uk/firstborn (just a mock page at the moment)
I have 4 tracks which stream from external swf files. They are called in via the script... loadMovieNum("onedeed.swf", 1); and stopped via... unloadMovieNum(1);
The skip buttons work via labelling a frame and using gotoAndPlay("nine_mile"); in which the external movie will be loaded.
Hopefully I've explained it so you can see how it's coded. Anyhow, the two problems I'm having are:
a) I can't find a way to pause the movie, thus my pause button is currently not functioning.
and
b) I don't know how to get the Music Player to move onto the next track once the external swf has finished playing. At the moment it just loops the current track.
I have searched through various posts on this board and haven't been able to find anything as yet. Any help would be much appreciated.
Thanks in advance,
Ben
View Replies !
View Related
AS2 - Pause Music Without Affecting Flash Video's Audio
hello.
i have a problem. i have a audio button. it is both pause and play. i also have a flash video in my clip. the problem is when i play my flash video and click my pause button, the sound of my flash video also go off. how can i pause my music with out cutting of my flash video's audio.
or is there better solution where when my flash video is up, the music gets pause automatically.
thanks alot.
On the first frame.
Code:
firstSound = new Sound(firstSoundMc);
firstSound.attachSound("firstSound01");
on my pause/play button clip (null object)
Code:
onClipEvent(load)
{
_root.soundstatus="on";
_root.firstSound.start(0,999);
_root.firstSound = new Sound(_level0);
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.firstsound.setVolume(minvolume);
}
on the button it self i have
Code:
on(release) {
gotoAndStop(2);
_root.soundstatus="off";
equalizer.gotoAndStop(2);
}
View Replies !
View Related
Can I Loop A Specific Section Of Music In Flash After The Music Intro Plays?
Hi! My question involves looping audio in flash. I already know how to make a section of audio in an audio-editing program that loops and make it loop continuosly in Flash. What I would like to do now is take an audio clip that has an intro section and a "body" section and after the intro has played, loop back to the beginning of the "body" section continously. I assume it would involve sending it back to a specific millisecond?
Anyway, can anyone help me out with this one? Or is it even possible?
Thanks,
aswhitehead
View Replies !
View Related
Display Music's Details As The Music Playing?
Hi
I saw something similiar at Flashkit - Sound FX, when you click on it, you would be able to play the music yet at the same time, display the music "detail", when the it high tone, the display go up high when the tone is low, the display go down?(Hope im not wrong in describing it)
http://www.flashkit.com/soundfx/Interfaces/
Can someone teach me how it work? Thanks
View Replies !
View Related
Preload Music And Fade In Music
Hi, i'm looking for a script that preloads my music. once it's loaded it should start playing the music with a fade in.
Anybody can help me with this. My actionscript-skills are very poor.
This is the code that i'm using for the moment, without preload and fadein. It uses a random of 3 tracks.
Loops = new Array("track01.mp3","track02.mp3","track03.mp3");
choice = random(Loops.length);
mySound = new Sound();
mySound.loadSound(Loops[choice], true);
thx
scarlac
View Replies !
View Related
Pause
Hey guys, i just need a simple timer to put into my for loop. i can make one easily in C but its a little more difficult in flash 5 cause im newer to it than i am to C. Can someone help me out? just a timer where it will wait for a desired number of seconds that u can easily put into some scripting. thanks
View Replies !
View Related
Pause MC
I have several movies on the stage. They are controlled by the "with" statement to play in sequence. The problem is how to stop and and start them. This means I have to create a variable to tell me what movie is currently playing and at what frame. Please help I have tried everything for days !!!
View Replies !
View Related
Pause
Here's a little something that's been buggin me that I need to figure out.
If you go to certain sites such as http://www.faintstatic.net/ and go to his portfolio, and choose one of his projects to launch.
You get a pop up.
I do it all the time myself. No problem.
The question is in that when you return, his original site has been paused. Music, movie clips, and all. I assume this is done for the benefit of us with slow processors on our machines, so that the new thing that's launched doesn't have to compete with the other in the background.
Can someone tell me what the cleanest way to do this is?
P.S. Does anyone have a favorite hosting company?
Thanks as always. John
View Replies !
View Related
5 Second Pause?
I was wondering if there was any way to pause a Flash 5 movie for maybe 5 seconds or so, and have it carry on with the rest.
i.e
say I have some text in the movie that i want people to be able to read. Is there a script that will pause the peice, or maybe loop a 1 sec peice 5x and then carry on with the rest of the movie??
I hope this is clear...
TIA.
View Replies !
View Related
Pause Mc
I have a mc in my main timeline. I would like to create a button that allows the user to pause the mc at anytime and then press the pause button again to allow the movie to continuing playing.
Thanks
J
View Replies !
View Related
I Need A 30 Sec Pause...
G'day trendsetters...
I have a movie (15 frames per sec) where I need a 30 second pause along the timeline. Rather than create 450 empty frames, is there an easier and more efficient way?
I have seen the answer to this question in the forum before but I can't find it!
Cheers
View Replies !
View Related
Pause For 1 Second
Hi ppl, wanna ask does anyone know the actionscript to pause for a second, mi story is this. There is 2 sound file in my game, at the start of the game, a slowMusic file will be played, after a time limit is reach, the slowMusic will stop and another fastMusic will be played.
Problem:
--------
The slowMusic does not stop fast enough, so what I have is that there will be a mix of both the slowMusic and fastMusic, making it sound real bad. So, that's why I want to pause a second before the playing of the fastMusic.
Any suggestion to solve this problem is welcome and thz for reading.
I am using flash 5.
View Replies !
View Related
Pause
I want to pause my movie.... and any movie clips playing when paused this is what ive done... i set a variable if = 0, telltarget each movie clip and stop... variable = 1 telltarget each movie to play and it does that but i only want to play the movie clips that were running when paused!! any better solutions out there...
thanks alot!
View Replies !
View Related
I Can't Get It To Pause Please Help
Im using Flash 5.. and i want to know how do you create a button at the begining of a a flash vid to "start" it.. (like press the button to start the movie..) and also how create a reply button at the end.. if anyone could help.. that would be great!! thanks
View Replies !
View Related
Pause
Hi,
I'm new to the autoacripting thingy and preloader. I'm wondering if there is a way to add a 3 sec pause to the end of the preloader. My scene 2 is pretty small, so on T3 line, my loading page doesn't even show up a bit. but i want people to see my loading page though...
Or maybe there is a way to preload scene 2 as well as scene 3? or another swf file?
thanks for helping
View Replies !
View Related
How Can I Pause...
Flash5
I want to stop something from happening too quickly, by pausing my AS for two seconds. How can I do this (preferably without adding more keyframes or movieclips)?
Ta!
View Replies !
View Related
Pause?
Is there such a thing as a "pause" feature in Flash MX?? i want to pause the movie for a couple of seconds and resume it. Is there another way than spacing it out over all the frames you want it to cover or by using the stop and goto actions?? Thanks!!
View Replies !
View Related
Pause A MC
I have a movie clip that contains a drop down menu. I have the movie clip falling down the screen. I need to stop the menu on rollover then continue falling on rollout. I am not very good with action scripts, so could someone help me. I have attached my flash file for further reference.
Here is a link to a zip file in case the attachment didnt work.
http://home.indy.rr.com/coxdcc/flash/
or you can email me at jcox-dcc@indy.rr.com and I can send you the flash file.
Thanks for any help you can give . . .
View Replies !
View Related
Pause
I'm trying to figure out an elegant way to pause my movie. It wouldn't be that hard to figure out it it were just an animation, but I also have 2 frame counter loops all over the place for pacing. If someone hits the spacebar to pause, and the movie is in the middle of the loop at the time, then how can I make sure it will stop? And when they hit spacebar to unpause, I would need to skip the rest of the counter loop. Any ideas?
View Replies !
View Related
How Would I Put A Pause In This
Hi I want to put a slight pause in this slideshow. a couple seconds. Here's the code. I want it so it fades in a pic and then pauses for a couple seconds and then the next pic fades in.
_root.onEnterFrame = function(){
for(t=0; t < used; t++){
_root.slide[t]._width = 200;
_root.slide[t]._height = 150;
if(slide[t]._alpha < 100){
slide[t]._alpha += 5;
}
-->>>>I'm guessing the code would go here<<<-----
}
}
Thanks a lot
Dave
View Replies !
View Related
|