Buffering External Music
does anyone have any information or code that buffers streaming audio from an external .swf?
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-02-2003, 04:29 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Buffering An External SWF With Music
Can anyone point me in the direction of a way to buffer the audio in an external SWF so it streams instead of completely downloading to the browser before it starts playing? I have a preloader in the files, but the music won't start until it's completely downloaded, which makes the preloader (or buffer) useless.
Music Player For Site(while Buffering?)
I need to have a dynamic field in my music player on my site say "buffering" when a track is buffering(they're being streamed). Anyone know of any good tutes for this? I have it working already where it displays the correct track name w/ each song in the dynamic txt field..but can't find much info on the buffering stuff, so a traditional preloader won't work. How can you find out whether it's buffering vs. playing?
I"m not an AS newb, so even a description would work(don't necessarily need sample code).
Thanks for any help!
Buffering An External .FLV In AS3
Hello I have this AS for playing external .flv movies from various buttons...
------------------------------------------------
vid1_btn.addEventListener(MouseEvent.CLICK, clickVid1);
vid2_btn.addEventListener(MouseEvent.CLICK, clickVid2);
vid3_btn.addEventListener(MouseEvent.CLICK, clickVid3);
vid4_btn.addEventListener(MouseEvent.CLICK, clickVid4);
function clickVid1(evt:MouseEvent):void {
MovieClip(this.root).player.source = "./movies/vid1.flv";
}
function clickVid2(evt:MouseEvent):void {
MovieClip(this.root).player.source = "./movies/vid2.flv";
}
function clickVid3(evt:MouseEvent):void {
MovieClip(this.root).player.source = "./movies/vid3.flv";
}
function clickVid4(evt:MouseEvent):void {
MovieClip(this.root).player.source = "./movies/vid4.flv";
}
------------------------------------------------
How can I add an 8 second buffer time to this? And is it possible to add a "buffering" message, such as using the Buffering Bar Component?
Thank you in advance...
Ian
Buffering An External .FLV In AS3
Hello guys,
I have this AS for playing external .flv movies from various buttons...
------------------------------------------------
vid1_btn.addEventListener(MouseEvent.CLICK, clickVid1);
vid2_btn.addEventListener(MouseEvent.CLICK, clickVid2);
vid3_btn.addEventListener(MouseEvent.CLICK, clickVid3);
vid4_btn.addEventListener(MouseEvent.CLICK, clickVid4);
function clickVid1(evt:MouseEvent):void {
MovieClip(this.root).player.source = "./movies/vid1.flv";
}
function clickVid2(evt:MouseEvent):void {
MovieClip(this.root).player.source = "./movies/vid2.flv";
}
function clickVid3(evt:MouseEvent):void {
MovieClip(this.root).player.source = "./movies/vid3.flv";
}
function clickVid4(evt:MouseEvent):void {
MovieClip(this.root).player.source = "./movies/vid4.flv";
}
------------------------------------------------
How can I add an 8 second buffer time to this? And is it possible to add a "buffering" message, such as using the Buffering Bar Component?
Thank you in advance...
Ian
Buffering External Mp3 Audio
What is best way to buffer large mp3 files? If I want to fast forward
halfway through a 20MB mp3 file, does flash need to download 10MBs of the
file before playing? Would it be best to split the mp3 into smaller files?
Thanks
Buffering And Syncing External Mp3
I'm pretty new to flash and have been having a hard time figuring this one out.
Website has an external MP3 (~2MB) that needs to start playing exactly at frame #1 so the beat synchronizes with certain frame actions displayed on the site.
I don't want to force the file into the website's swf file since 2MB's will make the wait unbearable, so I'd like to buffer part of the external file in the preload sequence.
Any ideas here? Here's hoping this is is a relatively easy one as I seem to be fairly lost
Buffering External MP3 Sound Before Playback
Does anyone know of a way to buffer a fixed amount of seconds to an external MP3, before playback?
My MP3 is background music.
I know that with the Sound Class you are limited to Event and Stream types. Loading in n MP3 through Sound.loadSound method you can set the "isStreaming" parameter.
Set to true, the stream comes in at anypoint and stutters throughout the songs download. Which is plain awful.
Is there a way to buffer an MP3 like you would for an FLV. Say create a NetConnection and stream through that way, using the buffering capabilities of NetStream.
My Question then is how does someone convert an MP3 to a non-video-like FLV?
Is this at all possible? Anybody done this before?
Which Is Faster? Multi-buffering Or Double-buffering?
MULTI-BUFFERING
-----------------
Screen Buffer ---> To another BmpData via copyPixels
Layer1 extends BitmapData (with many this.copyPixels for this layer locally)
Layer2 extends BitmapData (with many this.copyPixels for this layer locally)
Layer3 extends BitmapData (with many this.copyPixels for this layer locally)
Layer4 extends BitmapData (with many this.copyPixels for this layer locally)
Screen Buffer copyPixels from Layer 1 to Layer 4
-OR-
DOUBLE BUFFERING
-------------------
Screen Buffer ---> To another BmpData via copyPixels
Layer1 (with buffer.copyPixels for this layer....)
Layer2 (with buffer.copyPixels for this layer ....)
Layer3 (with buffer.copyPixels for this layer ....)
Layer4 (with buffer.copyPixels for this layer )...
for this layer... by having variable 'this' passed from Screen Buffer
Screen Buffer updated remotely from Layer 1 to Layer 4 already.
____________________
No doubt, double-buffering might seem faster because you are running the copyPixels command less in total. The thing is: Could it be slower because you are copying pixels using a remote reference of a parent as the destination bitmapdata? Is there a significant performance different between this.copyPixels vs parent.copyPixels??? After all, in multi-buffering, all copyPixels command are done locally using this.copyPixels(), it does feel somewhat neater.
If (radio Is Buffering) Display "buffering..."?
Hi guys,
Can u help me with this problem?
I need to add a script, which display "buffering" message during the radio is buffering. I have this code:
_soundbuftime = 5;
song = new Sound();
song.loadSound(radiourl, true);
song.setVolume(vol);
Thanks
External Music
how can i load in different music files (external swf files)into flash.. and control them in my flash site ???
External Music
whats the code to load in an external music file to stream
its like new sound("dfafdaf.mp3"); or something
Loading External Music
how do you load external music.. i know the loadMovieNum ("something.mp3", 0); ... i know that much but how do you get it to play.. if this is hard to do just reply with hard to do thanks...but if it is sorta easy the by all means tell me =)
Playing External Music
im making a little flash movie that visitors can use to navigate around my website, and i want some music in the background to go with it. everything works fine with the music, except the fact that the file size is over 4000KB. if i take out the music it goes down to a mere 12KB.
is there any way of making flash play a external music file (ie on a webserver)so that the file size is still low?
Best Way To Load An External Swf For Music?
Hey guys, looking for a good way to load an external swf for an MP3 player on my Church's website.
Anyone have any ideas? I don't want to have to load it at the beginning, so that's why I'm using an external swf.
Thanks
Controlling Music In External Swf's
I have been searching the web up and down for two days straight without any results.
I've built a music player which can be seen here: http://www.pixelfrogmusic.com/
The player calls music from external swf's. Each track is stored in a separate swf (Event). As you notice, the pause button stops the music (StopAllSounds) instead of pausing it, and the play button doesn't work. I have not even been able to get to the forward and rewind buttons yet.
What I'm trying to do is to pause and play the music (for a start). I have been able to do this with streaming sounds, but not with Event sounds. Due to the lack of quality I cannot steam the music. I need CD quality music.
Is there a way to start and pause an event sound in an external swf with buttons that are placed in the main movie?
I have found several tuts with similar issues, but none of them covers external swf event sounds.
Any help is greatly appreciated.
External Music Files
What's the actionscript syntax for:
1.) Start playing an external music file.
2.) Stop playing an external music file.
External Music Files
I currently use:
Code:
mySound = new Sound();
mySound.loadSound("music.mp3",true);
1.) How do I set the number of loops?
2.) What is the Actionscript code to unload the sound?
External Music Files
I currently use:
Code:
mySound = new Sound();
mySound.loadSound("music.mp3",true);
1.) How do I set the number of loops?
2.) What is the Actionscript code to unload the sound?
Loading External Music Into A .swf
Ive got a .swf that when it begins to play I want it to load a .mp3/.wav into a movieclip so the original .swf isn't too big.
How do i do this?
the movie clip is called jim
Loading External Music
Well I am trying to Load a external music SWF file and the file loads great but the music doesn't play. I am using this code
--------------------
on (release) {
_root.contents.loadMovie("data.swf");
}
--------------------
So now I dont know what to do. If you guys have any suggestions on what is the best way to load music the FASTES way to do if possible (Fastes I mean is the Loading time) If you guys know a better way please show me Thank you very much
Load External Music File
HI guys,
I've been working on this for a couple of hoours now,
but still i don't get it...
the problem:
When I load my site everything works, the preloader, de popup screens from the buttons.
But when i put a loadmovie(music.swf....(etc)) in the main movie with a target, it somehow loads but doesn't play the sound.
Does anyone recognize this or now how to fix this...
You can have a look at the site at http://www.geocities.com/vitas9000/
(sorrt for the stupid geocities part, well gotta test it somewhere.
for teh guys who want to help me i have placed a download on the site where you can download de fla from the musicfile and you can test it.
P.S. when you come back again, then it works.
Many Thanx Frank
Problem Loading External Swf With Music In It
Hi,
If anyone can help me with this, that would be great.
I've got a main swf and another swf that holds a music loop (music.swf). In the main swf, when it has completely loaded, the first frame of the 1st scene after the preloader has the following code:
loadMovieNum ("music.swf", 1);
Then the rest of the scene's animations run until told to stop.
Currently, when I load up the main swf, the music.swf doesn't load up, even after leaving it for a long time (over 1 minute) - I'm running it off cable connection too. However, once I hit the refresh button, the music plays. The size of the music.swf is only 49K.
the music.swf has it's own preloader in it too so that viewers know that something is loading, but it ain't happening. Please help as I'm puzzled.
Thanks,
Chris.
Load External Sound/music
I would like to be able to load an external music file when a button is clicked for example i want this to play http://music.celestialrain.com/remenissions.mp3
Control Music Fade Out On External Swf
Im designing a website that has the option for 3 music loops as background music. On the site, I have 3 buttons (1, 2 and 3) which each load a swf with an mp3 on the first frame as streaming and with fade in (from the sound properties). A fourth button simply unloads the external swf.
Till now everything works fine, the problem is that my client wants the music to fade out when unloaded or when another one is loaded.
Is there a way I can control with a button on the main swf, that the music on the external swf will fade out and then unload?
thanks! I hope someone can help...
Loading External Music Into Flash...
Hi,
I know it is possible to load external .SWFs and images into a flash movie, yet is it possible to do the same for audio and music?
If so, can you please post the script / link to help me get this to work...
thanks in advance.
Chill93101
Control Music Fade Out On External Swf
Im designing a website that has the option for 3 music loops as background music. On the site, I have 3 buttons (1, 2 and 3) which each load a swf with an mp3 on the first frame as streaming and with fade in (from the sound properties). A fourth button simply unloads the external swf.
Till now everything works fine, the problem is that my client wants the music to fade out when unloaded or when another one is loaded.
Is there a way I can control with a button on the main swf, that the music on the external swf will fade out and then unload?
thanks! I hope someone can help...
Rules For External Loading Music
my site is about 900kb... I have a generic midi playing that is looping around to make the sound. If I am to change that to include a full 3minute mp3 song, my size of file jumps to 3or 4mb and downloads slowly.
so the question is, how do I have the keyframe call the music to start playing? will that affect the stop button I currently have that stops the sound if so desired?
anything else I should know?
Load External Music Player
Hello....I hope someone can help I have been browsing the web for HOURS looking for help with this subject. I created a flash based website and I need to load my myspace and snocap music player into my flash project. Both players are flash based....I'm certain there is some form of actionscript I can use I just don't know what it is and I am getting fustrated! The url for the myspace player is:
http://lads.myspace.com/videos/Main....lbid=0&ptype=4
I hope someone can help!! Thanx!
Background Music Transition With External Swf
I'm working on a Flash web presentation for a client and have a question about sound. I haven't worked with sound much, so I'm grateful for any advice or suggestions. I want to have a main movie the plays a loop of background music (such as drums and bass), then after a while, I load an external swf where I want the music to change to another similar loop (same drums and bass but with some horns and effects over top of it). Towards the end of this external swf (and the end of the entire file) I want to go back to the original loop (just drums and bass). What do you suggest to accomplish this with smooth transitions and small file size?
Loading An External Swf Music Player
Hello,
my problem is that all the action script contained in the musicplayer.swf seems not to work when I load the whole musicplayer.swf in the main movie.what can I do to resolve this?
here is the code:
Attach Code
//create movie clip for music player
this.createEmptyMovieClip ("loader_mc", -16998);
loader_mc._x=650;
loader_mc._y=30;
//create a MovieClipLoader
mcLoader = new MovieClipLoader();
//create an object for listener
loadListener = new Object();
//register the loadlistener as a listner of hte mcLoader object
mcLoader.addListener(loadListener);
//load the swf of jpg into the movie clip target
mcLoader.loadClip("flash/musicplayer.swf", loader_mc);
Background Music Transition / External Swf's
I'm working on a Flash web presentation for a client and have a question about sound. I haven't worked with sound much, so I'm grateful for any advice or suggestions. I want to have a main movie the plays a loop of background music (such as drums and bass), then after a while, I load an external swf where I want the music to change to another similar loop (same drums and bass but with some horns and effects over top of it). Towards the end of this external swf (and the end of the entire file) I want to go back to the original loop (just drums and bass). What do you suggest to accomplish this with smooth transitions and small file size?
Load External Music Into A .swf And Play Through AS
Hi,
Ive got a .swf with a preloader and while its loading I want it to load a .mp3 into the .swf so it isn't too big
But I dont want it to play straight away, i want to make it play when it reaches frame 5 for example because I want to make an intro.
code i have got at the moment
//frame 1-4 is the preloader
mysound = new Sound();
mySound.loadSound("http://mysite.com/folder/my song.mp3", true);
//frame 5 = intro
mySound.play();
Can anyone help me?
Thanx
Martin
How Do I Load An External Music File
Hi I want to load an external sound file when i press a button.
Is this possible? You can load external movies so can you do it with music files? if so the code would be great! thanks.
Actionscript 2.0 please
Pause Music When External Movie Is Loaded
Hi
I have the famous "cleoplayer" (kind of music jukebox)in the main timeline. It works fine.
But my problem arises when I load an external movie (section1.swf)with its own music, as both musics play at the same time.
What I would like to do is to fade out the music of the current track playing in the cleoplayer, and fade it in when "section1.swf" is unloaded...but I guess this is too much for me.
So, I would be glad if I even know how to pause the music while "section1" plays. That would be enough.
If it is of any help, the actions inside the "pause" button of the cleoplayer are the following:
on (release) {
if (action eq "pause") {
action = "play";
status = "playing tr. " add playtrack;
tellTarget ("tracks") {
gotoAndStop("track" add ../laytrack);
}
play();
} else {
if (action eq "play") {
action = "pause";
status = "paused tr. " add playtrack;
tellTarget ("tracks") {
gotoAndStop("stop");
}
stop();
}
}
}
I guess I should "call" this button at the same time I call "section1" to load...
on (release) {
_root.container.loadMovie("section1.swf");
}
...but I don't know how.
Can someone help me?
Loading Music Files From External Source
I know how to load text files from an external source, but i need to know if you can load music files, mp3's, from an external source and how i would go about doing that, if any one could help me that would be great thanks,
Dan
Play Music In Main Movie From External SWF
hi
i have created an swf that i am using as a music box thing (contains all the actionscripting for it to work and music). this works fine on its own.
i can load it into my main movie into the correct empty MC, but it doesn't work, no music plays.
the code i have used in the main menu is:
PHP Code:
loadMovie("kol_musicbox.swf",musicEmpty_mc);
how do i get it to play the music?
please help
chris
Music Plays From The Swf Directly, But Not From An External Site... How Do I Fix It?
ok. with this link, the music plays. http://3hobbits.com/myspace/audioplayer4.swf
with this link, it doesn't play. http://3hobbits.com/myspace/test.php
i am trying to put the code onto my myspace (yeah i know), but the music wont play for some reason. i think it is because it is loading it from an external server (3hobbits.com), but there has to be a way to get it to work...
Pausing (Stopping) External Music Loop
Hello All,
I have searched through the site and cannot find any help with how to pause or stop my external sound loop. I have my sound loop in the same swf as the visual analyser so I cant just 'unload' the movie clip or the on/off functuality leaves as well.
How do I just say 'stop' the movie so they CAN click on 'on' when they come back from visiting an outside site.
Thanx,
~ Seretha B.
Loading Movies Photos And Music From External Folder
Hi,
~Introduction~
I am making a video player and to make my flash look better and more editable i want to load it from folders inside a folder: MyVideoPlayer(example)->Photos-> and there are all the photos.
~Problem~
I want to load them so their names appear on the list (of videos music or photos) depending on which music, video or photos are oh those different folders.
Thanx for you help
Tell me if you can't understand something!
[F8] Buffering A SWF?
So I have a SWF about 18 seconds long. Even when I use a preloader (which I'm still struggling with) it gets toward the end of the movie and I start getting a stuttered playback indicating that it is still loading. This actually happens online as well as via "simulate download." So my question is, is there a way to cause buffering to happen so that this doesn't happen. Or is my preloader not set correctly?
Buffering
I'm certain that i have posted this in the wonrg place, so administrators please move it as necessary.
I would just like to ask that a 'pre-buffer' be added to flash. I.E. something that allows me to hit a button, switch to another browser window while the video loads, then switch back once the video has finished loading... Just getting a little sick of waiting for buffers on lame connections... [And there are loads of them... especially in London]
Thanks
K
Buffering.....
hello,
I developed a player in which i use netStream class to stream..
The problem is the net_ns.bytesLoaded is showing that it loaded completely but actually the stream is not fully loaded..
Is it the problem of Internet connection?
pls help me..
regards
harilal
Buffering In AS3
Hello,
I have been successful in getting my application to record and save using AS3 and FMS. But I am having problems with my recording it just doesn't record smoothly. I have tried these settings for Recording (AS3):
Code:
cam.setMode(320, 240, 30, false);
cam.setQuality(0,88);
cam.setKeyFrameInterval(10);
mic.rate = 11;
Play Button:
Code:
ns.play(StreamName);
ns.pause();
ns.resume();
Record Button:
Code:
vid_screen.attachCamera(cam);
ns.close();
ns = new NetStream(nc);
ns.client = client;
ns.attachCamera(cam);
ns.bufferTime = 2;
ns.attachAudio(mic);
I have played with the bufferTime ranging from .1 to 100 and it doesn't make a difference. Am I not using bufferTime correctly? It records better without the buffering, but my recording still not smooth it looks like it plays and stops, although the sound plays just perfect even when the video stops and goes. I am using AS3. It seams that buffering is handled different in AS3 than AS2.
What can I do, please help,
Thanks again,
Louis
Buffering Help
Anyone know of a way to code to the video layer to say while it is buffering to load the first .swf and hold it until the buffering stops and then play that .swf file when its done buffering?
Any help appreciated!
Thanks,
Mike Jones
Sound Buffering?
Hello I'm trying to make it so when you get to a certain frame in a movie clip it plays music but waits 10 seconds before starting. This is what I got but it doesn't seem to work, it plays the sound but doesn't buffer it at all it just starts playing.
song.stop;
song = new Sound();
song.attachSound(loadmovie ("MoveYourBody.swf", "../c_sound"));
song.start, _soundbuftime = 10;
Sound Buffering?
Hello I'm trying to make it so when you get to a certain frame in a movie clip it plays music but waits 10 seconds before starting. This is what I got but it doesn't seem to work, it plays the sound but doesn't buffer it at all it just starts playing.
song.stop;
song = new Sound();
song.attachSound(loadmovie ("MoveYourBody.swf", "../c_sound"));
song.start, _soundbuftime = 10;
Buffering Time
Ok, so I have a requirement that a preloader should take no longer than 15 seconds on an average 56K line. (Yes, I know how rediculous it is to put a time requirement on data transfer you have no control over.)
Anyway, by my estimation, with a movie running at 20 fps, this means the first 300 frames can have no more than total of 70K of data, and the first 450 can have no more than 140K, and the first 675 frame can have no more than 210K and so on and so forth.
Normally, this isn't a problem for a couple movies, but I'm setting up a template for e-learning content folks to build dozens of files into, and I think this is going to be a nearly impossible task for them to use full-blown animation within these contstraints.
Does my math sound right here?
|