Stop Loading Streaming Mp3
is there any way to stop loading a streaming mp3? i am trying to create my own media player and am running into some problems. thanks.
FlashKit > Flash Help > Flash Newbies
Posted on: 02-01-2006, 09:05 PM
View Complete Forum Thread with Replies
Sponsored Links:
Stop External FLV From Loading / Streaming
I am using the video component player and it is working fine using this code:
Code:
video.setMedia("elements/flv/episode_1.flv", "FLV");
The problem is, if someone is playing the video and goes to another part of the flash movie, the video keeps playing or loading in the background. The video image doesn't show, but i can hear the audio or see in the browser that it is still loading.
How can i kill the video from loading once the playhead moves from the frame that the video player is on (it is sitting on a single frame)? Thanks in advance!
View Replies !
View Related
Stop Loading Streaming Sound.
I'm building an streaming mp3 player for a friend. He wants it to have 3 sample songs that you can choose to play.
I have got the flash working with all the streaming and playing whenever you click on the buttons. However I am hoping to make the movie start loading all three to start with. Then, when you click one to play it it will stop loading the others to allow all the bandwidth to focus on the track being played. Then when this is finished loading, or they choose a different track, the loading will start again on the other songs (or the song that they clicked).
Is this even possible? And if so how do you do it? I have looked around and can't find anything to help ...
Any help would be much appreciated.
View Replies !
View Related
How Do I Stop Streaming Audio From Loading In Flash?
Hi,
I did a Flash slide show that plays streaming audio on each slide. I use the sound.stop() action to stop the sound from the previous slide. This works ok. However, I've discovered that if I click "Next" to quickly, eventhough there are no overlapping sounds, Flash still streams multiple files(from the previous slides) in the background. Is there a way to tell Flash to cancel the current streamed sound? It seems like the sound.stop() action just mutes the streaming audio and it doesn't stop the loading process. Thanks for your help.
View Replies !
View Related
Making A Stop Button, Or Telling A Button To Stop A Streaming Video
Hello,
I've searched the forums and tried to find an answer to this question, but most of the posts go unanswered or are way beyond my understanding.
I'm using a form based application in Flash professional 8.
I have a .flv video of a movie trailer that I created from Quicktime. I intend to stream this video.
I also have a button called "Trailer". When I click on the "Trailer" button, I see the .flv video I created along with the play/pause control skin that I added in the import video wizard. I press the play/pause button, and the movie plays.
This is as I had expected it to be.
Now, when I want to go to something different, for example clicking a "Photos" button that displays a slideshow, the video continues to play.
Is there a way I can tell the "Photos" button to stop the streaming video?
I've searched the forums, and found a few answers, but I don't really understand them. I added them to the script of the "Photos" button anyways to see if they did anything, and every time the video still kept playing.
Here's what I've tried so far:
------------------------------------------
button.onPress = function (){
player_mc.clearVideo();
}
Where player_mc is the instance name.
-------------------------------------------
Adding a stop component, but this isn't really what I want. I'd like the "Photos" button to stop the movie without the user having to hit a separate stop button.
-------------------------------------------
.stop() and ._visible=false;
I don't really understand this.
-------------------------------------------
removeMovieClip("component_mc");
-------------------------------------------
instance.stop()
From what I understand this is only for adding to a keyframe to stop a movie that's looping, and not for what I would like to do. Is that correct?
-------------------------------------------
I would greatly appreciate any help, not only just for me, but for any other newbie who may run into this problem.
Thanks!
View Replies !
View Related
Stop Streaming Mp3?
hallo there.
I need some help, I am using a mp3 flash players within my flash website.
the player uses actionscript and xml for the playlist. I got it from http://www.jeroenwijering.com.
My site sections are contained within a content movieclip - linking to frames for about, contact, music etc..
I placed the mp3 player within the music keyframe of the content movieclip.
the player works ok, plays the mp3's ok......they are streaming however.
I would like to beable to stop the streaming as you click on the about, contact buttons....as currently the players goes away, but the music plays in the background.
this is the code I got for the mp3 player:
//--------------------------------------------------------------------------
// location of the playlist if no html parameter is found
// change "playlist.xml" if you want another filename ..
//--------------------------------------------------------------------------
_root.playlist == undefined ? playlist = "mp3player.xml" : playlist=_root.playlist;
//--------------------------------------------------------------------------
// below here it's all code and code ..
//--------------------------------------------------------------------------
// stage variables
Stage.showMenu = false;
Stage.scaleMode = "noScale";
stop();
// player variables
volume = 90;
current_song = 1;
top.equalizer._visible=0;
// playlist loading
data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = loadData;
data_xml.load(playlist);
// parsing all xml data into flash
function loadData(success) {
if (success) {
// showdisplay and playlist toggles
showDisplay = this.firstChild.attributes.showDisplay;
if (showDisplay == "yes") {
top.easeY(toppos);
topup = false;
display_btn._rotation+=180; }
showPlaylist = this.firstChild.attributes.showPlaylist;
if (showPlaylist == "yes") {
bot.easeY(botpos);
botup = false;
list_btn._rotation+=180; }
// getting all titles and filenames
aPath = new Array();
songTitel = new Array();
audioTracks = new Array();
audioTracks.shuffle();
audioTracks = this.firstChild.childNodes;
song_total = audioTracks.length;
for (var i = 0; i<song_total; i++) {
aPath.push(audioTracks[i].attributes.path);
songTitel.push(audioTracks[i].attributes.title);
// buiding playlist buttons
bot.playlist.btn.duplicateMovieClip("btn"+i, i);
bot.playlist["btn"+i]._y = bot.playlist.btn._y+i*int(bot.playlist.btn._height) +i;
bot.playlist["btn"+i].txt = checkDigits(i+1)+". "+songTitel[i];
bot.playlist["btn"+i].hit.onPress = function() {
listClick(this._parent.getDepth()+1); };
}
//checking autostart mode
autoStart = this.firstChild.attributes.autoStart;
if (autoStart == "yes") {
playSong();
play_btn._visible = 0;
} else if (autoStart == "no") {
play_btn._visible = 1;
pause_btn._visible = 0;
} else if (autoStart == "random") {
current_song = random(song_total)+1;
playSong();
play_btn._visible = 0;
} else {
current_song = int(this.firstChild.attributes.autoStart);
playSong();
play_btn._visible = 0; } }
// done ! all loaded succesfully. purging trash
delete audioTracks;
delete data_xml;}
// list button
function listClick(prm) {
delete pausepos;
current_song = prm;
MySound.stop();
playSong(); }
// list scroller
bot.list_bg.onEnterFrame = function() {
if (hitTest( _root._xmouse, _root._ymouse, true) && this._parent.playlist._height > this._height ) {
ymin = this._y+this._height - this._parent.playlist._height;
ymax = this._y+3;
conv = (this._ymouse -15)*1.3/this._height;
conv > 1 ? conv = 1 : null;
conv < 0 ? conv = 0 : null;
this._parent.playlist.easeY (ymax - conv*(ymax-ymin)); } };
bot.playlist.setMask(bot.list_bg);
// play function
function playSong() {
AudioPath = aPath[current_song-1];
// checking for pause > start from there
if (pausePos>0) {
top.equalizer._visible = 1;
MySound.start(pausePos, 0);
pausePos = 0;
// startup new sound
} else {
MySound = new Sound();
MySound.setVolume(volume);
MySound.loadSound(AudioPath, true);
MySound.onSoundComplete = function() {
top.equalizer._visible = 0;
if (autoStart == "random") {
current_song = random(song_total)+1;
} else {
current_song == song_total ? current_song = 1 : current_song++;
}
playSong(); };
// check loading bar
top.track_load.onEnterFrame = function() {
total = this._parent._parent.MySound.getBytesTotal();
geladen = this._parent._parent.MySound.getBytesLoaded();
if (geladen != total) {
this._parent.load_display = Math.round((geladen*100/total))+"% Loaded";
this._xscale = Math.round((geladen*100/total));
} else {
this._xscale = 100;
top.equalizer._visible = 1;
delete this.onEnterFrame;
delete this._parent.load_display; } }; }
// switch paly/pause buttons
play_btn._visible = 0;
pause_btn._visible = 1; }
// play button
play_btn.onRelease = function() {
playSong(); };
// pause button
pause_btn.onRelease = function() {
this._visible = 0;
play_btn._visible = 1;
pausePos = MySound.position/1000;
MySound.stop();
top.equalizer._visible=0; };
// next button
next_btn.onRelease = function() {
delete pausepos;
current_song == song_total ? current_song = 1: current_song++;
MySound.stop();
playSong(); };
// previous button
prev_btn.onRelease = function() {
delete pausepos;
current_song == 1 ? current_song = song_total: current_song--;
MySound.stop();
playSong(); };
// display toggle button
top.setMask(top_mask);
toppos = top._y;
top._y = int(toppos + top_mask._height - 29);
topup = true;
display_btn.onPress = function() {
if(topup == true) {
top.easeY(toppos);
topup = false; }
else {
top.easeY(int(toppos + top_mask._height -27));
topup = true; }
this._rotation += 180; };
// playlist toggle button
bot.setMask(bot_mask);
botpos = bot._y;
bot._y = botpos - bot.list_bg._height -6;
botup = true;
list_btn.onPress = function() {
if(botup == true) {
bot.easeY(botpos);
botup = false; }
else {
bot.easeY(botpos - bot.list_bg._height -6);
botup = true; }
this._rotation += 180; };
// drag button functionality
drag_btn.onPress = function() {
startDrag(this._parent); };
drag_btn.onRelease = drag_btn.onReleaseOutside=function () {
stopDrag(); };
// copyright button
copy.onPress = function() {
getURL("http://www.jeroenwijering.com/?item=Flash+Mp3+Player","_blank"); }
// updating time display
this.onEnterFrame = function() {
dur = int(MySound.duration/1000);
pos = int(MySound.position/1000);
playTime = {};
playTime.minutes = int((pos)/60);
playTime.seconds = int((pos)%60);
playTime.total = checkDigits(playTime.minutes)+":"+checkDigits(playTime.seconds);
trackTime = {};
trackTime.minutes = int(dur/60);
trackTime.seconds = int(dur%60);
trackTime.total = checkDigits(trackTime.minutes)+":"+checkDigits(trackTime.seconds);
if (top.load_display == undefined) {
top.display = playTime.total+" / "+trackTime.total;
} else {
top.display = top.load_display; }
if (top.trackDrag != true) {
prozent = pos*100/dur;
top.track_play._xscale = prozent; } };
// prefixing a 0 to the time
function checkDigits(toCheck) {
return (toCheck<10) ? toCheck="0"+toCheck : toCheck; }
// track progress slider functions
top.track_back.onPress = function() {
this._parent.trackDrag = true;
this._parent.track_play.onEnterFrame = function() {
perc = (this._parent._xmouse-this._parent.track_back._x)/this._parent.track_back._width;
max = this._parent.track_load._width/this._parent.track_back._width;
perc > max ? perc = max: null;
perc < 0.01 ? perc = 0.01: null;
this._width = this._parent.track_back._width*perc;
this._parent._parent.pausePos = (perc*this._parent._parent.MySound.duration/1000); }; };
top.track_back.onRelease = top.track_back.onReleaseOutside = function () {
delete this._parent.track_play.onEnterFrame;
this._parent.trackDrag = false;
MySound.stop();
playSong(); };
// volume slider functions
vol_back.onPress = function() {
vol_front.onEnterFrame = function() {
perc = (_xmouse-vol_back._x)/vol_back._width;
perc > 0.95 ? perc = 1: null;
perc < 0.05 ? perc = 0: null;
this._width = vol_back._width*perc;
volume = Math.round(perc*100);
MySound.setVolume(volume);
top.equalizer._yscale = volume; }; };
vol_back.onRelease = vol_back.onReleaseOutside=function () {
delete vol_front.onEnterFrame; };
vol_front.setMask(vol_mask);
// drawing equalizer in actionscript
top.equalizer.setMask(top.eq_mask);
top.equalizer.onEnterFrame = function() {
i++;
this.createEmptyMovieClip("graph"+i, i);
with(this["graph"+i]) {
_x = 0;
_y = 0;
beginFill(0x666666, 50);
moveTo(0,0);
for (j=0; j< 36; j++) {
z = random(12)+8;
lineTo(j*6,-1);
lineTo(j*6,-z);
lineTo(j*6+4,-z);
lineTo(j*6+4,-1);
lineTo(j*6,-1); }
lineTo(j*6,0);
lineTo(0,0);
endFill(); }
i >= 3 ? i=0: null; };
// scrolling the display song title
function scrollTitle() {
top.title.txt.autoSize = true;
if (songTitel[current_song-1].length > 20) {
top.title.txt.text = songTitel[current_song-1]+" "+songTitel[current_song-1];
top.title._x+top.title._width/2 +4< top.title_mask._x ? top.title._x = top.title_mask._x : top.title._x--; }
else {
top.title.txt.text = songTitel[current_song-1];
top.title._x = top.title_mask._x-3; } }
top.title.setMask(top.title_mask);
setInterval(scrollTitle, 40);
// easing display and playlist movement
MovieClip.prototype.easeY = function(t) {
this.onEnterFrame = function() {
this._y = int(t-(t-this._y)/1.5);
if (this._y>t-1 && this._y<t+1) {
delete this.onEnterFrame; } }; };
what can I add to the buttons as you navigate to stop the sounds???????
I tried MySound.stop();, did not work :-(
see: www.dieskim.com/SKIM SITE-NEW-FINAL.swf
I am using flash mx and actionscript 2
pls can someone advise...
pretty please....:
View Replies !
View Related
How Can I Stop Streaming Of A Sound?
Hello,
after asking in another Forum without getting an answer, I'm now posting here:
I have a Sound var and some buttons (mc's with eventhandlers) on the stage.
I have an array including URLs of some mp3 files.
For every mp3 there is one button.
When a button is pressed, a "loadSound" starts with the URL of the pressed button. (streaming is on)
Now I tried the whole thing with the Bandwithprofiler, where You see the streaming and its process.
When I hit one button twice (or more, the number doesn't matter) the swf streams the SAME soundfile twice!
This is not very good, becaus if someone hit the button a hundred times, the performance would become very low.
So how can i get rid of this multiple streaming of sounds?
One answer I already got, was to load a soundfile that doesn't exist what should kill the streaming process, but this didn't work.
sorry for my bad English, I hope you understood it.
View Replies !
View Related
Stop Streaming Video?
Hi all,
I hope I'm posting this in the correct form. I have Googled this topic as well as searched through previous forum posts, but have not found an answer to this question anywhere.
Here's what I'm trying to do:
I'm using CF8 for a site, and I am embedding a flv live streaming video. The site will have 2 types of users, Paying users and Non-Paying users. Both sets of users can view the flv streaming video. For the non-paying users I want to be able to stop the live video dynamically after n-number of minutes, and then give them a prompt on screen "Please sign up now to continue watching the stream.". Can this be accomplished with Flash? If so, do you have any examples or can you explain how to do this in Flash?
Thanks
View Replies !
View Related
VideoJukebox Stop Streaming
Hello there all you flash gurus and experts!
I'm trying to learn how to use the VideoJukebox sample that you can download from:
http://www.adobe.com/support/documentation/en/flash/samples/
My problem is, that I'm adding the child swf (videojukebox) to my main swf as a videoplayer. When I remove the child the sound continues to play. I know this is a common problem and that I should use unload and close the netstream, but some how I can only do it within the external actionscript code. I even added a button to the Videojukebox fla, to test if I manage to close the net stream. That worked ok, but trying to control the VideoJukebox from the mother swf doesn't work. There are three files involved:
website.swf, videojukebox.swf and videojukebox.as.
This is how I attach the videojukebox.swf to my website.swf:
var container:Sprite = new Sprite();
addChild(container);
var ldr:Loader = new Loader();
var urlReq:URLRequest = new URLRequest("VideoJukebox.swf");
ldr.load(urlReq);
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
function loaded(event:Event):void
{
myMovieClip_mc.addChild(ldr.content);
}
Then to remove it I use:
button1.addEventListener (MouseEvent.CLICK,do_videoaway);
function do_videoaway(event:Event):void
{
myMovieClip_mc.removeChild(ldr.content);
}
I know I should access the NetStream of videojukebox.as somehow and turn it off before removing the child... Videojukebox.as uses:
package {
(...first imports all kinds of stuff...)
public class VideoJukebox extends Sprite {
private var meta:Object;
private var nc:NetConnection;
private var ns:NetStream;
private var playlist:XML;
private var t:Timer;
private var uldr:URLLoader;
private var vid:Video;
private var videosXML:XMLList;
}
This might be really stupid question, but how can I use the commond ns.close(); from my website.swf???
Using it just like that it gives an error:
1120: Access of undefined property ns.
View Replies !
View Related
Stop Audio Streaming
I have a stop and play button that is used for streaming an mp3. I can stop the audio with stopAllSounds(); but it keeps downloading. This causes glitches and delays each time the other play buttons are clicked on because it's still downloading.
Heres the code:
Frame 1
btn_play.onRelease = function (){
gotoAndStop(2);
}
Frame 2
stop();
var track1:Sound = new Sound();
track1.loadSound('http://www.site.com/song.mp3', true);
btn_stop.onRelease = function (){
stopAllSounds();
gotoAndStop(1);
}
The reason I chose to stream the audio is to keep my swf file size as small as possible so importing the audio into library isn't a good option.
Is there any way to stop the audio from streaming after it has been invoked?
If not, I read somewhere where you can do something similar with uh...I think loadMovie and/or unload Movie (mp3 saved as swf?). Can anyone explain this method or point me in the right direction.
Any help would be greatly appreciated.
View Replies !
View Related
Stop Sound From A Streaming FLV
I am rather new to AS3 and I am having trouble with sounds from a streaming flv continuing to play even after the playhead navigates to a different place in the timeline. I know from looking through forums and Adobe's livedocs that the answer lies with the SoundMixer class, but I just can't seem to get it to work. I am building a site that houses all of the videos for my company, so basically I want the sound from the flv to stop playing when the user navigates away from the frame that contains the flv.
Here is a sample of the particular code I am trying to use to do this:
Code:
import flash.media.SoundMixer;
var sControl:SoundMixer = new SoundMixer();
msfNavHeader_btn.addEventListener(MouseEvent.CLICK, msfHome)
function msfHome(event:MouseEvent):void {
gotoAndPlay("msfOpen");
sControl.stopAll();
}
I am not sure what I am doing wrong but I get this error from the compiler when I test the movie:
"1119: Access of possibly undefined property sControl through a reference with static type fl.video:FLVPlayback."
I don't know if there is a way to build a function that stops sounds globally or if I have to target each instance of an FLVPlayback Component.
Any help would be much appreciated.
View Replies !
View Related
Stop Streaming Audio
Hi everyone!
Thank you for the interest taken...
I put together an mp3 player for a website and it's populated with around 20 audio files dynamically loaded through XML.
Problem is if a user with a narrow bandwidth clicks on the "Next" button, say 4 or 5 times, he or she will end up with 4or 5 (or as many clicks on the "next" button were performed) MP3s streaming - with the last selected track playing and the others streaming in the background. This obviously creates a problem since streaming the currently playing track would be a struggle against all the others streaming in the background.
Is there any way to stop loading/streaming MP3s since they're not being used?
Thanks!!!
View Replies !
View Related
LoadSound Streaming -- Stop And Re-play
Hello,
I created "loadSound" script in the first frame, and 2 buttons to Stop and Play. The stop button works fine, but the play button won't.
I want to restart the place where I stopped when you hit the play button. Everytime I hit "play" button, the audio starts from the beginning.
Could anyone please help??
Thank you!
View Replies !
View Related
Stop Streaming Video Audio
Hi there,
I'm using Flash 8 and building an Interactive CD
I have a 2 movies clips inside a root movie (Main). In one of them (movieA_mc) I have a button. On the other (movieB_mc) a streaming video (Intro.flv). the button makes the movie with the video jump from one frame (where the video is playing to another frame)
The button works correctly but the sound of the video is keeps on playing.
Anyone know how to stop it?
I'm streaming using the following code:
Code:
var my_nc = new NetConnection();
my_nc.connect(null);
var my_ns = new NetStream(my_nc);
IntroVidR.attachVideo(my_ns);
my_ns.play("Intro.flv");
my_ns.onStatus = function(info) {
if(info.code == "NetStream.Play.Stop") {
gotoandPlay("Target One");
}
}
Is there a better way (better code) to stream videos in Flash 8?
I've been looking around for a while but don't seem to get find anything that helps me.
Thanks for all the help.
View Replies !
View Related
Streaming Audio, Stop And Play Btn Help
Hello Everyone, I am looking for assistance with what appears to be a line or two of AS, I am using Flash CS3, I am attempting to stream Audio of an MP3 utilizing the Flash MediaPlayback component, I have created a stop and play button, with appropriate names, btn_play and btn_stop and the MediaPlayback component is named music_mc
the audio plays just fine; however I cannot get the buttons to function
Any assistance would be greatly appreciated.
Here is the current action script I am utilizing, I am certain this is incorrect.
But I am uncertain as to how.
btn_stop.addEventListener(MouseEvent.CLICK, stopMusic);
function stopMusic(e:Event){
SoundMixer.stopAll();
}
btn_play.addEventListener(MouseEvent.CLICK, startMusic);
function startMusic(e:Event){
music_mc.gotoAndPlay(1);
}
Thank you all in advance!
View Replies !
View Related
Sending Streaming Recorded FLV To End And Stop
I'm having a surprisingly hard time doing this. I have a recorded FLV which multiple users are simultaneously pushed into starting via a NetStream, streamed off of FMS. What I would like to do is allow the presenter to at any time push everyone, no matter where they currently are in the video, to the very end of the video, and stop the play, and have the last frame/keyframe of the video stay up on their screen. How would this be done?
Thanks.
View Replies !
View Related
Stop Streaming MP3 Loaded Via LoadSound()
Hi everybody, need help.
The case: I have a "some.swf" which must load an external MP3 file passed him through a "some.php?song_id=xxx" file. Everything woks fine. I load that MP3 file via loadSound().
The matter: loading (not playing) of the external MP3 file should stop when "x" seconds of the MP3 file are loaded.
P.S. This is for a dynamic low-bitrate preview of an MP3 file for "x" seconds.
View Replies !
View Related
Stop Streaming MP3 Loaded Via LoadSound()
Hi everybody, need help.
The case: I have a "some.swf" which must load an external MP3 file passed him through a "some.php?song_id=xxx" file. Everything woks fine. I load that MP3 file via loadSound().
The matter: loading (not playing) of the external MP3 file should stop when "x" seconds of the MP3 file are loaded.
P.S. This is for a dynamic low-bitrate preview of an MP3 file for "x" seconds.
View Replies !
View Related
Stop Streaming Video In A Certain Frame
Hi, I was wondering if you are able to stop a video at a certain frame that is imported into flash with the streaming option. I know for embedding you are able to since it is shown on the timeline but for a streaming video, it's just one frame in the timeline. So I don't know if you can stop the FLV video in a certain frame or not, if you can, how do you do it?
View Replies !
View Related
SoundObject Streaming Cant Start After Stop
hi there,
I'm coding a little mp3player with streaming songs.
It should have the possebility to scratch through the mp3.
In the case of dragging my pointer, I stop the Sound Object ( works ) and then I want to restart it at the pointers position.
But it works only with Event Sounds.
Is this true ?
The mp3 is full loaded.
greetz
aM
View Replies !
View Related
Streaming Sound Stop/play Problem
Dear all,
I am a flash "advanced beginner' and what I intend to do is this: make a simple streaming mp3 player that loads mp3 file, plays it automatically, but when user changes page (or refreshes) I want to resume playing the song from the very last position before the page has been refreshed (to mimic somehow the continuous play).
Communication works fine through cookies, no problem there. The only problem that I don't understand is when I try to play the sound from specified (read from cookie) position, i.e.: sound.start(fromPosition) - I explain:
I understand that when using streaming sound, it starts to play from the beginning automatically after sufficient portion is downloaded. I thought that I could overcome this by stopping the sound just after loadSound command and then again start it from given position, but this doesn't respond:
myTunes = new Sound();
myTunes.loadSound(somesong, true);
myTunes.stop();
myTunes.start(fromPosition);
song only stops immediately after page refreshes, but doesn't start again..
I have also the play/pause button and there it works (playing from the paused position)
I would be very happy for any suggestions, thanks much..
cheers..
T.
View Replies !
View Related
MediaPlay Back Component - Stop It Streaming
Hi,
I'm playing an mp3 file on a page using the MediaPlayBack component. I want the audio to be optional so am not automatically playing it. However, when I load the page, the audio file is automatically starts streaming. Is there any way of stopping this? I don't want it to stream everytime someone visits the site because of bandwidth issues.
Thanks for your help...
View Replies !
View Related
Stop MP3 From Cache'ing Streaming Sound Using Loadsound
hello,
I created a streaming mp3 player, the Click here for player
I have used the loadsound command with the streaming option set to true, so it streams sound etc. But the problem is that it cache's the mp3 file it is streaming onto the user's internet cache folder.
Is there a way to prevent mp3 files from being cached (have I murdered the English language today using the word cache? ) Something like what the Real Player does, it streams the files but never cache's them. <gasp>
Slan,
Abhay
View Replies !
View Related
Animation Stop When Streaming Audio Stops
Hello there !!
I have a problem, I have made a nice little animation with a start and a stop button. When I press play the animation starts and so does a streaming sound (1 minute & 30 sec) (and when I press stop it all stops aswell) but I would like to know if there is anyway to control the animation so it stops when the streaming sound has ended ? .. I would like the sound to be streaming to reduce the file size.
Thankfull for answers !!!
//Marcus
View Replies !
View Related
Stop MP3 From Cache'ing Streaming Sound Using Loadsound
hello,
I created a streaming mp3 player, the Click here for player
I have used the loadsound command with the streaming option set to true, so it streams sound etc. But the problem is that it cache's the mp3 file it is streaming onto the user's internet cache folder.
Is there a way to prevent mp3 files from being cached (have I murdered the English language today using the word cache? ) Something like what the Real Player does, it streams the files but never cache's them. <gasp>
Slan,
Abhay
View Replies !
View Related
Stop Player Streaming Automatically On Page Load
I have a streaming MP3 player that i'm going to incorporate into my site. Below is the AS for the player. At the moment the player starts automatically when the page loads up. Can someone tell me what i'd need to change so the player doesn't start streaming on page load....? Thanks
Code:
stop();
playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
if (success) {
_global.songname = [];
_global.songband = [];
_global.songfile = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
trace(songname[i]+" "+songfile[i]);
}
}
_root.createEmptyMovieClip("sound_mc", 1);
_root.sound_mc.sound_obj = new Sound();
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
MovieClip.prototype.songStarter = function(file, name) {
this.sound_obj.loadSound(file, true);
this.onEnterFrame = function() {
if (this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.display_txt.text = name;
} else {
this._parent.display_txt.text = "LOADING...";
}
};
this.sound_obj.onSoundComplete = function() {
(song_nr == songfiles.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfiles[song_nr], songname[song_nr]);
};
};
btn_play.onRelease = function() {
this._parent.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_stop.onRelease = function() {
this._parent.sound_mc.sound_obj.stop();
};
btn_fw.onRelease = function() {
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_rev.onRelease = function() {
(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
playlist.load("playlist.xml");
View Replies !
View Related
Contolling (Play,Pause,Stop) A Streaming Video
Hi,
I have a graphic with 3 buttons on (Play, Pause, Stop). Within this graphic, I have placed a 'Flash Video File' (imported this) which streams when hosted on a webpage.
I want to be able to control this video with the 3 buttons. At first, I embedded the video (not streamed) and controlled the video with movie clip actionscript on the buttons. This does not work with the streaming video.
If anyone can help, this would be much appreciated.
Kindest Regards,
Rob McCarthy
View Replies !
View Related
Stop Player Streaming Automatically On Page Load
I have a streaming MP3 player that i'm going to incorporate into my site. Below is the AS for the player. At the moment the player starts automatically when the page loads up. Can someone tell me what i'd need to change so the player doesn't start streaming on page load....? Thanks
Code:
stop();
playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
if (success) {
_global.songname = [];
_global.songband = [];
_global.songfile = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
trace(songname[i]+" "+songfile[i]);
}
}
_root.createEmptyMovieClip("sound_mc", 1);
_root.sound_mc.sound_obj = new Sound();
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
MovieClip.prototype.songStarter = function(file, name) {
this.sound_obj.loadSound(file, true);
this.onEnterFrame = function() {
if (this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.display_txt.text = name;
} else {
this._parent.display_txt.text = "LOADING...";
}
};
this.sound_obj.onSoundComplete = function() {
(song_nr == songfiles.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfiles[song_nr], songname[song_nr]);
};
};
btn_play.onRelease = function() {
this._parent.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_stop.onRelease = function() {
this._parent.sound_mc.sound_obj.stop();
};
btn_fw.onRelease = function() {
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_rev.onRelease = function() {
(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
playlist.load("playlist.xml");
View Replies !
View Related
Stop Player Streaming Automatically On Page Load
I have a streaming MP3 player that i'm going to incorporate into my site. Below is the AS for the player. At the moment the player starts automatically when the page loads up. Can someone tell me what i'd need to change so the player doesn't start streaming on page load....? Thanks
Code:
stop();
playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
if (success) {
_global.songname = [];
_global.songband = [];
_global.songfile = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
trace(songname[i]+" "+songfile[i]);
}
}
_root.createEmptyMovieClip("sound_mc", 1);
_root.sound_mc.sound_obj = new Sound();
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
MovieClip.prototype.songStarter = function(file, name) {
this.sound_obj.loadSound(file, true);
this.onEnterFrame = function() {
if (this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.display_txt.text = name;
} else {
this._parent.display_txt.text = "LOADING...";
}
};
this.sound_obj.onSoundComplete = function() {
(song_nr == songfiles.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfiles[song_nr], songname[song_nr]);
};
};
btn_play.onRelease = function() {
this._parent.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_stop.onRelease = function() {
this._parent.sound_mc.sound_obj.stop();
};
btn_fw.onRelease = function() {
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_rev.onRelease = function() {
(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
playlist.load("playlist.xml");
View Replies !
View Related
External Streaming Sound Stop Main Timeline Till Loaded Fully
Hi:
I am loading an external streaming sound 1.mp3 with the code below.. However I want the main timeline to stop until the sound is fully loaded.. Right now the maintimeline starts..
Here is the code
myMusic = new Sound(myMusicMc);
myMusic02 = new Sound();
myMusic02.loadSound("1.mp3",true);
playing02=true;
paused02=false;
stopped02=false;
loaded02=true;
if (soundIsLoaded!=1) {
stop();
} else if (soundIsLoaded=1) {
play();
}
myEvent=0
myStreaming=1
myMusic02 = new Sound(myMusicMc02);
myMusic02 = new Sound();
myMusic02.loadSound("1.mp3",true);
myMusic02Position=0;
myMusic02Volume=80;
myMusic02.setVolume(myMusic02Volume);
myMusic02.onSoundComplete=function() {
playing02=false
}
View Replies !
View Related
Start And Stop Streaming Sounds (start Stopping Currently Playing)
Hi there
I am novice user of flash and have no real AS experience.
What I want to do is..
I have 18 songs from an album and have taken 30 sec from each and down sampled them ready for flash.
I want to be able preview them all from one flash file.
I will be streaming the songs in, so the initial download time is minimal.
With 18 start stop buttons for each one, but because customers are lazy, they are likely just going to click the next play button for the next preview, so I need the play buttons to stop 'this' preview before playing the next with stop control also being a stop control for those who have had enough or are well behaved browsers : )
I hope this makes sense and look forward to hearing from someone.
Cheers
Ian Hill
View Replies !
View Related
Start And Stop Streaming Sounds (start Stopping Currently Playing)
Hi there
I am novice user of flash and have no real AS experience.
What I want to do is..
I have 18 songs from an album and have taken 30 sec from each and down sampled them ready for flash.
I want to be able preview them all from one flash file.
I will be streaming the songs in, so the initial download time is minimal.
With 18 start stop buttons for each one, but because customers are lazy, they are likely just going to click the next play button for the next preview, so I need the play buttons to stop 'this' preview before playing the next with stop control also being a stop control for those who have had enough or are well behaved browsers : )
I hope this makes sense and look forward to hearing from someone.
Cheers
Ian Hill
View Replies !
View Related
Streaming Or Loading In Wmv's
Maybe the wrong place to post this! But hey I'll give it a go!
Ok I have a little promo Flash site and one of the options is to view a 40's movie file which is 2M in size. Now I don't want the movie to be embedded in the SWF as it will be massive? Can I stream the movie in??? or Is the best thing to load the movie as an external swf. and play the movie that way???
Anybody with any experience working with media files and flash MX??????
Really would appreciate any feedback!
Jiggystar
View Replies !
View Related
FLV Loading And Streaming
regarding FLV loading and streaming....
I am really new to this topic. i have a flv file which is linked to the relative path of the same folder of the flashfile. If i import the flv file and run my swf, i can clearly see my flv playing. But if i go to another system(computer) and navigate throught the lan network and access the same swf, my flv file is not playing. I feel that my flv is playing only in standalone and not, when i access my same file through a network. i don't have a FMS(Flash media server).
Question:
1.How can i make my flv file to work, even if i work through network.?
2.I have some problem in streaming. i need my flv.fle to load fully before it starts to play. is it possible?. it should play without any disturbance.
3.can flv files be used in web without the help of flash communication server?
View Replies !
View Related
Loading Streaming FLV
I have a video application which loads progressive download FLVs from an XML list. It works fine, but my client would like to try streaming video from Flash Media Server. I was naïvely hoping I could simply swap the http address of the progressive files with the rtmp address of the FMS files to load the streaming files, but that doesn't work. Is there a way to do this with attachVideo or will I need rewrite the application and use the FLVPlayback component? TIA
Attach Code
function loadVideo1():Void {
videoHolder1.video.attachVideo(nsStream1);
mynsStream = nsStream1;
//vidURL is the url listed in the XML file
mynsStream.play(vidURL[0])
}
View Replies !
View Related
Problem With Loading Streaming MP3
I'm using the following code to load and stream an MP3 that I have stored in a particular folder. Output informs me that it is successfully loading the Sound object, but then it says that it is having a problem with the MP3 itself. Yet I can play the MP3 independently no problem, and the Output is displaying a corret mapping to the MP3. Can someone please help? Thank you.
Code:
var songs = new Array("song1.mp3", "song2.mp3", "song3.mp3", "song4.mp3", "song5.mp3");
var songtoplay = "music/"+songs[0];
trace(songtoplay);
soundtrack = new Sound();
soundtrack.onload = function() {
trace("sound has fully loaded");
this.start();
};
soundtrack.loadSound(songtoplay, true);
View Replies !
View Related
Loading And Streaming And Errors, Oh My
Here's a link to my jukebox:
http://www.kindagamey.com/flash/jukebox
Thanks to the peeps on this board it is a lot better than it was.
However, I still have some problems:
* I am getting some sort of stream error IN THE FLASH PLAYER. How embarassing that Flash would show an error to the public AND tell them my function names -- what if I had called them something rude?
* The 'progressBar' wavers around when I click a song... presumably because mySound.length is not finalized yet... it is still deciding how long the song is so when I take a percentage to determine the length of the progressbar, it f*s up.
Sound Code:
Code:
var mySound:Sound = new Sound();
var mySoundChannel:SoundChannel = new SoundChannel();
function playSong() {
// When a button is clicked
var req:String = mySongsDir+"/"+categoryArray[currentCat][1]+"/"+songArray[currentCat][currentSong][1];
SoundMixer.stopAll();
mySound = new Sound();
mySound.load(new URLRequest(req));
mySound.addEventListener(Event.COMPLETE, onSoundLoaded);
mySound.addEventListener(Event.SOUND_COMPLETE, onSoundCompleted);
mcTitle.mcTitleText.songTitle.text = songArray[currentCat][currentSong][0];
mcTitle.mcTitleText.songTitle2.text = songArray[currentCat][currentSong][0];
mcTitle.gotoAndPlay(2);
currentPosition = 0;
musicPlaying = true;
mySoundChannel = mySound.play();
mySoundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundCompleted);
bandPlaying();
}
function onSoundLoaded(evt:Event):void {
// do nothing?
}
function onSoundCompleted(evt:Event):void {
musicPlaying = false;
currentPosition = 0;
mySoundChannel = mySound.play(0)
mySoundChannel.stop();
bandWaiting();
}
ProgressBar Code:
Code:
// ENTERFRAME
stage.addEventListener(Event.ENTER_FRAME, doAlways);
//
function doAlways(evt:Event):void {
// set stage audio volume
theVolume = Math.round(((btnVolKnob.x - leftKnob)/(rightKnob-leftKnob))*100);
SoundMixer.soundTransform = new SoundTransform(theVolume/100, 0);
// set wave state of mute button based on audio slider
if (btnVolKnob.x == leftKnob) {
soundwaves.visible = false;
} else {
soundwaves.visible = true;
}
// set progressbar visually
if (!isNaN(mySound.length)) {
progressbar.bar.scaleX = (mySoundChannel.position/mySound.length);
}
// set progressbar animation
if (musicPlaying == false) {
progressbar.animation.stop();
} else {
// music playing is true
if (mySound.isBuffering == true) {
progressbar.gotoAndStop(2);
} else {
progressbar.gotoAndStop(1);
//progressbar.animation.play();
}
}
}
//
// PROGRESSBAR -- AUDIO LOCATION BAR
progressbar.bar.scaleX = 0;
progressbar.animation.stop();
progressbar.buttonMode = true;
progressbar.addEventListener(MouseEvent.CLICK, playSongAt);
//
function playSongAt(evt:MouseEvent):void {
var xnum:Number = Math.round(evt.target.mouseX);// xnum will be 1 - 288
var here:Number = Math.round((mySound.length*(xnum/288)));
mySoundChannel.stop();
mySoundChannel = mySound.play(here);
mySoundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundCompleted);
}
Any help would be appreciated.
(strange, I can't reproduce the stream error? although, I did just notice some of the characters disappearing for some reason. That ain't good.)
(edit 2: oh, I CAN reproduce the stream error. Hit RELOAD on the browser whilst a song is playing.)
View Replies !
View Related
Loading Streaming Video Swf In Xml
hi all,
i've created a picture gallery that uses a little xml to load in pics. however, the client wants to have video too. i've got a videoplayer swf that, when executed on its own from a link our test server, streams in a flv from off the web, and works fine.
however, when i try to load in the same swf through xml, all attributes of the swf load in except for the video itself.
any ideas of how to get the flv working? i don't really want to change my picture gallery too much; i.e. don't really want a set of video buttons on the main gallery and loading in the flv through the xml, though this may have been the better way to do things it seems.
can you actually load in swfs that stream video through xml?
hope that all makes sense? prob not.
View Replies !
View Related
Loading/streaming Multiple .swf's Into A Movie
Hello
I have a main movie, into which i want to load multiple swf files. The main movie starts by loading the home.swf, which works fine!
My problem is, that i want the rest of the swf's to be loaded/streamed into the background while somebody lookes at the home link.
The movies are loaded with a frameaction like
loadMovieNum ("products.swf", 1);
I have 9 links on 9 different frames. Will the other swf's be loaded into the mainmovie even though i'm looking at the home link? (I want to use "parking" to load the other files)
Hope somehone can help...
Thanx Jesper
View Replies !
View Related
Loading Streaming Mp3s Scripting?
code: on (press) {
if (playing02!=true && playing!=true) {
playing02=true;
paused02=false;
stopped02=false;
loaded02=true;
myEvent=0
myStreaming=1
//myMusic02 = new Sound(myMusicMc02);
myMusic02 = new Sound();
myMusic02.loadSound("FEEL_1_.mp3",true);
myMusic02Position=0;
myMusic02Volume=50;
myMusic02.setVolume(myMusic02Volume);
}
myMusic02.onSoundComplete=function() {playing02=false}
}
i got that script form a help file i found on the web, i have tried to break it down from a button code to a frame action, i'd like it to start on the 1st frame, i have another script to get it to start playing later, but i wanted to load it externly incase they go there 1st it can stream
any ideas on breaking it down?
View Replies !
View Related
Display Streaming/loading Status?
SITUATION:
I have a simple movie (loeaderTest.fla, attached) that is loaded into my main movie via loadMovie(). It's about 450 frames/<300Kb and consists only of some images put together for a project.
I was considering a preloader to wait for the whole movie to load, but it seems a bit of a waist here, since the movie starts to play once the first picture is loaded. Then there are a few seconds of "pause" for some of the pictures to come. This is not a big problem, but I want to display to the user when he is waiting for content to load and not..
WHAT I WANT:
I want a "loading" thing to appear when the playhead has stopped to wait for the next part to load! (..so that it can continue..)
To better understand please open the attached FLA and preview it in flash with the downloadsetting set to 56K.. The playhead stands still at the beginning, around 40 and 85...
Anyone have an idea on how to accomplish this??
Please help!
THANKS!
View Replies !
View Related
Problems Loading Streaming Mp3 With LoadSound
Hi. When i try to play a mp3 (8, 16, 24, 32kbps) it plays twice or four times regular speed. I don't know what to do because i can't use higer bitrates (it works fine with a 128kbps but i can't use it in web).
And a second question, can i start playing a mp3 from an offset from the begginning? i just want to make a pause button but i haven't found any way to start playing from a position. Remember i am using loadSound for streaming mode.
Thanks
View Replies !
View Related
Loading Jpgs From A Streaming Server
hi guys, i'm having a problem and i need some help, let me tell you what is going on:
I have a streaming server that creates jpgs from a camera every 5 seconds, i need to create a flash that will grab the images and load one by one every 5 sec. [that is the easy part]. I done a flash file with a simple loadMovie that has a time line of 5 seconds.. i had some results but not exactlly what i need...
My first problem, every time the time line goes back to where it should load the image the current image disapear and loads the next one. so i have a blank frame wile the next image is loading. It wold be good to have the next image coming up with out the image going blank.
So i've tryed different things:
Try to create a script that loads the next image on a different level, and that fixed the problem of the white frame, but than i have another problem, sometimes the streaming server is generating the image when the flash requested so the image won't load on in to the flash, than the image that should be loading on the flash keeps trying to load and the next one after the 5 secds start loading on the next level, so i have a gap on 10 seconds between the last image and the other one. I'm also having another problem that imagine an image taking 4 seconds to load than the next one takes only 1 second, i'll have only 2 seconds of vewing for the first image.
so what i think i should do but i don't know how, is find a way to load the image before and display it later, even if i have to cache 2 or 3 images before i start displaying it, so i'll have a delay of 15 seconds to be able to cope with this problems.
Does any one know how could i do it? It's good to mention that the server saves the images with the same name always.
thanks dan
View Replies !
View Related
Loading Streaming Feed Into Flash
I'd like to load a webcam feed like this link into Flash:
http://218.24.161.254/control/faststream.jpg?stream=full&fps=12&rand=393984
Could any one suggest a place to look for answer?
I tried to load the jpg by code. But I'm not sure how I deal with the string, "stream=full&fps=12&rand=393984" after the question mark in the web address bar.
thanks
View Replies !
View Related
|