ActionScript 3.0 :: Mute The Music When A Person Clicks On The Video?
Nov 25, 2010
[URL]
I have a small problem I want to mute the music when a person clicks on the video page so they dont have to manually click the speaker to shut the sound off to hear the video. As well when they leave the page I want the music to continue playing. The music does not have to start over again, I just want it to mute while on the video page.
I tried using this: SoundMixer.soundTransform = new SoundTransform(0);
But it even mutes the video sound.
And I tried this: SoundMixer.stopAll();
It does kill off the background music, but I dont know how to turn on the music again when you leave the video page.
I prefer to use: SoundMixer.soundTransform = new SoundTransform(0); as it is easier to work with and you can adjust the volume as you like.
The music script and the video script
This is my action script for the music:
// Assign The URL to the mp3 to play
var req:URLRequest = new URLRequest("101-jakatta-
[Code].....
View 14 Replies
Similar Posts:
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
Apr 24, 2004
I'm using some modified code from a chapter exercise (from a text book) to play four separate MP3s external to the FLA. Here's an example of what happens when a button is clicked:
[Code]....
The problem is, there's something of a noticeable stutter when the MP3 reaches the end, just before it starts up again. The first MP3 (contrary to the others), is a seamless ambient sound which ought to sound perfect in the FLA, but doesn't, again, because of the slight stutter in starting it up again. Is there a better way to do this? I thought, perhaps, this would be fixed if I removed the "stop();" line and instead had it play the next frame, which would invariably send it back to the previous one, but this changed nothing.
Is there a better method to use? Even with the other three MP3s, which aren't seamless, I want to loop, unless and until the user clicks the 'Mute' button. My last thread (about setInterval)received no replies, but I'm hoping this will, especially as this final project is due this Wednesday and I'd rather it not have this slight hiccup in it.
View 2 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
Jan 28, 2010
I am using the Sound class to play both music and sound in my game (.mp3). I am using the:
SoundMixer.soundTransform = new SoundTransform(0);
But, I will need something to mute only sound or only music, this would mute both.
View 1 Replies
Mar 9, 2011
I have some songs in the same folder as i have my .fla file. I call the .mp3 file on the first frame and i want to be able to pause it or stop it when i click on a button. I would appreciate the code for that. Or maybe any other suggestion on how i should add music to my .fla file.
View 9 Replies
Dec 1, 2011
I got flash player, integrated in website.When I go to my site, backround music start to play automatically But if I stop the music and go to other page of my site, music starts again.[code]...
View 4 Replies
Sep 2, 2007
i have a problem with my music palyer i can't get it to just pause/mute the music. here's the code.
Code:
bgSound = new Sound();
bgSound.loadSound("ChrisBrow-RunIt.mp3",true);
playIt.enabled = false;
[Code]...
View 1 Replies
Jan 28, 2010
I am using the Sound class to play both music and sound in my game (.mp3). I am using the:
SoundMixer.soundTransform = new SoundTransform(0);
But, I will need something to mute only sound or only music, this would mute both...
View 2 Replies
Nov 1, 2010
I'd like to start a music with my animation in mute (volume 0), and then, use a "ON/OFF" button to hear the sound (volume 1 or 0).
View 6 Replies
Dec 7, 2009
I have an .mp3 file which is supposed to be embedded in the timeline. Since it is 6 minutes long, it not practical to run it streaming on to the 7,200 frame. Consequently, in order to get it to run I have set the property to Event rather than sound. Also I have set it to repeat 99 times. How can I put in a volune control, or mute button. Can anyone help as I am quite new to this.
View 1 Replies
Dec 30, 2011
I call it a hiccup because the code works; but it's backwards. When I hit the audio button it plays the music and when I hit it again it stops the music. I wish for the music to play automatically when you enter the SWF and then you hit the button to mute the music if you wish; and then hit the button again to play the music again.
Here is the code I have:
toggleButton.addEventListener(MouseEvent.MOUSE_OVER, rolloverToggle);
toggleButton.addEventListener(MouseEvent.MOUSE_OUT, rolloutToggle);
toggleButton.addEventListener(MouseEvent.CLICK, toggleClick);
toggleButton.buttonState = "On";
var song:Sound = new TitleMusic();
[Code] .....
View 7 Replies
Mar 9, 2009
I need the code to mute/unmute the volume for an internal aif music file using a button.
View 2 Replies
May 11, 2009
I would like to create my own mute button in as3. I have created a video object which plays my video fine. I'm having trouble finding information on how to create a mute button that mutes the audio but the video continues to play. All documentation that I've read relates to controlling sound from an loaded .mp3 file.
View 8 Replies
Sep 9, 2009
Is there anyway to use ActionScript (and/or Flashvars) to tell a video page to begin with the Mute button toggled to off? We are creating a page for multiple-languages, and the client wants the sound to begin muted. I have yet to figure out what kind of variable is used by muteButton in the built in skin, whether its a boolean with true/false or what.
View 1 Replies
Feb 3, 2009
I've downloaded the the Flash mp3 Player. I did some minor modifications to it and it works well. The only problem I have is that when the mute button is pressed, the current song is mute(s.setVolume(0)), but when the next song comes up, the mute button is not in mute state(Volume not set to 0). I want to keep the mute state unchanged when the songs are playing untill the mute button is pressed again.
View 6 Replies
Sep 19, 2011
How can I mute the video on the a page to do the following: Once user clicks on any of the social buttons, the flash video should mute automatically.
View 1 Replies
Mar 13, 2007
I'm trying to figure out how to track clicks from an xml fed video streamer. I read the article at Google about adding the event to a basic Flash button: [URL] But how do you compile the info from an external XML document? The beauty of XML is the ease of switching out content. I just don't know enough about AS to tell it to not only stream the video but also to send urchinTracker info back to my Analytics report.
[Code]...
View 3 Replies
Mar 27, 2009
I am using flash 8 professional.
I have a custom video player that loads videos from an external xml file. It uses all actionscript to control the video using the attatchVideo(ns).
At present the video starts playing as soon as the video opens, I would like the video to only start playing after the user clicks the play button.
What is the actionscript I need to achieve this?
* all the actionscript for all buttons etc. is on one layer called actions. Videos are external not on layers.
View 3 Replies
Jul 11, 2009
I have a flash page that loads a video. Under that I have a button tcalled "Audio Demos" that opens a pop up with an audio player.
The problem is that the video keeps playing, so I need some code that stops the video when the user clicks on the "Audio Demos" button.
Here's the code for the button:
function getGilbertAudiodemos(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.gilbert.net.au/demo.html"));
}
gil_audio.addEventListener(MouseEvent.CLICK, getGilbertAudiodemos);
View 2 Replies
Mar 28, 2009
Using the tutorials on the gotoandlearn main page I built a custom video player that loads the videos from an xml file and it works great. At present the video starts playing as soon as the video opens, I would like the video to only start playing after the user clicks the play button.
View 3 Replies
Jan 17, 2010
I am trying to create a little website in flash.. I have some video that plays automatically once the user goes to that section (I am using frame labels to navigate from section to section of the site). But, when the user clicks another button to go to a different page, the video is still playing because I hear it..How can I stop the video from playing once another button gets clicked?
View 20 Replies
Mar 19, 2010
I am in frame 20 which is playing a video, How do I get it to stop sound and video when some clicks a menu button to go to another frame? Where do I put the code?0
View 3 Replies
Sep 23, 2010
I'm building a project that has a character navigate through a room by clicking on the floor. Right now, the walls, character, and floor are all children of the same display object for sorting purposes. My question: is there a way to disable mouse clicks to the walls and character while allowing clicks to the floor? Using mouseChildren appears to be an all or nothing deal and I can't seem to isolate individual floor/wall/character objects for use with mouseEnabled.
View 4 Replies
Jan 15, 2011
I want to create a short intro for a music video using digital pictures, as I don't have a camera.[URL]
View 1 Replies
Mar 17, 2011
How would I play an audio file throughout the entire clip that I am making? It is a recording of myself narrating a video, so it has to start as soon as the video star
View 3 Replies
Nov 22, 2009
Im have an flv playing on my stage. I want to make a mute button for the video that can instantly make the volume 0 or 100 depending on what it is.So i have tried using this code:
ActionScript Code:
m.onPress = function() {
[code]........However, it doesn't seem to work.
View 0 Replies
Aug 5, 2010
So i have a flv playing on a flash load. I need the mute button toggled to "mute" by default.
Code:
my_FLVPlybk.muteButton = mutebtn;
that is the mute button instance i am using.
View 1 Replies
Nov 17, 2010
I am a student and I use CS4 on a Mac on one of the schools computers. One of the animation projects I am working I need to animate a music video. To do this I calculated out the BPM of the song and set the frame rate at 23.3 FPS so that I would have 20 Frames between beats. Then to have a visual representation of the timing I set a layer that has a red dot blink for 2 frames every 20 frames starting on the first beat.
With it set up like this and I run the animation in Flash it keeps time correctly and works. However, when I test the video the time is off. I tried changing the frame rate to 60fps as an arbitrary number to see if adjusting the frame rate had any affect of the test file but when I tested the video at 60fps it did not run any faster than before. I exported the video to a SWF and MOV file but it was still off.
View 1 Replies
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