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;
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-14-2001, 07:41 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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've searched high and low, but can't find an answer:
Is there any way of managing sound buffering to the same degree as flv buffering. Is there any way to tell if a sound is buffering and what proportion of _soundbuftime is buffered?
I don't need code, just a yes or now and a hint as to how.
Thanks
Sound Buffering Questions
I'm using actionscript 2's Sound class to load mp3's. I noticed as3's Sound class has buffering support, but not as2's ?
If as2's Sound doesn't support buffering natively, do I use _soundbuftime to set buffer time? I'm planning to support flash 7 and plus.
Also, I've read some articles online about detecting client bandwidth, if you'd like to share your way or suggest a good way of doing it in AS, it'd be nice too. Thanks.
Simulating Sound Buffering
Ok, I've got a sound that's streaming, previously stopped. There's a check that see if 20% of the sound has loaded. If yes, start the sound. But it doesn't start! Instead It start's whe the sound is completely loaded.. The trace command tells me that the function that starts the sound is executed correctly after 20% is loaded, but no sound till the end of loading process..
Is it a flash bug, or a bug of mine???
[F8] Properly Buffering MP3 With Sound Object?
Hello!
I've created an Mp3 player which streams mp3's via http:
Code:
_root._soundbuftime = 6;
s = new Sound(null,true);
if(s.loadSound(url, true) == false)
{
return false;
}
Regardless of what I set _soundbuftime to, about 500ms of sound will always play immediately before it buffers for *_soundbuftime* seconds. How can I force the sound object to shut up until the specified value of _soundbuftime has been reached?
Thanks in advance
Justin
Sound Object - Buffering The Next Track.
I've got the next track to load, when the first one is done, and after that everything works fine.
I'm trying to make it so that two tracks will buffer in the same manner - but feel like I'm doing things the hard way.....
http://www.variablemedium.com/work/ss/code.txt
that is the code
and
http://www.variablemedium.com/work/ss/soundplayer.zip
that is the fla, txt, and audio files
any help - or just a nudge in the right direction would be greatly appreciated..
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?
Sound Buffering Best Practice Question
Is there a generally accepted value for sound buffering an mp3. My SWF uses narration with images loaded according to the "position" and I'm wondering about how much of the mp3 I should buffer before starting the play(). I'm using the SoundLoaderContext.
Just trying to be a good web citizen.
Thanks!
Sound Object - Buffering The Next Track.
I've got the next track to load, when the first one is done, and after that everything works fine.
I'm trying to make it so that two tracks will buffer in the same manner - but feel like I'm doing things the hard way.....
http://www.variablemedium.com/work/ss/code.txt
that is the code
and
http://www.variablemedium.com/work/ss/soundplayer.zip
that is the fla, txt, and audio files
any help - or just a nudge in the right direction would be greatly appreciated..
[AS]Preloader + Buffering Ext. MP3 Sound Object
First of all, This forum has been a big help to me. Thanks for this great resource.
Anyways here is my question.
I have a preloader that preloads the intro to the site. Right now I have the mp3 embedded into the flashmove and it plays on the last frame in my intro. My problem is that makes the filesize of the SWF extremely huge. Here is what I want to do:
I created a new sound object, its source is going to be a external mp3 on the server, and i want it to "Stream". But I also need it to play right away when I call it. So can I pre-buffer it though the preloader with out the preloaded trying to load the whole mp3 in? Or buffer the mp3 while the intro is playing? My solution is to have optimal load time.
Here is my preloader code:
ActionScript Code:
// get size and calculate %
sofar = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent = sofar/total;
percentnext = Math.round((sofar/total)*100);
percentdisplay = Math.floor(percent*100)+"%";
// when done preloading: start
if (percentnext == 100) {
gotoAndPlay("start");
}
Here is my sound object code:
ActionScript Code:
soundtrack = new Sound(_root);
soundtrack.loadSound("soundtrack.mp3",true);
and I would call the soundobject to play on the frame using
ActionScript Code:
soundtrack.start(0,999);
SO is there away to buffer the audio while the into is running and then play it on the last frame.?
Thanks in Advanced.
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
[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
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?
Buffering While Loading
hi, the greenhorn again...
i want to make a progress bar thart will say how much of the file is already loaded.
How to make the film start and load during playing, not loading all the size in the beginning?
It would help if you could post a detailed answer, i don't know really much about flash, i just try to make this one video running for the company-website.
thx!
Dorian
Buffering Audio
Hello,
I made an audio player like the MediaPlayback component one. Now, I would like to do the buffering as in the flash component.
I need to know how many bites are downloaded and how many ones are played, do you know?
Could you help me, please?
TIA
Movie Buffering
hi guys
I Need method to of displaying "movie buffering" as the movie plays rest of the movie loads. and if you move the movie status bar to it should show status of movie as "movie buffering please wait..."
Ravi
Check out for reference
http://www.frontrange.com/goldmine/goldmine_demos.asp
Click on second demo
GoldMine Overview Flash Demo
Movie Buffering
hi guys
I Need method to of displaying "movie buffering" as the movie plays rest of the movie loads. and if you move the movie status bar to it should show status of movie as "movie buffering please wait..."
Ravi
Check out for reference
http://www.frontrange.com/goldmine/goldmine_demos.asp
Click on second demo
GoldMine Overview Flash Demo
Buffering Audio?
Is it possible to buffer an audio swf that is loaded through a level rather than a movieclip
example:
Code:
on (release) {
unloadMovieNum(66);
loadMovieNum("song3.swf", 66);
}
This method requires a complete download of the swf before playback begins. Would it be easier just to load the external swf into a empty movie clip? Thank you in advance.
J.
Buffering Video
i've been searching to internet and flashkit for tutorials on how to buffer videos... but not luck =( which leads me to posting. can someone lead me the way to buffering video???
thanks!
MediaDisplay Buffering
Hi, I'm new here. Time for a probably very easy to answer question.
I am designing a website which you can see here - www.denovodigital.com/demo2
If you go to the portfolio page, you will see I have a video on the page. The video is played the MediaDisplay component. What I want to know is, how do I show a buffering bar at the bottom of the video? Plus, I would like the video to refrain from playing until it has buffered a predefined amount?
I have tried searching, but it seems this is a very busy forum. If these questions have already been answered, just point me in the right direction.
Any comments on my design would be nice!
SOS....FLVPlayback Buffering %
hey guys
i neeed your help
- i use flvplayback component(flash 8) for streaming video from vitalstream.com
- interface as on productorials.com
- flvplayback and flvplayback custom ui components are skinned individually
- so question is - HOW CAN I SHOW BUFFERING %? - because flvplayback doesn`t have any property similar to NetStream.bufferLength property. It shows progress bar only.
------------
sorry for duplicating message
it is related to 3 forums, but i dont know how to make links in several forums to one message.
[F8]help With Buffering Video
Hi guys,
I cant see the wood for the trees
i am trying to buffer x amount of video to be streamed. This works as it should my problem is getting it to display prebuffering 1-100% of the xmount to be prebuffered.
The display keeps running on past the 100% mark
code:
var total_kb:Number = Math.round(_parent.holder.getBytesTotal()/1024);
var current_kb:Number;
var percentage_kb:Number;
var percentage_kb_eval:Number;
var counter:Number = 0;
this.onEnterFrame = function() {
if (tpercent>=Math.round(100/buffer_percentage) && counter>=20) {
tpercentdisplay = "100%";
_global.buffering_complete = true;
delete this.onEnterFrame;
} else {
current_kb = Math.round(_parent.holder.getBytesLoaded()/1024);
percentage_kb = Math.round((current_kb/total_kb)*100);
percentage_kb_eval = Math.round((percentage_kb/5)*buffer_percentage);
if (percentage_kb_eval>counter) {
this.attachMovie("preloader_bar","bar_"+counter,co unter);
this["bar_"+counter]._x = Math.ceil((counter*8)+70);
this["bar_"+counter]._y = 100;
counter++;
}
tpercent = Math.round(percentage_kb*10)+" %";
tpercentdisplay.text = tpercent;
}
};
Thanks for any help.
Stop Buffering An FLV
Hi,
I have an flv and i access it like so:
planeflashMC.innervid.flv.play()
But how can i get it to stop downloading from the stream (i have more than one flv)
thanks
Buffering VideoPlayback
A couple of my videos are a bit long and tyhe playback is catching up to the download on some computers,Causing it to stumble a bit.
I've been given the following code to keep my video from playing back until a certain ammount is downloaded:
netStream.setBufferTime(10); (for example)
My player does not seem to respond. Is there more to it. Or is there possibly a better way to approach?
Thanks for checking this out,
b
Audio Buffering
Hello,
Does anybody have a nice way to handle buffering in an audio player. I know I can set the buffertime using _soundbuftime, but is there a nice way to deal with the playhead catching up to the limit of loaded audio.
At the moment I use a playhead interval to poll for the sound's position, and if it is supposed to be playing and isn't, I display a buffering message.
Surely there is a nicer way od dealing with it and maybe even accessing the amount of buffer that has been buffered like you can with a netStream??
Thanks
Streaming MP3 Buffering
Does anyone have a nice way to tell if a streaming Sound is buffering other than polling the sound to see if it has stopped when it should be playing?
Thanks
To Control Buffering
Hello,
I am developing a voice broadcast system. I am using a Media Encoder as a recorder, Flash Media Server (developer edition) as a voice data distributor and a Flash player as a listener.
Everything works fine except...
1. I have a timer on the client side that is monitoring NetStream.liveDelay variable. According to ActionScript specification this values shows a network delay between the client and the Media Server. The network I am working in is very fast (actually it's a company), the latency time is less than 1 ms. However, this variable shows such values as "0.500", "0.700", "0.800" ms. Which is pretty strange. Why, according to this variable, the network delay is so huge? am I missing something?
2. After about 1 hour of listening the above mentioned value jumps to 3.3 seconds and the sound is almost gone. I hear only hiccups, short parts of the broadcast. After that the liveDelay value never goes down, stays at 3.3 sec and the sound is totally unintelligible. What could be a reason for that?
3. Is there a way to find out if the server is buffering data or if the client is buffering data and if yes, how much either one accumulates in the buffers before sending (in case it's the server) or playing (in case it's the client)?
I really appreciate your help in these matters.
Thanks
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
Looking For Introduction To Buffering
hello;
anyone know of a good resource to get the abc's of stream buffering?
I seem to be getting NetStream.Play.Stop events even while the flv is playing, and it seems that buffer has something to do with it;
thanks
dsdsdsdsd
FLV Buffering And Preloading
Hi I have some problem of using FLVPlayback component in flash 8 professional.
I need to have you tube player functionalities on my player.
1) How it start buffer from the point where user drag and release the seek bar handler?
2) How it achieves full screen?
Plz need urgent help on above two-----
3) Finally the preloader.
I have done a code for it. Its look ok.But I want to no it is slandered?
My code looks like follow.
//creating listenerObject
var listenerObject:Object = new Object();
//listener event handler
listenerObject.stateChange = function(eventObject:Object):Void {
//checking player state
if (player.state == "buffering") {
//when the player is in buffering shows the preloader
preLdr._visible = true;
}
if (player.state == "playing") {
//when the player is in bplaying hide the preloader
preLdr._visible = false;
}
};
player.addEventListener("stateChange", listenerObject);
Netstream Buffering
hi all - anyone know the answer to this question?
i have an fla that calls external classes to get things working, in that class there is a call to set up and connect to a netstream function/object - that creates the connection and attaches the video to play using this
PHP Code:
}
private function loadVideo(n:String):void{
if(video !== null){
removeChild(video);
video = null
}
if(!imageArray[n]['video']){
return;
}
var connection:NetConnection = new NetConnection();;
var stream:NetStream;
trace("playing video");
video = new Video();
connection.connect(null);
stream = new NetStream(connection);
stream.client = this;
addChild(video);
video.attachNetStream(stream);
stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, function(){});
stream.bufferTime = 1;
stream.receiveAudio(true);
stream.receiveVideo(true);
trace(videoPath + imageArray[largeImageItem]['video']);
stream.play(videoPath + imageArray[largeImageItem]['video']);
addChild(video);
}
the first click/viewing works fine, so i close it and then choose another flv to play - but this time the flv will only play, say 5-10 seconds of new flv - then the flv freezes and doesn't play any more of the flv.
there is some script that functions on the click of the 'close' button that is this:
PHP Code:
/**
* FUNCTION
* _______________________________________________________________________________________________________________________________________
*
* hide large image when close on controlpanel is clicked.
* @eventType MouseEvent
* @param none
*
*/
private function hideLargeImage(event:MouseEvent):void
{
/**
* remove eventlistener from stage for zooming large image.
*
* @fixed 06/11/08
* @comment listener is now removed properly after closing large image zoom viewmode
*
*/
stage.removeEventListener(MouseEvent.MOUSE_WHEEL, zoomLargeImage);
/**
* @version 2.0
* remove previous and next image buttons.
*
*/
Tweener.addTween(prevThumbnailContainer, { _autoAlpha:0, time:0.5, delay:0, onComplete:function():void {
removeChild(prevThumbnailContainer);
prevThumbnailContainer = null;
} } );
Tweener.addTween(nextThumbnailContainer, { _autoAlpha:0, time:0.5, delay:0, onComplete:function():void {
removeChild(nextThumbnailContainer);
nextThumbnailContainer = null;
} } );
Tweener.addTween(video, { _autoAlpha:0, time:0.5, delay:0, onComplete:function():void {
removeChild(video);
video = null;
SoundMixer.stopAll();
} } );
/**
* hide tooltip on click.
*
*/
removeTip();
/**
* set help box status to false for proper loading next time.
*
*/
helpShowStatus == false;
/**
* fade out help box.
*
*/
Tweener.addTween(helpBox, { _autoAlpha:0, time:0.5, delay:0 } );
/**
* set image info status to false for proper loading next time.
*
*/
imageDescriptionShowStatus = false;
/**
* fade out image info container if displayed.
*
*/
Tweener.addTween(imageInfoBoxContainer, { _autoAlpha:0, time:0.5, delay:0 } );
/**
* fade out zoomcontainer with large image.
* @onComplete remove large image containers.
*
*/
Tweener.addTween(zoomContainer, { _autoAlpha:0, time:0.5, delay:0.25, onComplete:removeContainer } );
}
in particular these lines
PHP Code:
Tweener.addTween(video, { _autoAlpha:0, time:0.5, delay:0, onComplete:function():void {
removeChild(video);
video = null;
SoundMixer.stopAll();
} } );
that kills the audio and video
this works and fades out all of the elements including the netstream - and the movie works as it should, but then if another flv gets chosen - it goes a bit bonkers and won't play any more than a few second of the flv.
this happens if you choose the same flv or a totally different flv.
is this something to do with the buffering? is it to do with the way the close function works? should i be using additional code to play the netstream smoothly?
anyone know?
Buffering Question
I want to play a video before the video is completely downloaded. I believe this is called buffering. As the movies plays the beginning it will also be downloading the later part of the movie.
I will have two buttons that choose two different movies .
Button one is for 56k modem which will download a smaller video.
Button 2 is for dsl, which will download a larger video.
How can I determine how much to download before I start playing so the user will have a seamless experience after buffering?
Buffering Problems
I am having problems with playback. To see my test file go to http://coolcoloradohomes.com/test.html
I have a flv file which I converted from wmv format with Flash Video Encoder. I imported it into Flash Pro V. 8 as a video clip. Then I exported it and loaded it onto my website as a progressive download with Dreamweaver. When I play it back sometimes it plays all the way through perfectly several times in a row. Then the next time it stops part way through. Each time before I play it back I clear out my temporary cache files for my local computer. From the timeline below the video it appears that the buffer loads part way and then stops for some reason. When it first starts running it appears that the buffer is filling at a faster rate than the playback is running. (I’m assuming that the darkening line is an actual representation of how much the buffer is filling. Please correct me if that’s not a correct assumption.) When the playback catches up to where the buffer stopped the playback stops. Is there some way to prevent the buffer from stopping. Or if that’s not an option, is there a way to get it to resume filling before the playback catches up to it. I’ve tried 3 different computers at our office with similar results. It stops at random places which vary each time it’s run. It even stops at different points on the same computer. I’ve spent several days online searching manuals and forums trying to overcome this without success. The current buffer is set to 10 with the component inspector of Flash. I’ve experiment with settings ranging from .1 to 30 with similar results. I’ve noticed that the shorter buffer I try the less the image jerks around when it first begins to play. I’d like to continue with the autorun if possible, but if there is a better solution I’m open to trying anything. I’m guessing I’ll have to do something with actionscripts but have not learned how to do that yet. I'm willing to learn if that's what it takes. Can anyone point me in the right direction? The other tours on our CoolColoradoHomes.com site are contracted with a company that’s using Flash. I’d like to do my own so I can add voice description as well as zoom and pan in the directions I want. Being able to do so will enable me to highlight what I want rather than just being robotic.
Thanks,
Wayne Vogt
Seek Bar And Buffering Bar?
what is the difference between seek and buffering bar for video in flash 8 component?? I want to have it say loading before the video starts to load and preloads the whole video - which should I use?
Buffering Problem
hey all, i'm having a little problem i hope you can help with. i had to pick up someone elses job, but theres a playback problem. here's a link
its 3 smaller files loading into a shell swf. something is going on causing the files to load very slowly until they've loaded completely, then they play correctly. is there any way to tell the shell movie to preload the loaded movies completely at startup?
Dynamic Buffering
I'm tring to implement a dual buffering strategy. (Flash Media Server 3, Flash Player 9 and Actionscript 3)
I have a simple player with FLVComponent, a standard skin using the vod application.
I put in the first frame the following code:
videoPlayer.bufferTime = 8;
videoPlayer.source = root.loaderInfo.parameters.url; (I use the variable url to pass the video name)
I read your article but I don't know how to use the code. I tried to copy and past below my to lines and didn't work.
Please help me.
Thanks,
Thiago Prado
function initConnection() {
// Create a NetConnection
nc = new NetConnection();
// Define onStatus event handler
nc.onStatus = function(info) {
trace("Level: "+info.level+" Code: "+info.code);
// Initialize the stream after the connection is successful
if (info.code == "NetConnection.Connect.Success") {
trace("--- connected to: " + this.uri);
startStream(); //Inizialize the stream
}
};
// try to connect, to be changed with your app path
nc.connect("rtmp://localhost/vod");
}
function startStream() {
//Define stream and buffers parameters
stream_name="test_stream"; //your stream - How can I pass my variable url to stream_name?
startBufferLength=2; //keep this in the range 2-4+
expandedBufferLength=15; //arbitrarily high
// create a netstream
ns = new NetStream(nc);
// Define onStatus event handler
ns.onStatus = function(infoObject:Object) {
if (infoObject["code"]=="NetStream.Buffer.Full"){
ns.setBufferTime(expandedBufferLength);
trace("set expanded buffer");
}
if (infoObject["code"]=="NetStream.Buffer.Empty"){
ns.setBufferTime(startBufferLength);
trace("set start buffer");
}
}
// attach the NetStream to a video object
// change from videoObj to your istance name if needed
videoObj.attachVideo(ns);
ns.setBufferTime(startBufferLength);
ns.play(stream_name, 0);
}
initConnection();
stop();
BUFFERING FLASH 10
Any ideas on how to keep flash 10 from constantly stop,starting? I know more than the basic bear about computers and keep my rig very clear of crap that might hinder performance.I have a 5 year old gateway with a pentium 4 but it runs well.Any suggestions i might be missing? I love the player but at times buffering can be a problem...Thanks Bill
Buffering Loaded FLV's
Hi all,
Finally got what I needed to control FLV's with Scrubber , mute and so
forth. Have 2 questions that I am still wrestling with. The Tut is written,
a great one by GoToAndLearn.com, for one FLV loaded at runtime. I will have
several buttons loading different FLVs.replacing the one alreay there.
There is a great buffer function that targets the runtime FLV but I can't
figure out how to get it to apply each time a new FLV is loaded>
//buffer
ns.setBufferTime(15);
ns.onStatus =function(info) {
if(info.code == "NetStream.Buffer.Full") {
bufferclip._visible = false;
}
if(info.code == "NetStream.Buffer.Empty") {
bufferclip._visible = true;
theVideo.attachVideo(ns);
//two buttons
this.attachVideo_btn.onPress = function () {
ns.play("For Love of Country.flv");
}
this.attachVideo_btn2.onRelease = function () {
ns.play("http://amazingwebs.com/flinch/For Love of Country.flv");
}
}
other qucik questionis I need to unload the FLV from the stage when they are
finished and I can't seem to find any refrence code for this ..I've tried
this below the buffering codeand no joy.
if(info.code == "NetStream.Play.Stop") {
ns.close();
any help is greatly appreciated.
Buffering Script
Does anyone have the actionscript that will put a buffer on my swf? I create audio slideshows and this one has a big file size. Definately going to need some buffering...
Thanks so much!
Buffering Time Is Ignored
Hi,
on Flash CS3, on a movie with AS2.0, Flash 8 export settings I am using the FLVplayback component, and I am setting the Buffering time to 10 seconds, so when viewed online the flash movie pre-buffers the flv enough so it won't break while playing. The flv I a loading is 5MB so I need to do this prebuffering.
However, when tested online the ovie only waits half or one second and then plays... (for a technical reason I cannot test offline btw, so I always have to upload to the server).
How do I actually force the flv to be streamed for the time I ask and play after that time has passed?
If my problem is not clear enough I will reply asap with more info.
Thank you,
Konstantinos
link to screengrab of my properties window: http://www.vcdc.gr/images/penlix_images/properties.jpg
Edited: 05/15/2008 at 04:54:25 AM by KonstantinosPenlidis
Serverside Buffering ?
Hello Forum Members,
We have a problem with LiveStreaming and Lost Packages.
In our company we broadcast live streaming events in wmedia and also in flash.
For that we use a router which connects via ISDN to our fms2 platform.
We use ISDN Channels because of the need of a safe connection without net fluctuations and a good upload.
(wmedia 500k and flash 500k = 1Mbit/s upload)
So we use for one ISDN Wire both B Channels = 128kbit/s and overall 12 ISDN Wires = 1536kbit/s for both streams (a little bit more as needed for the overhead).
Wmedia works fine but flash makes problems - many frame drops / image freeze / bucking.
We think the problem is the connection to the fms over many different channels so that some packages of the one channel arrives the fms earlier than another - and so the fms dosen't get the stream in linear way.
The fms pushes the stream to the client - the client has the possibility to buffer the stream (setBufferTime()) but when the fms sends a faulty stream - the flashplayer buffers also this one.
Does anyone know if there is a possibilty to buffer the stream on the server before sending it to the clients.
Or is our approch wrong and there is another way to solve this problem.
Many thanx to All.
Daniel
FLV 20 Seconds Buffering
I set up a html page with a Flash streaming server. When I play the FLV movies on the html page, it plays well. However, when I play the movies on the roadrunner at home, it has 20 seconds buffering, and then it plays after 20 seconds.
Please let me know what causes the problem. It makes me real crazy. Here is the link.
http://www.pde.rpi.edu/Test/FlashFLV/lightwindow/index.html
Thanks for your consideration.
|