Streaming Mp3 Audio
Hi, I've set up a streaming mp3 audio player. It works great, except that it plays correctly until it is done buffering, then starts from the beginning and plays all the way through again. Is there any way to make it so this doesn't happen, so that it plays all the way through just once?Thank you!Dan Code: var musicPlays:Boolean = false;var loopTune:Sound = new Sound();loopTune.onLoad = function(success:Boolean) {if (success) {loopTune.start(0, 999);musicPlays = true;_root.musicPlayer.gotoAndStop("playing");}};songurl = _level0.song;loopTune.loadSound(songurl, true);musicPlayer.playPlay.onPress = function():Void {if (musicPlays == false) {this._parent.gotoAndStop("playing");loopTune.start(0, 999);musicPlays = true;}};musicPlayer.stopStop.onPress = function():Void {if (musicPlays) {this._parent.gotoAndStop("stopped");loopTune.stop();musicPlays = false;}};
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 08-27-2006, 10:09 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Flash Audio Player For Streaming Audio
I am working on our church's website and am trying to add mp3 sermons for our visitors to listen to. I have a player that I downloaded but is has some problems, for some reason it will play 2 files at the same time, sometimes it says file not found and I am not sure why. I do not have the FLA file just the SWF that was on the website for download so I can't make any changes. Can anyone tell me how to make a flash audio player with play, stop, pause, rewind and fast forward buttons. Or if anyone has a sample player that I could use for my church, I need it as small as possible and do not need a playlist. Any help would be great.
F8 - Streaming Audio From Streaming Server Help
Any one have any ideas why my streaming audio wont play? I trying to stream audio .mp3's from a streaming server. This way it is not a progressive download and cache.
But I can not seem to get the audio to play through my audio player. any thoughts? Or maybe someone can point me in the right direction?
thanks!
Streaming Audio
Please help me before I pull what little hair I have left out. Can somebody give me a simple step-by-step guide to installing streaming audio into a flash file. So far, I have only been able to set it up so that it has to completely download before it plays. That takes way too long.
I Have also read about re-compressing mp3 files to make them smaller, how can I do that. I am using Swish V2 to make the swf files and I use Sonic Foundry to make the mp3 files.
I know it can be done, even with a 20 minute speach, so how do I do it?????
Streaming Audio And Jpg
Trying to figure out if this can be done with Flash MX.
http://virtualmeeting.asco.org/vm200...me=general_top (click on Vogelzang near the bottom)
A little concerned about being able to stream both the video and audio, and then control those with next, back, play, and pause buttons also. Does anyone know if it is possible? any suggestions?
Thanks!
Audio Streaming
I'm a new flash mx user. Looking for tutorial or general info concerning adding streaming audio to a web site. Any info will be appreciated. MOON
Streaming Audio
I'm new at using Flash MX, and having trouble figuring out how to stream audio.Any help will be appreciated.
STREAMING AUDIO
Why when you STREAM an audio file does it sound worse than when you use the START or EVENT sync method? Right now I have a narration of a movie using the START method because I need the best possible audio, and if I used the STREAM method it gives the sound an echo.
Please any help would be appreciated.
Cheers
Streaming Audio
Is it possible to put an internet radio stream into a Flash movie? Like playing in the background of a page or something to that extenet.
Streaming Audio..
I am constructing a page for a Club night and have a 'top 5' chart which i want to add streaming audio to.
What is the best way of doing this?
importing a wav(stereo) and using the ADPCM compression?
or pre editing the wav into mono>convert it to mp3 then use the default setting?
i just dont know Help meeeeeeee
Streaming Audio
Greetings
can anyone give us a hand: I have no Idea how to stream audio.
so, If you can, tell me how (to stream audio).
Streaming Audio
Duh I know I should have figured this one out by now but...
Why does audio in Flash sound so much worse when it's streamed?
I have a voice over that has to be synced with my animation, so I have to set it to stream but the swf it sounds like crap.
I have it set to export ad mp3 with the hightest quality setting.
Audio Pop When Streaming
I have several audio track thgat need to be synced. Everything looks great except the last audio track pops when set to stream. It doesn't do this when it is set to event. All the other tracks sound fine. I've tried every setting. Anyone know what this is?
Thanx
Streaming Audio..
lets say I want to add a sound controller to play my mp3 song while it is streaming..how do I go about doing that ..like to press a play button play a streaming audio and to press a stop, stoping the streaming audio??
Streaming Audio
hey guys,
I was wondering if anyone could give me some help on streaming audio. I have a couple of button that when pressed i want an audio file to be played in say "windows media player, etc".not download the file but play streaming. How would i go about doing this.
thanks all
peter hubner
www.southwestern.edu/~hubnerp
Streaming Audio
www.driftlab.com
How did driftlab did his music player? The music is big and it start playing before loading all the music...
Streaming Audio
Hey Guys,
I need help with my Audio.
Im making a big movie for Newgrounds.com, but the audio seems to always go a little short when its uploaded but, I wanted to stream it, cause that seems to work. But, I dont know how to stream it over more then one scene.
Can anyone help? Or if not able to help me stream give me any ideas on how to keep the sync with the movie.
Streaming Audio
do you need a special server for streaming audio? does it work with geocities? cause im not sure what im doing wrong, so if you could give me a few tips or something about how to stream audio it would be good
Streaming Audio
I have built and mp3 player in Flash MX and have the following problem:
I'm using the loadSound method ie. tune.loadSound(tuneurl, true);
The tune loads and streams fine, but if the user wishes to stop it load a different tune, I can't find a way to stop the original one loading, causing the new tune to not stream properly due to band width limitations.
Hope somebody can help!...
DJM
Streaming Audio
I have built and mp3 player in Flash MX and have the following problem:
I'm using the loadSound method ie. tune.loadSound(tuneurl, true);
The mp3 loads and streams fine, but if the user wishes to stop it load a different tune, I can't find a way to stop the original one loading, causing the new tune to not stream properly due to band width limitations.
Hope somebody can help!...
DJM
Streaming Audio?
I know MX can stream video, I was wondering if it can do the same for audio mp3 or wma files.
I'm not at my workstation atm but in a hotel.. lol got my laptop but it can't handle the design software, so all I do is surf the web and play Yahoo! pool!
I'm just thinking about fooling around with a new website idea.
Thx in advance
Streaming Audio
Hi there, I'm currently streaming mp3's from another server with this code:
Code:
on (release){
streamer._visible = true;
stopAllSounds();
var gameSound = new Sound();
gameSound.onLoad = function (loadedOK) {
if(loadedOK) {
gameSound.start();
}
}
gameSound.loadSound("http://myserver/mymusic.mp3", false);
}
I set a mc named "streamer" to true to indicate an mp3 is streaming, but when a visitor got a phoneline modem connection (yes they excists :P) or smallband connection it takes a while before a 3mb mp3 is loaded, so what I'm lokking for is a loadbar thingy to indicate it's beeing loaded with % > when finished loading the streamer mc has to be vissible and when the mp3 is done the streamer mc has to be false...
How can I do this?
Streaming Audio
so i really like the "cleoplayer" found here on this site for a music player but there is one problem: By importing my *mp3s into the flash file it makes it REALLY huge and it will take forever to load. I want to just be able to stream the .mp3 file that is on my server through the player rather than embedding it within the player so it loads much faster. how can i do this? thanks
-sly
Streaming Audio?
I am trying to stream audio from an external swf which works fine but I would like to add a pause button. I do not know how to pause an external swf loaded through levels.
Here is the code I'm working with (please see http://www.flashkit.com/tutorials/Au...-881/index.php):
For the play button I have:
on (release) {
unloadMovieNum(66);
loadMovieNum("song1.swf", 66);
}
For the stop button I have:
on (release) {
unloadMovieNum(66);
}
Is there any way to pause the external .swf, I am fairly new to flash and I am completely stumped. Any help would be greatly appreciated. Thanks.
Streaming Audio Help?
Hi using mx here. is there a way to change streaming audio settings in flash. Im talking about the settings in the property window when you select streaming it automatically goes to 44khz and 16 kbps. I want to change the 16 kbps to something higher. thanks
Streaming Audio
Evenin' all, I need to stream one track of audio on a web page. Doesn't need to be anything fancy as I'm going to hide it. Just need it to stream!
Hope someone can help, many thanks!
Streaming Audio Help
hi,
ive been trying to get a minutes worth of music to stream from my server on the press of a button in my flash website. i cant get this to work, can anyone explain in the simplist terms how i do this as im not very good with action script.
also can i have the audio stop on the second press of the button?
THANKS!!!!?
AS3/CS3 Audio Streaming App Help
So, I've got most of it working, check it out at http://figmentmedia.ca/test.html. But I realized when I uploaded it that the loading bar (tan line across the bottom) didn't load with file. I may just have blazingly fast internet, and didn't notice the load.. but I doubt it. This to me seems strange, but might be simple to some of you. Here is my code:
Quote:
import flash.media.Sound;
import flash.media.SoundLoaderContext;
import flash.net.URLRequest;
var soundClip:Sound = new Sound(); //declaring variable 'clip'
var soundReq:URLRequest = new URLRequest("test1.mp3");//declaring var 'req' value is 'test1.mp3'
var soundContext:SoundLoaderContext = new SoundLoaderContext(8000, true);//declaring variable 'ctx' value is 8 seconds
var soundControl:SoundChannel = new SoundChannel();//controls the sound (stop/go)
var soundPosition:int = new int (soundControl.position);
var soundLength:int = new int (soundClip.length);
soundClip.load(soundReq, soundContext);//load 'req' with the value of 'ctx' (play at 8 seconds)
soundClip.addEventListener(Event.COMPLETE, onComplete);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
function onComplete(event:Event):void{
mc_control.btn_play.addEventListener(MouseEvent.CL ICK, playSound);
mc_control.btn_stop.addEventListener(MouseEvent.CL ICK, stopSound);
}
function playSound(event:MouseEvent):void{
soundControl.stop();
soundControl = soundClip.play(soundPosition);
mc_control.swapChildren(mc_control.btn_play, mc_control.btn_stop);
}
function stopSound(event:MouseEvent):void{
soundPosition = soundControl.position;
soundControl.stop();
mc_control.swapChildren(mc_control.btn_play, mc_control.btn_stop);
}
function onEnterFrame(ev:Event):void{
trace(soundControl.position/soundClip.length*100)
mc_position.x = 101+(soundControl.position/soundClip.length*294);//% of song played along a bar 294px long
mc_loaded.width = 297/(soundClip.bytesLoaded/soundClip.bytesTotal);//% of song loaded along a bar 297px long
}
The second last line there, thats the one giving me trouble.
Any Suggestions would be much appreciated
[CS3] Need Audio To Come After Streaming .flv
This should be an easy one...hopefully.
I have a series of movie clips and this question would apply to all of them.
After the movie clip is done playing, I need an audio clip to play. I am confused because the movie clip is streaming from a .flv that will be located on a disk - so when the clip is done, I don't believe the timeline where the mc is located will know to go on and play the following audio. Can someone please help? This is basically the last hurdle I have for a major project I am finishing and I don't know how to fix it. Thanks.
TDP
Streaming Audio
Hey,
Im wondering if its possible to have mp3's or midi files on on a webserver and for flash to access them, then start streaming them... stupid question i guess because im 90% sure you can do it i just cant figure out how.
Could someone point me in the right direction or possibly give me a tutorial upon how i can do this
Streaming Audio...
Hi my friend is a music producer and I am making a flash site for him. The problem I am running into is how would I go about Streaming his music so people could preview it before they buy? I went to one site www.kingsmenproductions.com and thats the style he wants but I do not want to embed all of the music files. It would take the site forever to load up. So I was thinking streaming with XML but I am not sure exactly how to do that? Any suggestions???
thanks,
josh-
Audio Streaming
Greetings all,
How can I share audio samples (say read from the soundcard's microphone by flashplayer) with other applications?
Alternatively can I call functions from DLL or .o libraries using actionscript?
Streaming Audio
I am currently streaming an mp3 from my server to the flash page. Multiple sound files need to be sent after the creation of the flash window in the browser.
Is it possible to stream raw 16 bit 8khz mono PCM files?
I know this seem strange but my program creates them this way and it would save having to convert them. They are only small files so compression is not a massive issue.
Anyone know?
Streaming Audio?
Another Question, sorry for any inconvienience but I am wondering if there is anyway you can stream live audio through flash.
for example: is there a way to set up a central swf for a radio station and have them stream their music through computers?
sorry if it is confusing i cant really explain it.
just is there a way to use flash to listen to a radio station channel through your computer. i guess that is the easiest way to explain it.
thank you.
Streaming Audio?
Looking for a way to stream mp3 files with Flash, just a small button, maybe just like a circular play button.
Maybe even a player that can be resized, or can expand with more mp3 files being added.
any ideas?
PHP Audio Streaming...
HI!
how can i develop a page such like http://www.soundrangers.com/category-re ... at_id=0055
when i mouse over(onClick) on play file it auomatically play that audio file.......
if there is any tutorail or script, please let me know that.........
thanks in advance...
Streaming Audio
I'm placing streaming audio to play in the background of a webpage. I don't want the audio to be choppy so I was wondering if there are any recommened bit rate and sample rate audio settings for web audio. I haven't been able to find any online....
Streaming Audio
ok i have uploaded some songs now what i wanna do is stream them threw flash 5 how would i do that?
Audio Streaming
I recently create an audio player. The audio player works great, but when it loads I have to wait until it downloads the whole audio player and audio clip before it plays. How do i make it load the audio player and while it downloads enough of the audio clip, play the audio instead waiting to download the whole thing. The way the audio player works is that the audio is import into the audio player from the library. How do i go about of streaming it?
csound = new Sound(_parent.audioclip);
csound.attachSound("sc_ac");
csound.start();
How do i stream the audio player from here?
Streaming Audio
Can you have more than one audio stream playing? Like can I have background music on one track, and a voice over on another track?
Streaming Audio?
how do you guys do it?
I've yet to find an effective way to stream full tracks. An example of a site or two i've tried with here: www.frontierroom.com www.queencitygrill.com . It takes at least 20-30 seconds on your average broadband connection to start playing... Now if you go to somewhere such as http://www.failsafedesign.com/details/offline/360/ for example it starts up right away and is in fact a full legnth track. Does anyone have anything to offer on this subject?
Streaming Audio Or What
I have to develop a horse racing game which people can bet on and then view on a certain day/time. The part I am not sure of is the fact that it is for a Radio Station and they want to feed the race commentray life from the commentator to the game. So you watch the Flash game/horse race and hear the commentry from the commentator as it happens. Umm?
Streaming Audio
I have a media player here: http://clickpoprecords.com/mediaPlayer/mediaLink.html
When you click on a song, an mp3 begins streaming. when you click on another song, the first song stops playing [using the stopSound] and then the second mp3 begins streaming. however, the first mp3 does not stop streaming in the background [i think]. if i continue to click on more songs, they will all continue streaming and the music eventually just stops playing.
is there a way to cancel the streaming, or refresh the streaming, of audio?
this media player works fine when i test it on my machine, but fails on the server - as you can see.
any suggestions would be greatly appreciated.
Streaming Audio
i recently posted a message about an issue i'm having with this media player:
http://clickpoprecords.com/mediaPlayer/mediaLink.html
when a user chooses to play a song it begins buffering the streaming audio. when a user clicks on another song, the first song stops playing the second song begins buffering.... and so on. the problem is that the buffering of each song doesn't stop when the stopSound command is used. it only stops the sound.
well, obviously this causes a major issue with the buffering. if more than a few songs are selected then the user's machine is essentially frozen in "buffering land." trying to download many large mp3 files at one time, the songs playing through the media player essentially just freeze.
presently, i have the media player set up like this: i have action script on the time line for each song that i want to have playing. i have a behavior attached to the various song buttons that stopSound when the button is pushed [to stop whatever current audio is playing] - while the play head is simultaneously moved to the next song location on the timeline, initiating the action script at that location.
i've searched the forums for people having similar problems and have found several. the interesting thing here is that nobody has replied to their problems either. i'm wondering if there is no response because there is no resolution, or because this issue is too complex to cover here in the forum. i'd like to get a response from somebody who might know either way, so that i can proceed with the resolution.
many thanks.
Streaming Mp3 Audio
i have recoded essentially the same application in AS2.0 and 3.0, both giving the same results. i am trying to stream mp3 audio in flash, and when i test the resulting flash locally it streams fine. however, in a browser nothing happens. in firefox, the status bar will show 'Transferring data from <domain>...', and Internet Explorer and Google Chrome do nothing as well.
if anyone can help me with this please post :( and i can post code if needed.
Streaming Audio In AS3/CS3
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.bytesLoaded/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. Any help would be greatly appreciated.
Thanks in advance, Calvin Tennant.
Attach Code
import flash.media.Sound;
import flash.media.SoundLoaderContext;
import flash.net.URLRequest;
var soundClip:Sound = new Sound(); //declaring variable 'clip'
var soundReq:URLRequest = new URLRequest("test1.mp3");//declaring var 'req' value is 'test1.mp3'
var soundContext:SoundLoaderContext = new SoundLoaderContext(8000, true);//declaring variable 'ctx' value is 8 seconds
var soundControl:SoundChannel = new SoundChannel();//controls the sound (stop/go)
var soundPosition:int = new int (soundControl.position);
var soundLength:int = new int (soundClip.length);
soundClip.load(soundReq, soundContext);//load 'req' with the value of 'ctx' (play at 8 seconds)
soundClip.addEventListener(Event.COMPLETE, onComplete);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
function onComplete(event:Event):void{
mc_control.btn_play.addEventListener(MouseEvent.CLICK, playSound);
mc_control.btn_stop.addEventListener(MouseEvent.CLICK, stopSound);
}
function playSound(event:MouseEvent):void{
soundControl.stop();
soundControl = soundClip.play(soundPosition);
mc_control.swapChildren(mc_control.btn_play, mc_control.btn_stop);
}
function stopSound(event:MouseEvent):void{
soundPosition = soundControl.position;
soundControl.stop();
mc_control.swapChildren(mc_control.btn_play, mc_control.btn_stop);
}
function onEnterFrame(ev:Event):void{
trace(soundControl.position/soundClip.length*100)
mc_position.x = 101+(soundControl.position/soundClip.length*294);//% of song played along a bar 294px long
mc_loaded.width = 297/(soundClip.bytesLoaded/soundClip.bytesTotal);//% of song loaded along a bar 297px long
}
Streaming Audio
I did a search but i didn't find what i was looking for. i was curious how to make a streaming mp3 player where i can swich the song. if someone can make a fla, file to where i can just edit it that would help alot. i am kind of a flash noob, so please be descriptive. thanks
Streaming Audio
i need help with streaming audio.
do i have to import my mp3 into an swf file to control buffering?
i´m trying load them dynamically and use _soundbuftime, but nothing happens.
Thanks
Pal.
|