ActionScript 1/2 :: Fading Background Music - Video Sound Also Turned Off
Sep 20, 2010
I have a flash file with a background music sound object, and I have a video player at a particular section on the timeline. When the playback head goes to the section with the video player, I would like the background music to fade, but of course, I need the volume to be up for the video. The code I have works find to fade the audio, but the problem is that the video's sound also turns off.
This is the code at the beginning of the timeline:
_global.volumeVar = 40; //Stores the current volume.
bgSound = new Sound(this); //This block works finebgSound.attachSound("music");bgSound.start(0,99);
bgSound.setVolume(0);
[Code] .....
Further down the time line, in the video player section, there this code, which works to fade the sound, but seems to turn off the video, too:
nInterval = setInterval(fadeOutSound, _global.volumeVar);
View 5 Replies
Similar Posts:
Jan 17, 2009
Here I've a sound track included in timeline from first frame (not in actionscript).
And after intro, I've a video button where I added a video with sound which starts to play by clicking
Now the problem is both background music & video sound mixing & creates a noise kinda combination.
I need a solution like fading out the background music if i click the video button & fading in when clicking some other button or navigating to other pages?[code]...
View 0 Replies
Apr 20, 2011
I'm triying to stop a sound of a button, while you hear a background music. The music is assigned in the timeline for the animation. When the animation stop at a specific frame (activity), the button are showed. At this point is all ok.
I don't understand... I am very specific to wich sound must stop. Is there a bug?
In AS 3.0 is more easy when you use the SoundChannel, but in AS 2.0 ?
View 3 Replies
Jul 28, 2010
I've read through several tutorials but I must be doing something wrong on this. I'm using Adobe Flash Pro CS4. I am trying to create a short clip that fades text in over a bacground video. When I create a motion tween on the text track, I'm generating an error and the background video is no longer visible in the preview. Instead, I see the text over the stage background color. It is as if the background video track has switched to wireframe. Here are the steps I've followed:
1. Created Flash File (ActionScript 3.0).
2. Imported Video into the State background layer - it appears as a black image in the it previews fine at that point
3. Created new layer for text and placed text - it previews fine at this point, text is overlaying video
4. I right click on the text block and choose convert to symbol.
5. Next with the play head on the first frame and the Text layer selected I choose Create Motion Tween. This is when AFP throws this error:TypeError: Error #1009: Cannot access a property or method of a null object reference. at fl.video::UIManager/http://www.adobe.com/2007/flash/flvplayback/internal::hookUpCustomComp onents() at [code]...
View 1 Replies
Jun 22, 2009
I am developing an application in flash(AS2) with FMS/RED5. where i want to record sound through microphone with background music(Flash is playing mp3). is that possible in as2 ?
View 0 Replies
Jul 13, 2011
I'm working on a background music class and found that you cannot use the Sound class in a class file. Specifically, initiating and attaching the sound. Starting, stopping, getting the duration and such seem acceptable (though I haven't tested this yet). I've done a few searches and haven't found any work arounds other than when the class is called, hand it the sound object with the sound already attached, like this:
ActionScript Code:
import bgMusicClass;
var bgSnd:Sound = new Sound(this);
bgSnd.attachSnd("newWave.mp3");
var bgMusic = new bgMusicClass(bgSnd);
View 2 Replies
Sep 2, 2008
how to change this on my 'flash template' and how to successfully mute the background music as my VIDEO starts to play.
I have uploaded my FLA file so that you can see what the problem is:
[URL]
The background music is set as per TEMPLATE that I got. I would like to add a quicktime movie to the website, under the page titled "TRAILER" - and have tried to do so myself by adding the QUICKTIME to the project through another SWF that I got elsewhere (a different 'template' so to speak).
The original quicktime file that I wish to add is available here:
[URL]
I'd like to be able to stop the background music when the viewer visits the TRAILER page of the site, as that is when the trailer starts to play. The music can stop abruptly, that is fine.
I'd like for the music to continue to play (either from the start, or where it was stopped) when any other pages are visited after watching of the trailer.
View 9 Replies
Sep 3, 2010
I made a webiste with bg sound home, portfolio, gallery, contcts. This are the links. when click portfolio, which contain a flv file, when clicking the flv file bg music stop and video will play smoothly.But if i navigate to other links the sound from the flv remains their and my bg music not playing also.. one code SoundMixer.stopAll(); i got this code b4, it vil stop all sounds... i dnt need to stop the background music, i need to stop only my flv video sound.. there's a bg music playing, when entering to the portfolio section thers a flv video vth sound. i can stop all other sounds ven playing this flv video but i cant stop this sound ven navigating to other sections and i need to continue the bg sound ven navigating to other sections...
View 1 Replies
Apr 16, 2010
I followed the mp3player tutorial (part 3) from [URL] and got it working fine. Only problem is that the setVolume I'm trying to use with my music is affecting all my other sounds - button sounds and background sound. I'm aware of the createEmptyMovieClip/attachSound approach and got it working on my other sounds. But Lee's tutorial-mp3player is using a slight different technique, and so my normal approach doesn't quite work.
[Code]....
View 7 Replies
Dec 23, 2004
i'm making somekind of music / video player in flashmx2004. it plays streaming mp3 en flv files. random people can put a link into the players database. ofcourse there will be some that insert a dead link, now i want to check with actionscript (1.0) if the link is dead and if so, the player automaticly will skip this track. this is what i've got allready to load te streaming sound:
[Code]...
View 1 Replies
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
Dec 1, 2011
What is technical difference between buffering and loading ? Say, i have a video, which is showing loader bar in progress. Then what's happening exactly ? Buffering or Loading ?
View 1 Replies
Apr 11, 2009
so I have this scene in Flash where a song plays. However, once everything is done on the scene, the screen fades and it goes to the next one. I put a layer in the next one that stops the music, but it just suddenly stops without fade. Also it doesn't matter if I select FadeOut because it will still suddenly stop. If I put Event instead of Stop, the song just keeps playing.
View 1 Replies
Jun 1, 2011
does anybody know how to stop background sound when clicking play button for a video and when the video is finish how to turn background sound again on?
View 1 Replies
May 13, 2010
So I have a button (currently loading a movieclip) and on the main stage there is a piece of music playing constantly while the user looks around the available options on the flash.
What I want to know, is there a way to fade out the music when the button is clicked?
Im using ActionScript 2.0 also :-)
View 2 Replies
Nov 30, 2010
I'm working on a Flash movie that includes a simple on/off audio player. At the end of the movie it loops back to the beginning and plays again. if the viewer hits the sound off button it will turn the sound off untill the movie loops and then the audio automatically starts again. The viewer would then have to hit play again and then stop to stop it. Is it possible to fix this? I think that I ned to put a piece of code at the beginning of the movie to check if the sound is off or not and then to continue to keep it off if needed?Here is the code for the sound player I am using...
var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var lastPosition:Number = 0;
mySound.load(new URLRequest("GlidingOnAir.mp3"));
[code]....
View 2 Replies
Oct 7, 2009
I want to create a background that is made up of circles of different opacity levels. I would like the circles to continue to fade in and out while you are viewing animation. I was wondering what the best way to go about this is, using actionscript 3.
View 0 Replies
Jul 28, 2007
I have a quick question about fading a bg color using actionscript. I am creating a splash page at 800x600 in flash, which is being opened into a new window that fills the browser of the users screen. I already have the actionscript to open into a full browser window.
However, when the user clicks on a button in the 800x600 splash, the bg color in the full browser window will need to change from blue to white. What would be the best way to do this, is there a piece of actionscript that can be attached to a button to do this? Or does a large flash document size need to be created with the 800x600 centered in the middle?
View 1 Replies
Apr 11, 2011
I'm currently working on this site, which was made on a linear timeline and just rewinds and fast fowards to the frame with each page on [URL]
This was done with limited Actionscript, but now I need to redo it almost entirely in AS
I figure I need to keep everything on one frame (separate vertical frames, but no animation horizontally) and create movieclips for each page's content and tell it to fade in the content of whatever page is clicked on the nav, and fade out the rest. I will also need to do the same, but with the background images in fullscreen. I also have a problem with the bottom nav. It adjusts to window height on resize, but I can't get it to adjust automatically.
So how do I
1. Tell the movieclips to fade in and out when a button is clicked
2. Get the background images to fit full screen, and also fade in/out for each page
3. Get a movieclip to adjust to screen size without using onResize
View 0 Replies
Apr 14, 2010
I have been sent this website. When you click on an option from the menu, the menu and the background fade out to bring in a new background. The problem I am having is that I am trying to stop the menu fading out and just have the background change.The flash file for the part of the website I am working on can be found here:
http:[url].................
View 1 Replies
Sep 2, 2008
I am putting a flash website together. It is a picture of a group of people standing outside and at random intervals a storm will fade in and out giving dynamic rain/wind/thunder sounds and lightning. The only problem I have is fading the sound out. The sound fades in fine with the movie clip but when the movie clip disappears the sound continue.Here is the code for that part of the flash. The "randomness" of the storm is set to very high probability on purpose for debugging reasons.
View 1 Replies
Sep 9, 2009
I'm having an issue with fading sounds with GTween, can anyone let me know what I'm doing wrong here? Thanks in advance.
Code:
public function playBackgroundSound ( s : Sound ) : void
{
bgst = new SoundTransform( __volume );
[code]....
View 1 Replies
Jan 9, 2012
I have this problem when I try to fade in sound with the function below. It just doesn't work and I can't figure out where the problem is. I would like to fade in a looping sound but nothing happens.
this is used to play a sound via events
Code:
dispatchEvent(new CustomEventSound(CustomEventSound.PLAY_SOUND, Main.SOUND_AMBIENT, false, true, false, 999999, 0, 0, setSoundVolume));
this is the function to play a sound. the stop-function is almost identical to this one.
Code:
public function playSound(soundName:String, isSoundTrack:Boolean = false, fadeIn:Boolean = false, fadeOut:Boolean = false,
loops:int = 1, offset:Number = 0, volume:Number = 1):void {
[Code].....
View 7 Replies
Jul 27, 2005
I am looking for a way to play music when the movie loads, but when a button is pressed, the sound will fade to 0, then when the button is clicked again, it will fade to 100. Here is a link to the file I've been working on...
View 3 Replies
Dec 10, 2006
I'm trying to figure out how I can fade out a sound object after it has looped twice. Right now the sound fades 5 seconds before the end of the first loop (since the fade code is based on the duration of the sound clip).Seems like there needs to be a way to count when the duration has been reached two times and then the fade code is executed. Note: the linkage identifier of the sound clip is "mainPageLoop".[code]...
View 1 Replies
Jan 9, 2012
When I try to fade in sound with the function below. It just doesn't work and I can't figure out where the problem is. I would like to fade in a looping sound but nothing happens. This is used to play a sound via events
Code:
dispatchEvent(new CustomEventSound(CustomEventSound.PLAY_SOUND, Main.SOUND_AMBIENT, false, true, false, 999999, 0, 0, setSoundVolume));
This is the function to play a sound. the stop-function is almost identical to this one.
Code:
public function playSound(soundName:String, isSoundTrack:Boolean = false, fadeIn:Boolean = false, fadeOut:Boolean = false,
loops:int = 1, offset:Number = 0, volume:Number = 1):void {
if (fadeIn) {
tempSoundTransform.volume = 0;
[Code] .....
View 5 Replies
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
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
Oct 4, 2010
I have assembled a preloader using the method from this site, everything seem to work except for one problem My site supposed to start from a black background and the image fading in. However once I placed the preloader the image dose not fade in but appears right away to the full strength after the preloader gone to 100% Looks like it jumps to a few frames after the first frame of the main swf file. Please take a look at [URL] If you reload again you will see how the image fade in.
View 1 Replies
Aug 4, 2005
I'm trying to create a function that will help me fade in sounds with the help of setInterval. I'm almost there! Here is the code so far:
// Begin
melodyhalf1 = new Sound("melodyhalf1_mc");
melodyhalf1.attachSound("melodyhalf1");
melodyhalf1.start(0, 99);
[Code]....
I placed a comment in the Sound.prototype.fadeIn to test if it was being called, as well as to see if the melodyhalf1 variable (object?) was being passed.
The results are that the fadeIn function *is* being called, but the trace(this) comes back with 'undefined'.
View 4 Replies