ActionScript 3.0 :: Stop Streaming Audio Using A Button?
Oct 9, 2009
Sometimes I get ahead of myself and have to stop and say how the hell did I do this before? I'm referring to a simple stop button I need to put in a flash animation. I know how to code calling a sound from the library, starting and stopping from a btn. But how do I stop audio that is streaming inside a layer from a button ?
var my_sound:Sound = new Sound();
my_sound.load(new URLRequest("yoursoundfile.mp3"));
var my_channel:SoundChannel = new SoundChannel();
[Code]....
View 3 Replies
Similar Posts:
Aug 25, 2009
I ran a simple live video streaming application for the first time with actual users and ran into a couple of serious performance issues that had not turned up during testing. In this instance there was one video stream from a live web cam and used FMLE at 150 kbps using VP6 and MP3 @22k. There were 16 clients and everything worked pretty good for about 30 minutes. (although some clients said their audio and video were out of sync by up to 3 seconds)
Then individual clients would have either the video freeze or the video would continue and the audio would stop. These clints had to "disconnect" and then "connect" again to the application. This happened to all of the clients at one time or another for several minutes. I stopped and restarted the FMLE with progessively lower bandwidth settings down to 75 kbps but still clients were having the same issue.
I eventually stopped the FMLE and used the applications built in publisher at 45 kbps and that seemed to eliminate the freeze/dropping issue. But of course the video quality was very poor and some clients still reported that the audio was out of sync with the video. The server hosting the FMS application is a quad processor dell with lots of memory and network connectivity. The Flash Media Admin Console performance graph showed the total Bandwidth as 3 Mbps at maximum.
View 8 Replies
May 10, 2009
creating a button within a movie clip that will pause both the images (bmps) on the screen and the sound, which is being loaded by AS3.Here's the code for my sound.
Code:
//This assigns an abreviated name to the StorySongBook class which is inside the StorySongBook.mp3 properties.
var sbs:StorybookSong = new StorybookSong();[code].....
How do I assign this to a button on the stage though (event listener?) and get the button to stop both audio and visual?
View 2 Replies
Feb 24, 2011
I am new in action script 3.0. i am trying to build an audio player which will stream audio(mp3 etc.) from wowza media server. the player needs to have a play button, stop/pause button, a play progressbar and a volume scroll bar. i am using NetStream object to paly the audio
View 1 Replies
Jan 13, 2011
I have a button that when the user rolls over it, it plays a 3 second piece of audiothat works fine.When the user rolls off though, the audio still plays, that, if the user rolls over the button several times you get multiple instances of the auduo until they all play out.
View 2 Replies
Sep 13, 2011
I am streaming to live videos with audio to our webpage, each with it's own accompanying audio. On my laptop, I could stream them without any trouble but it would overheat so I had two new computers built just for encoding. Now, on the new computers, the 2 videos stream fine but only on audio file works at a time. The other just gets hung up on one note of sound and repeats very annoyingly over and over.
View 2 Replies
Jan 28, 2012
I think it is loading the whole audio first into the swf, but I would like to get confirmation from someone more knowledgible.[code]I want it to stream the audio when the button is clicked only so that 100 of these swf will not slow down a whole webpage from loading.[code]I only start getting concerned when I noticed that on FF and Chrome, the page loads really quick but when I open the page in IE, it takes a very long time for the page to appear.
View 3 Replies
May 20, 2010
I am putting together a basic video portfolio and have everything working except when I click the back button to get back to the thumbnail page (contained on frame 1) the audio from the video continues to play, I'm not an expert on as3.
I have tried a lot of code in the function below ( like "stopAll();" ) but nothing seems to work.
View 1 Replies
Jun 15, 2009
I am trying to add a music track to some of the pages of my flash website, I imported the mp3 file to the library and dragged it on the stage and it plays when I test it. I want to add play/stop music button on the page, I dragged buttons from the video components to use, but I have no idea where to start with the code??
View 1 Replies
Mar 2, 2010
I am trying to connect audio to the button so when I click on the button music it starts playing and when clicked again music stops.
View 5 Replies
Apr 25, 2011
I have a single audio file, I'd like to avoid cutting it up.
I know I can use the sound class, mySound.play(150), to start at 150ms but haven't come across a way to stop the audio say after 500ms or at 650ms.
View 2 Replies
Feb 27, 2012
I have created two buttons for separate audio files. Essentially if you click on the button it will play and stop. This works great! I have also injected a SoundMixer.stopAll(); to ensure if you click between both buttons that it will stop the current audio file to play the next one. My problem is when I select the 2nd button for the first time everything seems to be working...it's when I attempt to click on the first button again, that it will require 2 clicks and then it stops and plays accordingly...anyone know how I could eliminate this annoying two click process?
[Code]...
View 1 Replies
Sep 30, 2008
I've been working on an audio streaming application for the last couple days. My current progress can be viewed at figmentmedia.ca /test.html.I've got a problem with this release. Look at the tan coloured line, near the base of the window, to the right of the control
buttons (of which only play and pause work). That line is supposed to be a loading bar. As you will probably notice it does not work. The code I've attached is located in the first frame of my movie. The second last line there, "mc_loaded.width =297/(soundClip.bytes Loaded/ soundClip.bytesTotal);", is the one giving me the trouble. After troubleshooting many different options.. none of which worked, I believe.. what is loading may be the variable. Regardless of what progress the bar is showing, it's not showing the progress of the sound clip.
View 10 Replies
Apr 15, 2010
I'm stucked in middle of my application, where I need to implement sound spectrum on streaming audio. Does any one knows how can we add sound spectrum on streaming audio.
View 4 Replies
Oct 23, 2010
i am New to flex.Can any one point me to a small piece of mxml code which plays audio files(mp3,wav.....) also which has the capabilities to pause, play, stop.... the audio file. Also this file would be embedded in a html file later on..
View 1 Replies
Oct 28, 2010
I am interested in streaming audio on my website, but I have no clue where to begin. There are two types of streaming I hope to achieve. The first would be streaming a playlist of songs stored on the server and the second would be live audio streaming. Can anybody recomend any good sites or plugins to use?
View 2 Replies
Feb 10, 2011
I'm trying to create an application in flash that will record the sound from the user and will save the data on the server.
View 1 Replies
Feb 3, 2009
I would like to know how to implement audio streaming.
View 3 Replies
Apr 9, 2011
I am streaming live content via flv but the video is lagging audio by some time. I am using netstream and video but cannot find a way to set the FPS for the video, I think i could fix it if I knew how to adjust the FPS
View 1 Replies
Feb 22, 2003
I wanna be able to load a .mp3 file outsideside of the library (to conserve file size) which i figured out but i am having trouble with makin a progress bar for the progress of the loading mp3....
View 1 Replies
Aug 18, 2006
I am trying to use some streaming video and audio inside my flash movie, but can't quite figure it out..I have the video saved as an FLV file, and this file was uploaded into my streaming folder on my server. I tried to use a sample player I found, and everything should add up, but nothing is coming through. How exactly am I supposed to do this, and does anyone have a sample video controller/viewer I could borrow to test this out?
View 2 Replies
May 27, 2003
I am researching the inclusion of Flash in a PHP/MySQL application I am building to stream audio.I have done a lot of searching, but have yet to find which audio formats that Flash can stream.I know that MP3's can be streamed.
View 1 Replies
May 8, 2008
The problem is that the progress bar is not working correctly while the music is streaming (not completely downloaded to cache).I can understand why it is so.... (sound.duration is changing untill download is complete)I have a simple progress bar... no masking etc:- .. just using the good old "_xscale"
View 3 Replies
May 13, 2009
Im making a website in flash 8 pro and would like to know how i can load the music for a particular section using streaming audio. I mean i dont want the soundtracks to occupy to much space so i want to make the website load in and then if someone clicked and navigated into contacts then i want the contacts soudntrack to load only then or preferably stream from a folder.
View 4 Replies
May 22, 2009
I have several flash based lessons that I have created that are being distributed online to several companies. Each lesson has a video that is played within the lesson through the flvplayback control. The videos were supplied by a third party and some of the videos are encoded at 384K and some are at 568K.
One company that is attempting to view the lessons is seeing the following behavior. The video plays for approximately 20 seconds then suddenly the video drops out and the audio continues to play. With the audio still playing the video scrubber rolls back and attempts to start the video again but all that comes through is the audio track again. Now there are 2 instances of the audio playing with no video. This happens a third time and finally keeps going until all the audio is played out.
The IT staff at the company has showed me a fiddler log that shows the flash player making a connection out to Akamai to retrieve the video and then rolling from port 80 to port 1935 and finally to port 443. This would explain the three audio tracks playing
I have read that the flash player will attempt to gather the stream from the stated rtmp location and then if it encounters an issue with a proxy or firewall it will attempt the other ports.So I am not sure if there is anything I can do by design or programatically to alleviate this issue. It appears to me that the company attempting to view this video has some kind of bandwidth throttling program in place that is kicking off this behavior in the flash player.
Is it possible to prevent the flash player from making the three attempts? Would a sudden cut of bandwidth prompt the player to attempt to roll to another port if a network load balancing program suddenly kicked in? If it is bandwidth is that why the audio stream continues to play because there is enough bandwidth for the audio track to get through, but not the video?
I have attached a screen shot of the sniffer output so you can see the rolling ports thing.
Attachments:
networkSniffer.gif
(33.7 K)
View 6 Replies
Aug 7, 2009
I have a flash program that loads an external flv dynamically. I first create an empty movie clip then I attach an instance of the FLVPlayback component using Moviclip.attachMovie();. Then i control the FLVPlayback component with AS2. I have a play and pause button, a scrubber, and a loading progress bar. None of these are components. When I publish and preview the file in Flash CS4, Adobe Flash Player 10, and all my internet browsers everything works fine, all the buttons, the multiple functions of the scrubber, and even the loading progress bar.
However when I uploaded all the files from my computer to my company's server and tested it from there, I recieved audio but no video. All of the various controls still worked for the audio but I couldn't see anything on the stage. If I waited for the loading progress bar to complete and then reloaded the external flv then I got video, but the purpose of this program is to stream the video and I cannot have the users waiting for a preloader.
If you want to look at my FLVPlayback code here it is:
_root.createEmptyMovieClip("lesson_mc",-16381);
lesson_mc.attachMovie("FLVPlayback","lesson_video",0);
lesson_mc.lesson_video.contentPath = page.attributes.url;
lesson_mc.lesson_video.autoSize = true;
[code]....
View 4 Replies
Jan 28, 2010
Our company has a Flex application (3.0.2) that is having a problem with audio dropping out in Windows 7. The problem appears worse with a wireless connection, but it can't be consistently reproduced there, either. The only thing known for sure is that the problem has not been seen on any other version of Windows.
The application thinks the audio is playing, because it is calling the appropriate event listeners triggered when the audio completes and when any audio cue points are hit. The majority of our audio is streaming via Flash Media Server (3,0,2,201), but the problem was also seen using embedded sound effects. In one instance, several clicks of a button triggered an error saying the sound effect could not be loaded, and then about a minute later, all the sound effects played at once and the user could then continue with the application.
View 7 Replies
Nov 14, 2010
I am trying to create a simple desktop app to play a live radio stream from a shoutcast server. I cannot get it to play. I am now wondering if it is even possible using the Flex/Air platform. Here is my code:
package
{
import flash.display.Sprite;
import flash.display.StageAlign;
[Code]....
View 5 Replies
Jul 24, 2011
What parameters are required to set an Audio file to Streaming? I have imported both an mp3 file and a WAV file into the library. clicking on a keyframe, I drag either th emp3 or WAV file onto the stage. The audio file can be seen on the timeline. If I set the sync to Event, both of the audio file will play no problem.
If I set eithe of the audio files to Stream, nothing happens, no audio at all. Can I only use streaming audio files another way? I cannot find an option to link ot an external audio file as you can do with video so how do i successfully get an audio file to stream?
View 1 Replies
Jan 3, 2012
We have setup a brand new FMS 4.5 for http streaming to ios devices. We are feeding the source via rtmp to livepkgr application. Upon digesting the iOS feed via the url below, there is no audio being passed. I can check the stream using the rtmp protocol and there is audio. [URL]..
View 5 Replies