ActionScript 3 :: Music Playing Repeatedly In Background While Moving Between Frames

Feb 13, 2011

I developed a website using flash with Actionscript 3. I included a music as a background for the website and the music will loaded when the site loaded. But the problem that when I click buttons to move between pages(frames) then go and click button_01 the music will play again so I will have music playing more than one time in the background and the sound_btn will not work any more so even I click sound_btn the music will not stop. The code I'm using is listed down. What I should modify to not allow the music play more than one time in the background while moving from one page(frame) to another.

stop();
//number that is redefined when the pause button is hit
var pausePoint:Number = 0.00;
//a true or false value that is used to check whether the sound is currently playing
var isPlaying:Boolean;
[Code] .....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Playing Audio And Moving Frames In Time?

Sep 14, 2009

What I'm looking to happen is that on frame 2 I want audio track 1 to play and:

after 1 min 45s move to frame 3
after 1 min 51s move to frame 4
after 2 min 47s move to frame 5
after 3 min 15s move to frame 6

How would I code this or what would be the easiest way to do it??

View 6 Replies

ActionScript 3.0 :: Sound Rollover Playing Repeatedly

Oct 10, 2009

Here is my class, but when I rollover the button, especially near the edge of the button the sound plays continuously. I have tried to set up a boolean variable and set it true after the sound plays and false on mouse out and only play when false, but that didn't work either... I was thinking about setting up a timer to handle it, but I wanted to make sure there wasn't something simpler I was missing first.

[Code]....

View 2 Replies

Movie Clips And Background Music - Unable To Stop Music At The End Of The Animation?

Apr 30, 2011

I'm working on an animation where I have my "dog" fighting the evil vacuum cleaner. I got most of it to work the way I want it to.

1) I have movie clips entitled pepper_mc (where my dog is supposed to be walking), swirl (where a swirly-type symbol is supposed to spin over the dead vacuum's head), and vacuum_mc (where the evil vacuum is supposed to have a swinging arm (called vacuumarm_mc) that I created using the bone tool). When I add them to the stage and test them, the animations within the movie clips don't happen.

2) I have background music that I'd like to stop playing at the end of the animation, but I'm not sure how to do that. (using the stop(); actionscript doesn't help).Where am I going wrong? I'm using Flash Pro CS5.

Here's the file --> Pepper and the Vacuum of DOOM!

View 1 Replies

ActionScript 2.0 :: Music To Continue Playing But The GetURL Function Seems To Stop The Music

Dec 13, 2005

When the movies performs the getURL action, I want the music to continue playing, but the getURL function seems to stop the music at frame 152 (where the getURL action is placed), when I wanted the music to continue to frame 257 (the end of the movie). I hope I've explained this clearly

View 3 Replies

Actionscript 3.0 :: If Press Play Button While The Sound Is Already Playing It Has The Same Song Playing In The Background

Nov 13, 2010

I have a sound clip that I'm loading externally into my flash file. The code I'm using looks like this and is placed in the as layer on the first frame,

var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
var lastPosition:Number = 0;
mySound.load(new URLRequest("introaudio.mp3"));
myChannel = mySound.play();
[Code]....

View 14 Replies

ActionScript 3.0 :: Music Continue Through Frames?

Apr 24, 2009

My problem is that whenever I switch frames the music in my flash project restarts and overlaps and sounds incredibly crappy.Is there any way I can make it so that my music opens on my first frame and continues playing through all subsequent frames?

import flash.media.Sound;var channel:SoundChannel;var soundisplaying:Boolean = false;var pausePosition:int = 0var sound:Sound = new acoust();channel = sound.play();
playbut.addEventListener(MouseEvent.CLICK, playsound);stopbut.addEventListener(MouseEvent.CLICK, stopsound);function [code].....

View 1 Replies

Actionscript 3.0 :: Music Continue Through Frames

Apr 25, 2009

I have been looking for a solution to my problem for 3 days and after finding almost nothing on the subject I've decided to seek help in this forum. My problem is that whenever I switch frames the music in my flash project restarts and overlaps and sounds incredibly crappy. Is there any way I can make it so that my music opens on my first frame and continues playing through all subsequent frames?[code]...

View 1 Replies

Professional :: Add Music Looping Over And Over For 600 Frames, Then Stops?

Oct 1, 2010

I have a music track that I want continusuely playing and looping for until my 600 frames stop, then it stops. (by the way my frames/sec is a 1, not 24 like the default). Also it would be nice if in the last 5 seconds it could somehow fade away. How do I do this?

View 3 Replies

CS3 :: Looping Music For Background

Apr 24, 2009

I am used to working in Flash MX but now have CS4. You use to be able to just drop an mp3 file onto a layer and it would loop continously now it's not doing that.I need help in a big way to loop this mp3 file in CS4.

View 3 Replies

ActionScript 3.0 :: Possible To Use Background Music?

Oct 22, 2009

I've been working with Actionscript 3.0 for over 6 months now but I've never used background music in any of my projects before. This time I decided to add a sound loop to play in the background while the visitor is viewing the site. So, basically I want this sound to loop over and over again, but there will be two buttons on the stage, one that plays it if it's stopped, and another one that stops it (just in case the visitor doesn't want to hear the music). My knowledge about using sounds is minimal, all I know that I should load the sound, then put it into a soundChannel and then play/stop the sound channel... but I'm not sure how to keep looping the sound and not just play it once (the sound file is 16 seconds long only).

