Muting A Streaming FLV - Why Is This Not Working?
Ok I am scripting a mute button, and I have set up my code to attach the audio from my FLV that is being streamed from my FMS to attach it's self to a move clip "vSound". I must be missing something? what is it? any help would be great.
netstream = video_ns mute button = mute emptyclip = vSound
Code: //mute button this.createEmptyMovieClip("vSound",this.getNextHighestDepth()); vSound.attachAudio(video_ns); var so:Sound = new Sound(vSound); so.setVolume(100); mute.onRollOver = function() { if(so.getVolume()== 100) { this.gotoAndStop("onOver"); } else { this.gotoAndStop("muteOver"); } } mute.onRollOut = function() { if(so.getVolume()== 100) { this.gotoAndStop("on"); } else { this.gotoAndStop("mute"); } } mute.onRelease = function() { if(so.getVolume()== 100) { so.setVolume(0); this.gotoAndStop("muteOver"); } else { so.setVolume(100); this.gotoAndStop("onOver"); } }
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 01-24-2006, 12:50 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Muting A Streaming Audio Track
This is probably a newbie question, as I'm on exactly my 4th day of working with Flash MX 2004. So if I'm hopelessly deluded as to the best way to do what I'm attempting, don't hesitate to tell me (better for me to learn now than later).
The idea is simple: to have a streaming track of music that plays behind the animation, but can be muted (and possibly unmuted) via a button.
I did the following steps:
Added the MP3 file in question to the Library
Right clicked on the MP3 in the Library, selected "Linkage...", and set it to be exported for AS and in the 1st frame, and gave it the identifier "previewaudio".
Created an empty layer in the animation and selected it
Dragged the MP3 from the Library onto the Stage
In Properties for that layer, set the Sync type to "Stream"
Created a button on its own layer, in accordance with the MX help file (changed it to a button symbol, added a simple mouseover animation, etc)
Selected the button and added the following ActionScript for it:
ActionScript Code:
on (release) { _root.previewaudio.stop(); }
The Mute button does nothing to stop the audio after all of this. (It does stop the audio if I use a "Stop All Audio" behavior instead of the script, but I don't want to do that because I'd prefer the option of being able to start the audio again later.)
Am I misunderstanding something about how the Identifier field works? If so, how should I use AS to "get at" a streaming audio track that has been added to an animation in this fashion? I've read things about creating a sound object entirely through AS instead, but my concern with that is it looks to me like the only way to stream audio that way is to take it from an external file on the web server, and the web hosting provider where I'd like to put up this Flash animation doesn't support streaming MP3 files.
Any efforts to clear away some of the Flash-induced smoke in my eyes would be vastly appreciated!
- David
Muting A Streaming Audio Track
This is probably a newbie question, as I'm on exactly my 4th day of working with Flash MX 2004. So if I'm hopelessly deluded as to the best way to do what I'm attempting, don't hesitate to tell me (better for me to learn now than later).
The idea is simple: to have a streaming track of music that plays behind the animation, but can be muted (and possibly unmuted) via a button.
I did the following steps:
Added the MP3 file in question to the Library
Right clicked on the MP3 in the Library, selected "Linkage...", and set it to be exported for AS and in the 1st frame, and gave it the identifier "previewaudio".
Created an empty layer in the animation and selected it
Dragged the MP3 from the Library onto the Stage
In Properties for that layer, set the Sync type to "Stream"
Created a button on its own layer, in accordance with the MX help file (changed it to a button symbol, added a simple mouseover animation, etc)
Selected the button and added the following ActionScript for it:
ActionScript Code:
on (release) { _root.previewaudio.stop(); }
The Mute button does nothing to stop the audio after all of this. (It does stop the audio if I use a "Stop All Audio" behavior instead of the script, but I don't want to do that because I'd prefer the option of being able to start the audio again later.)
Am I misunderstanding something about how the Identifier field works? If so, how should I use AS to "get at" a streaming audio track that has been added to an animation in this fashion? I've read things about creating a sound object entirely through AS instead, but my concern with that is it looks to me like the only way to stream audio that way is to take it from an external file on the web server, and the web hosting provider where I'd like to put up this Flash animation doesn't support streaming MP3 files.
Any efforts to clear away some of the Flash-induced smoke in my eyes would be vastly appreciated!
- David
Streaming An .flv Why Isn't This Working
i'm testing an install of FMS and i have my applicaton folder "streamTest" in the applications folder in the 'flashcom' folder on the server. within that folder i have a 'main.asc' file and a streams folder which contains a folder called "_definst_".
My .swf is able to connect via netConnection when testing in Flash as well as when uploaded to a separate webserver (not the flashcom server). I know it's connecting b/c i'm tracing the .onStatus for the netConnection as well as the netStream object they come back "NetConnection.Connect.Success" and "NetStream.Play.Start" respectively.
I created a new video object in the library and dragged it to the stage and gave it the instance name "vid1."
no video plays (it's a 30mb .flv). I'm getting frustrated! anyone got any ideas?
here's my code:
Code:
stop();
nc= new NetConnection();
nc.onStatus=function(infoObject){
trace(infoObject.code);
tracer.text=infoObject.code;
}
nc.connect("rtmp://64.192.171.116/streamTest/streams/_definst_");
ns = new NetStream(nc);
ns.onStatus=function(infoObject){
trace(infoObject.code);
tracer2.text=infoObject.code;
}
vid1.attachVideo(ns);
ns.setBufferTime(0);
ns.play("deafunion");
here's the .fla as well if anybody can take a look!
i should mention too that i have a 'main.asc' file in the application folder (testStream) which is generic and i'm not sure if i need it or what exactly to put in there if i do. right now it has this code in it:
Code:
load("components.asc");
application.onConnect = function(newClient, name) {
// Give this new client the same name as the user name
newClient.name=name;
// Accept the new client's connection
application.acceptConnection(newClient);
// Create a customized "Hello [client]" message
// that the server will send to the client
var msg = "Hello! You are connected as: " + newClient.name;
// Print out status message in the application console
trace("Sending this message: " + msg);
// Call the client function, 'message,' and pass it the 'msg'
newClient.call("msgFromSrvr", false, msg);
}
Streaming FLV Not Working -- Why?
The following code WORKS!
ActionScript Code:
_global.myMov = "movie.flv";var connection_nc:NetConnection = new NetConnection();connection_nc.connect(null);var stream_ns:NetStream = new NetStream(connection_nc);stream_ns.setBufferTime(3);video1_video.attachVideo(_global.myMov);trace(stream_ns)stream_ns.play(stream_ns);stream_ns.pause(true);//pause at startstream_ns.seek(0);//when vid reaches end -- rewind, pause at start and image_visible = truestream_ns.onStatus = function(vInfo:Object) {if (vInfo.code == "NetStream.Play.Stop") {//once video has stopped playingtrace("video stopped");stream_ns.pause(true);//pause videostream_ns.seek(0);//send video back to startmc_playpause.gotoAndPlay(1);//return playpause button to initial pointmc_imageloader._visible = true;//show still image}};
Oh yes it does. I have it in an FLA file that I'm testing things on and it loads up the movie nicely and then I can use my play/pause and rewind buttons with the movie with no problems.
But for some reason, when I place all of these things into the main movie I'm working on (everything -- all code, buttons and the video holder (Flash Embedded Video), all of which have the same instance names as in the test movie) it doesn't work!!!! And yes, the path to the video file is correct as both the test movie and the main movie are in the same directory.
It just doesn't show up!! It's not masked or anything like that either.
If you can see anything wrong with this scenario that would prevent the video playing in my main movie, speak now or forever hold your peace.
Links Not Working While Streaming MP3
Hi,
I'm stuck with a problem that I have no idea how to fix.
I have built an online music player - it streams music across using the loadSound(location, true); method and the location of the music is fed using XML.
While the song is downloading it is impossible to do anything, click something within the SWF movie, click any link etc.
I've have tried hosting the SWF file on a sub domain to see if it would make any difference, but unfortunately not.
Anyone has any ideas??! Would appreciate any help.
Matt
SeekToNavCuePoint Not Working When Streaming
I'm trying to seek to a nav cuepoint on 'ready' event. *This works locally,* but does not seek when rtmp'ing off live server.
/**
* seek to cuepoint
* on ready event
*/
var startPoint:String = 'tq_1_start';
var lObj:Object = new Object();
lObj.ready = function(evt:Object):Void {
myFLV.seekToNavCuePoint(startPoint);
};
myFLV.addEventListener('ready', lObj);
Video Streaming Via AS Not Working On A Cdrom
Streaming Video CDROM projector.
hi
a friend of mine is making a CDROM product for a local bar for her uni project... she's got video that streams from outside the projector.
i've coded the video for her so that it pulls it in from a folder and it all works fine while on a folder on a computer..
The problem is when she burns it to CD...
for some unknow reason it's not finding the video source...
i've used the netstream method....
Somebody told me their was a problem with projector on a mac and video streaming..
can't find much about it on any forums etc.
she's got a deadline next week so a quick reply with any sollution will be grand
Streaming SWF With Timeline Sound Not Working
Hello everybody
I'm streaming an external SWF into another movieclip, the external SWF has a timeline animation and sound (voice speech) as well on the timeline, it also has a preloader on it which it's set up that when 30% loaded is completed to start playing the animation.
But when I run the main movieclip the streaming of the external SWF works fine for the animation but the sound does not play until the preloader is 100% completed.
I don't know what I'm doing wrong. Can anyone help?
Thanks in advance
Streaming Working In Server Not In Client
HI,
I have recently installed FMS3 in my server and try to test the sample vod web app. It works very well in the browser in server..but when i try to access the same tru a website in the same server its giving connection error in the swf file.. Please help if some one know this problem..
Thanks in advance.
Prem
Streaming Live Camera Not Working
I am very new to FMS and need some pointers on where to go now i have the product installed.
Currently i have FMS installled on a server and can access the Flash Media Administration with no problems. I have setup a webcam on a desktop and used the Adobe Flash Media Converter to streram the output to the FMS, giving it the FMS URL as rtmp://<ip address>/live/livestream which connects fine.
Here is where i have the problem. I have run the URL rtmp:localhost/live/livestream on the FMS server but all it says is 'connecting'. I have also tried running the livetest.html from the ../samples/applications/live directory but this again just shows 'loading' at the bottom of the screen.
This setup really is just a test for me to try and get an understanding of the FMS etc, what i will really need to do is take a feed from an IP camera to the FMS and then stream this out to multiple desktops.
Can anyone help with with the above issue and also proivde some pointers for me to progress with the live setup.
Many thanks
Streaming Audio Not Working In Flash8?
When I import an MP3 into Flash 8 and set it on the timeline to stream, it doesn't play in the SWF and I don't think it even compiles into it when I publish the .FLA
Any thoughts?
Streaming Audio Not Working In IE (works In Firefox)
EDIT: Problem solved. I upgraded to the latest version of the Flash player, and audio now works.
I'm currently working on a presentation, and use SWFObject to run it in a browser. You can see it here...
http://asureimage.com/presentations.php
The SWF streams an audio track (MP3). This works just fine inside the Flash development environment, and in Firefox. In IE I can view the presentation, but get no sound.
I can directly reference the audio track in IE, and it plays just fine in Quicktime. To further check this wasn't a general audio problem in IE, I ran a YouTube video, and that worked just fine.
Any ideas on what the problem is?
Edited: 05/05/2007 at 01:59:01 AM by megaresp
Muting A Swf
is there some way to prevent all sounds playing in a particular embedded swf? currently playing and in the future - stopAllSounds() is no use..
thanks.
Muting Sound
Is it possible to toggle sound on and off? StopAllSounds(); just stops all audio but I've never come across anything that just mutes it temporarily.
Muting Sound
Hello boys
I´d really like to be able to mute the sound in my movie. How can I accomplish this? I´ve synced the sound to some animations in one clip. Do I have to put the sound in its own clip or something?
Muting Sound Help
Im using Flash Mx V6.0 and I need help.
Im creating a flash intro for my site, but i am having trouble with sounds. What i would like to happen is when you click on a button, it will mute the sound, without stopping it, and then when you click on another button, it turns the volume up again. The music cannot be stopped as most of the intro is in time with the muscic, so if you were to stop the music, when you click on play again it will all be out of sync.
Has any got any ideas???
Thanks
M3XEL
Muting An Flv Movie
Hi guys/gals
Just wondering how do i mute an external flv movie?
Its in a video holder object which is itself within another movie clip.
ie: videoHolder_mc.videoHolder
I tried the following to mute the flv movie playing but does not seem to work:
Code:
video_sound = new Sound(videoHolder_mc.videoHolder);
videoSound_btn.onRelease = function(){
videoHolder_mc.videoHolder.setVolume = 0;
}
Any help appreciated
cheers
Muting Button
Hello people, first time poster here. I'm not a beginner with Flash but I'm certainly not an expert either. I don't know if this topic has been covered or not but I've had a look around and haven't found it...yet.
Anyway, long story short, I've created an animation that works very well, plays a bit of sound, but due to usability reasons I want to include a mute button that turns off all the sound, and back on again.
I've tried doing this with simply stopping a sound and using stopAllSounds actionscript code but this only seems to stop the currently playing sound, so if I were to click on another button in my movie, another sound will play anyway, so it doesn't turn off every single sound. So what I want is a mute button that mutes every sound, whether they're playing or not. Is this at all possible? Any suggestions as to how I can implement some sort of muting button with the approriate code will be much appreciated.
Muting Audio
Hi,
Is it possible to mute audio that is placed in a layer inside the timeline of a MC?
Or do I need to use a sound object to create that feature?
Thanks
p.
Muting Sound?
I have a sound clip that loads in the first fram of a long movie and I have sync'd the movie with the sound so I DO NOT want to turn off all sounds: if this happens and the user starts sounds again the sync will be off. I simply want to mute the sound.
Any thoughts?
Muting Sounds
Hi everyone. I guess a question of this kind has been repeated many and many times and I found a lot of ways of doing it but never found an answer that applied to me or just helped (maybe it is because I didn't really understood them, or didn't know how to apply them).
So here we go.. I'm making, first of all, a website where I want to add sounds in menu items, using Flash MX 2004. Now what I want is to put an image button that allows visitors to mute all sounds from the menu, or whatever in my website that makes sound. When they will click on it, the "speaker image" will be marked with a red circle and the visitor will be able to click back on it to get all the sounds again. You know what I mean, I'm sure of it.
Now here's some precisions about my situation : I have many scenes and I want to apply this to all of them, but my sounds are already put on buttons (a sound on "over", one on "down", etc.).
All I know of this, is that I guess I will need to use variables (which I never used before), that I will probably need to use something called "_root" that I don't get a thing of it. I don't know how to mute the sounds once and for all (until pressing back on button), I don't know how to use setVolume.
Thank you for taking some time to help me, this is pretty important to me. If you want to ask some more questions for precisions, don't hesitate. Thanks again.
Muting Problem
Ok, this problem has been bothering me for some time but I didn't want to tackle it due to lack of time or laziness or whatever. I basically am finished with my portfolio site and recently on of my friends said that the background music can be a little irritating. Never having thought of a mute button, I think I built my site so that muting is difficult. My site has 5 scenes. What you click on a naviagation button, it switches to another scene. What I wanted to do is create a movie clip with two frames. Frame one will have the music loaded and a stop command. Frame two will have a stop command and stopAllSound command. Then I wanted to insert this movie clip into the beginning of scene1 and name the movieclip background_sound. The problem occurs when I am in a scene other and scene 1. For the mute button for scenes 2 thru 5 to coded it
on(release) {
Scene1.background_sound.play()
}
When I try to run this, there is an error and it doesn't work.
How do I make this work or am I going about this all wrong? If there is another way, please let me know. Thanks.
Muting NetStream
Hi I am developing an mp3 player that streams through flash comms but for the life of me cant seem to figure out how to mute the volume or even put a volume slider on it.
If anyone out there has the knowledge i would most appreciate it.
°Muting Audio
Hello boys and girls, my first post here in this lovely forum
I´m making af movie and I want to be able to mute the audio using a button. How do I go about doing this cause the audio is synced to some animation and when the user turns the audio back on the audio has to re-sync.
I´ve put the audio and animation in its own movie clip.
I have no idea how to accomplish this, would really like some help here.
Muting Sound Help?
Hey Peeps ,
How are you all going?? I'm having a bit of trouble with muting some sound and unmuting it with the same button.
Here is my AS Code:
ActionScript Code:
on(release){ var mySnd = new Sound(_root); mySnd.setVolume(0); function Volume(){ if(mySnd.volume == 0){ mySnd.setVolume(100); } } Volume();}
What i'm trying to do is mute the sound when the button is clicked...and then when it's clicked unmute the sound...
I was thinking about using an if statement to check if the volume was set to 0 and if so change it to 100 and visa versa. Any ideas why my code isn't working??
NB i'm muting the sounds on the root level of my swf...
Cheers in advance
George
Muting Sounds
I have a swf that loads external swfs. I am trying to add a mute button to the container swf that controls the volume, so the user can mute and unmute the sound. However, I cannot figure out how to accomplish this. I cant get setVolume from AS2 to do the job. I have also tried SoundTransform.volume=0 and that didnt work. Please help thanks.
°Muting Audio
Hello boys and girls, my first post here in this lovely forum
I´m making af movie and I want to be able to mute the audio using a button. How do I go about doing this cause the audio is synced to some animation and when the user turns the audio back on the audio has to re-sync.
I´ve put the audio and animation in its own movie clip.
I have no idea how to accomplish this, would really like some help here.
Muting Root Sounds
Hello, I have a video clip in flash (MX), with two buttons giving the user the option of muting either the left or the right channel audio (the vid and both audio channels were imported seperately).
I used .attachSound in two seperate, empty mc's on the stage and the buttons would .getVolume of the respective mc on scroll over and .setVolume when pressed. Everything worked fine, however, the synch was wayyyy off. Even when I moved either of the mc's first frames on the main timeline to synch with the vid, eventually, the audio ran away from me because (I assumed) they were not running at the same fps. I noodled around with the fps; even tried re-importing the video at different keyframe intervals...to no avail.
When I add the audio clips (set to 'synch') to their own layer on the main timeline (getting rid of the two empty mc's), the synch is beautiful. Unfortunately, the mute buttons are worthless. Is there A.S. I'm not aware of (or overlooking) that would call this function from a button; essentially, muting a specific sound on the main timeline, rather than the overall sound of the movie (in my case, both audio channels)?
My apologies if I've over explained and thanks for taking the time.
Muting Sounds Help :: Flash MX
I need to kill the audio in a movie that has a narration and subsequent animation that describes what is being narrated.
The client wants a "mute" button that when clicked, would keep the movie playing while the audio is muted, and text boxes would appear instead of the audio.
The function "stop" won't work for the sound, nor will "stopallsounds" because it will just restart the sound say if someone were to hit pause and unpause the movie [pause/play is another user control].
I need an easy way to turn the sound to zero. In the main timeline i have 3 to 5 sequential sounds carry forth through the whole movie. The sounds need to be embedded in the movie and they must be a "stream" sound. I am thinking I need to be able to call all of the sounds as one item, as the movie could be playing any of the 5 sounds at a given time.
What is the best way to control the volume to zero given these circumstances?
Muting Audio In Scrollpane
Hey!
Look at http://www.david-ford.com. I have a scrollpane that plays a video, the video uses one of those multimedia content components to stream a FLV file.
Any way that on the main movie i can have a button that mutes the audio coming from the scrollpane?
this sounds stupid 'coz i know this doesnt exist, but summat like this:
on(release){
scrollpane.Sound="off";
}
Muting Sound Without AttachSound
Hey guys,
I was wondering if it is possible to mute the sound of a loaded movie?
I know I could use attachSound in the loaded movie and control it that way, but for certain reasons this is not an option.
Any ideas about how this could be achieved?
Thanks
Muting Video Sounds
Ok I have created a player that loads a video through a URL. Without ceating a volume slider is there a way to let the video run with no sound. The stopAllSounds function only seems to work on Sound().
Any help would be great.
Sound Muting Trouble
Hi,
I am having trouble muting sounds with a mute button. I can successfully mute sound in a movie clip using the following code:
_root.my_mc.allSound.stop();
("allSound" is a sound object I created that has no sound attached to it so that it controls all sounds within the movie clip).
However I have another movie clip again with a sound object controlling all sound that I am unable to mute using the same procedure in the mute button:
_root.my_mc2.allmcSound.stop();
I have tried using stopAllSounds() but still no luck.
The strange thing is, I use the same procedure for controlling the volume in my volume slider, and it works:
allSound.setVolume(_root.volume);
my_mc2.allmcSound.setVolume(_root.volume);
Not sure why I cant mute "allmcSound"
Sound Muting Problem
Hi,
I am trouble creating a mute button. In my fla file I have created sound objects in actionscript and put sounds in movie clip timelines. How can I mute every sound in the document? I can mute sound objects fine by stopping each of them individually, but I want some simple code to kill all sounds. I have tried:
stopAllSounds();
_root.stopAllSounds();
_root.my_mc.stopAllSounds();
// "my_mc" is the name of the movie clip that contains sounds in its timeline
but no luck. What else could I try?
Also, how do you stop a sound in a timeline using actionscript?
Thanks
Muting Embedded Video
I have an embedded video which I put into a movieclip on the _root of my movie. On the start of the movie I have its visibility as false but the audio still plays.
I tried both
ActionScript Code:
_root.this.volume = 0;
and
ActionScript Code:
_root.embeddedvideo.volume = 0;
but neither seem to work.
Stopping Sounds (muting)
in my flash document I have a .flv file that plays when the document loads. i need to find out how to mute the .flv with a button. the solution has to be in AS3. i have searched all over the web for a simple elegant solution that works and i haven't found anything. if anybody has a solution, could you please share it with me/us. thanks.
Muting Sounds In Flash MX
I need to kill the audio in a movie that has a narration and subsequent animation that describes what is being narrated.
The client wants a "mute" button that when clicked, would keep the movie playing while the audio is muted, and text boxes would appear instead of the audio.
The function "stop" won't work for the sound, nor will "stopallsounds" because it will just restart the sound say if someone were to hit pause and unpause the movie [pause/play is another user control].
I need an easy way to turn the sound to zero. In the main timeline i have 3 to 5 sequential sounds carry forth through the whole movie. The sounds need to be embedded in the movie and they must be a "stream" sound. I am thinking I need to be able to call all of the sounds as one item, as the movie could be playing any of the 5 sounds at a given time.
What is the best way to control the volume to zero given these circumstances?
Muting A .mov Flix Video
I have imported a .mov videoclip to flash, but there is some unwanted sounds on it. Can I make flash mute the clip? Or can you recommend another program that enables me to mute it and save the changes, so I can import the muted version to flash?
Muting Video In A Loaded Swf
Anyone know how to mute video in a loaded swf created by Sorenson, not using the media components. Looking for an action to be placed on a button. I currently use stop all sounds but this removes the sound completely, and would like a mute or volume option. Thanks.
Muting Sound On Rewind
I have a navigation system that uses the following code.
Quote:
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
Anyway, I was using that but I wanted to put in button rollover sounds. I had it start on the second frame, but the problem was that on rollOut it would play the sound again. And that's not what I want.
I tried using the mySound setVolume(0); command, or something similar. I thought it'd do the trick, but it didn't do anything to it.
I was wondering if there was something I could put into my AS that would play the sound from the library on rollOver, or mute the sound on rollOut. Thanks in advance.
How Do I Keep Loaded Content From Muting My SWF?
When you load an external SWF, Flash gives you some control over what the loaded content can and can't do.
I'd like to know how to prevent loaded content from setting SoundMixer.soundtransform. My main code is responsible for controlling audio, and I don't want loaded SWFs to mess with the global volume and pan. Any ideas?
Muting A .mov Flix Video
I have imported a .mov videoclip to flash, but there is some unwanted sounds on it. Can I make flash mute the clip? Or can you recommend another program that enables me to mute it and save the changes, so I can import the muted version to flash?
Preloading Or Muting Audio
I'm trying to preload my audio files. Since I have many external swf's and audio files playing one after the other, I thought the best way to preload my audio files would be to load them on to the stage before hand but mute them. When the audio file reaches its turn to play, I want to unmute it.
any ideas on how to mute audio?
thanks
Muting Movie Clip
If I'm preloading an external swf which contains audio, how do I preload it so that the audio is muted?
thanks
Muting Flash Through HTML
I've got an swf that I want to put up on my site, but I don't want its sound to play when users go to the page. Unfortunately, I don't have the fla source, so I can't disable the sound that way. I was wondering if there is some sort of object param for Flash objects that can control the audio in html? Anyone know?
Thanks in advance!
Muting Background Sound With SetVolume
I have a little problem. I'm trying to use the unfashionable way of muting the background music/sound using the setVolume method.
I have two buttons. One is the mute button, the other is the unmute button. The mute button simply says:
onClipEvent(mouseDown){
_root.volume.setVolume(0);
}
While he unmute button says:
onClipEvent(mouseDown){
_root.volume.setVolume(100);
}
Quite simple. Should work, right? Well for some odd reason it doesn't. The mute button does it's job just fine. But the unmute button won't. I have no idea what could be wrong.
For debugging purposes, I have a dynamic text-field with the value of the current volume level displaying in it. When I hit the mute button the text-field displays 100. This is not correct! The volume level should be at zero!
I originally used this code on one mute button, but split it up into two buttons because it wasn't working:
// when the user presses the mute button
onClipEvent(mouseDown)
{
s = new Sound();
if (s.getVolume != 0) // if volume not muted already ...
{
s.setVolume(0); // ... mute it
} else {
s.setVolume(100); // ... if it was muted, then unmute it.
}
}
I really need some help! Its 12:16 AM here, and I'm exhausted. I'd like to see if I can get this fixed.
Muting Sound In The Main Timeline
Hi guys! Is there a way to mute a sound located in the main timeline, provided that the sound doesn't actually stop, and then turn it back on? e.g. like watching t.v. news.
Muting Video Imports (Flash MX)
Is there a way to disable sounds when I import video clips, i want to make like a collection of little clips but have music playing over and i don't want the from the clips playing, so is there a way to mute them?
i am using Flash MX
thanks
|