View 6 Replies

ActionScript 3.0 :: See If A Music Is Already Playing?

Apr 19, 2010

I would like to know, how i can see if a music is already playing?

View 6 Replies

ActionScript 3.0 :: Turning Off The Background Music?

Dec 26, 2008

I have a few frames presentation in flash and a music in background playing. I have a button and this code attached to it:

When I'm hitting the button music is restarting not stopping. Everything is fine when presentaion lasts 1 frame.

View 7 Replies

ActionScript 2.0 :: Not Restart Background Music After You Off?

Jul 22, 2002

Well I have this website where I have put background music at the beginning, of course the music can be off and on, but when I come to main page again it starts playing. How to make it so that once I off it, it will stay off till I on it again? My file is at

View 2 Replies

ActionScript 2.0 :: Random Background Music?

May 3, 2003

how to write a code that play background music randomly?i write these in the frame

bgmusic = new Sound();
bgmusic.loadSound("1.mp3", true);
in the movie

[code]......

View 5 Replies

ActionScript 1/2 :: Add Background Music In Game?

May 7, 2008

i'm trying to add background music in my game, but i don't know how to play and pause it...

View 3 Replies

Stop Music Playing On My Website?

Apr 30, 2010

I've agreed to helping a friend out to make a few changes to her website.

One of the things I need to do is make the music turn off when you click 'musicff'. It doesn't work at the minute and for the life of me I can't seem to figure it out. Below is the coding on one of the frames [code]...

View 14 Replies

ActionScript 3.0 :: Playing Music From Xml Data?

May 1, 2011

I am creating a Flash app that searches xml for music data such as track, artist and file location of the mp3. The results are returned as a radial tree visualisation.
 
I am attempting to create a functionality where each node in the tree, is clickable and this will play the track. At the moment when i click, it seems to play all the tracks at the same time and crashes. I think this is because of the node event listener -
 
[CODE]
newNodeSprite.addEventListener(MouseEvent.CLICK, playMusic);
[/CODE]

[Code].....

View 5 Replies

ActionScript 3.0 :: Playing Music From Library

Oct 10, 2011

I'm playing the game League of Legends and I decided to make an iPhone application that let's you pick a champion (a character in the game)picture and play the sound for it. I downloaded all sound and images, loaded them into the library, and now I only made 4 champions just for testing.This is my code for AS3 when you click on the button to play the sound.[code]When you click on the picture again, It will play the sound once again and if you mass click it will mass play it (I want it to stop playing current one, then start playing the new one if you double tap it).When you click on 1 picture, it will make the sound, ok.. but when you click on ANOTHER picture, It will play the second image sound AND the first image sound together (Mixed up. I want it to make it so it stops playing the first one, then plays the second one).

View 14 Replies

Actionscript 3 :: API For Playing Music Clips?

Jul 5, 2011

I've got a project I'm working on in Flash / AS3 and I was hoping to find a way to have the program run a search through a publicly accessible API using an artist name and pull an MP3 sound clip that the user could play. I looked through Amazon's API but it didn't seem like it could accomplish this. It also seemed pretty daunting to integrate into flash.

View 1 Replies

ActionScript 3.0 :: Button Music Keep Playing?

Apr 11, 2011

okise i have make a button, i will play a song ,if i clicked the button.

my code:
// i imported the song inside flash and agelink it named(BGM1)
var M1:BGM1 = NEW BGM1

[code]....

View 9 Replies

ActionScript 3.0 :: Playing Music From XML Data

Apr 30, 2011

I am creating a Flash app that searches xml for music data such as track, artist and file location of the mp3. The results are returned as a radial tree visualisation. I am attempting to create a functionality where each node in the tree, is clickable and this will play the track. At the moment when i click, it seems to play all the tracks at the same time and crashes. I think this is because of the node event listener -
ActionScript Code:
newNodeSprite.addEventListener(MouseEvent.CLICK, playMusic);

View 0 Replies

ActionScript 3.0 :: Background Music: Looping, Stopping?

Sep 1, 2009

I've got a few questions about background music. Such as...

- How do you get music to loop in the background of a stopped frame (or multiple stopped frames)?

- How do you get the looping background music playing in a stopped frame to stop when a certain button is clicked?

- and How do you get music to stop playing in regular, non-stopped frames when a certain button is clicked (although it's probably the same as the above question...)?

View 3 Replies

ActionScript 2.0 :: Stop All Sounds Except Background Music?

Feb 20, 2011

I have created a simple soundboard, with multiple buttons that play sounds upon release. These sounds are embedded within the 'hit' frames of the buttons. Only one can be played at once, so this has been applied to each button:

on (press){stopAllSounds ();}

This all works as planned so far. However, I would like to have a background music feature that would be exempt from the "stopAllSounds" command and thus able to keep playing regardless of what buttons were pressed (or until a designated stop button was pressed).

View 2 Replies

ActionScript 3.0 :: Stop All Sounds Except Background Music?

Jun 17, 2011

I am working on a website that has 11 sounds in one frame. All of the sounds are external, meaning I have to call each one of them every time I want them to play, which happens when I click on specific MCs in my stage. Each MC I click all sounds stop and the new one starts playing. So far, so good.

But therein lies the problem: I want this to happen but keep background music playing. I have no idea where to start from.

View 1 Replies

Professional :: Mask Background Music On Flash?

Apr 25, 2010

Is it possible to mask the background music in my flash website so it stops when I have my videos running?

View 5 Replies

Professional :: Background Music In A Flash Presentation?

Jul 18, 2010

I have made a corporate presentation in Flash (CS3). The structure is as follows. The main timeline just 6 key frames. 1 intro and 5 content. Each of the 6 key frames has a movie clip with relevant content on it.
 
After the introduction in key frame 1, the timeline stops at the next key frame.From here, one can navigate forward and backward between the 5 content key frames, using buttons.These buttons are available throughout these five key frames.
 
Each of the key frames contains a relevant movie clip, with content.And also a sound clip to introduce what that key frame contains. Since a user can navigate forward and backward at any point of time, all these keyframes have the frame action:

[Code]...

View 2 Replies

Professional :: Stop Background Music When Flv Starts AS2?

Apr 7, 2011

I have a flash game that I have videos between some, but not all questions.I would like to have background music that would play during the questions then mute, or turn off when the video is played, then turn back on when video is completed.If possible, but not required, a mute button could be created that would mute the music and would overide it turning back on as well.In other words the person takes the quiz, when the video plays it shuts off the music and starts it back up when video ends. And if possible, if they select to mute the music before the video plays it will not restart after the video completes.I did this in actionscript 2. The questions are on frames 1-50, the videos are on frames 100-110.I have it set up when a question is answered it goes to the video then back to the next frame for questions when it completes.

View 1 Replies

Html :: Play Background Music Continuously?

May 22, 2010

I am playing a background on my webpage by using miniswfloopplayer, now I want the music to play continuously throughout the website, currently the music starts all over again when a page loads which is quite obvious. I am looking for a approach where I can avoid the above situation.

View 1 Replies

ActionScript 3.0 :: Efficient Way To Load Background Music?

Aug 14, 2009

Ok, so I've tried a lot of different ways of loading background music in Flash, and now I'm wondering what the most efficient way of doing it really is.

I have my DocumentClass, and I have a MusicPlayer class. The MusicPlayer class controls the volume and mute function, as well as holding all the visible elements of the music player.

Where should I load the music initially? From the DocumentClass at the startup? Or in the MusicPlayer after the site has initially loaded? I want the music to start playing as soon as the initial loading process has finished.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved