This is a discussion on "Preload Flash Video" within the Flash & Multimedia Forum section. This forum, and the thread "Preload Flash Video are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Preload Flash Video
|
||
| Notices |
![]() |
|
|
LinkBack (1) | Thread Tools |
|
||||
|
Re: Preload Flash Video
Ok I edited the other file. I specified a buffer time of 15 seconds. You could have set a loader strip if you wanted to but that would have been more work. Here is the URL to the new file.
http://www.jacobhaug.com/webforumz/f...ideo_test.html I will PM you the URL to the edit file. |
|
|||
|
Re: Preload Flash Video
Hi,
Thanks a lot for your work. I didn't find that I could edit anything in the Flash file though, (I guess I needed to purchase that video player). But I did find a script which I have been trying to use. var connection_nc:NetConnection = new NetConnection(); connection_nc.connect(null); var stream_ns:NetStream = new NetStream(connection_nc); my_video.attachVideo(stream_ns); stream_ns.setBufferTime(10) stream_ns.play("Chap1_WMV.flv"); //this.createTextField("loaded_txt", this.getNextHighestDepth(), 200, 10, 160, 22); var loaded_interval:Number = setInterval(checkBytesLoaded, 500, stream_ns); function checkBytesLoaded(my_ns:NetStream) { var pctLoaded:Number = Math.round(my_ns.bytesLoaded / my_ns.bytesTotal * 100); loaded_txt.text = pctLoaded+"% loaded" ; _root.progressBar_mc.bar_mc._xscale = pctLoaded; if (pctLoaded >= 80) { clearInterval(loaded_interval); _root.progressBar_mc._alpha = 0; _root.my_video._x = 0; loaded_txt.text = "" ; } } We did a thing so we could make the video visible only after it had loaded completely. Problem is although this "preloader" shows the progress of the loading video, and the buffer delays when it starts playing its not actually functioning as a preloader at all, because the preloader is making no difference to when the movie plays. I am guessing that I can't actually preload the Flash video? Or perhaps there is just a more complicated way to do it. To reiterate, I don't want the flash video to play until it has loaded, and if I delay it with the buffer, it's not preloading it. With some of my shorter movies I could just import them actually onto the timeline in Flash and preload with a normal flash preloader but has problems when I had a 5mb flv file. Thanks |
|
||||
|
Re: Preload Flash Video
There is a way to pre-load a video, and not allow the video to play until it is loaded. Here are some example solutions...
1. Set the buffer to the length of the video you want to preload, this will stop the video from playing until it has finished. However, I would recommend only buffering a short period (5 seconds) and then playing the video, you could cover the video with a buffering message until the buffer fills. Here is an example code for solutions number 1... If you're using an FLVPlayback then just set the buffer length in seconds under the component inspector. If you're using netstream:
Next Solution.... 2. Ok next, here is macromedia's solution, to creating a preloader with macromedia flash... http://livedocs.macromedia.com/flash...=00001573.html Both solutions will work; I have not used either solution. But the action script seems to be valid, so good luck!! Let me know if I can assist you any further. |
|
||||
|
Re: Preload Flash Video
Here are some example files i thought you should take a look at. You might be able to use some of the actionscript from the files. Here are the URL's to the two files...
http://www.JacobHaug.com/webforumz/f...yer_source.zip http://www.JacobHaug.com/webforumz/f...-preloader.zip |
![]() |
| Tags |
| flash preloader, flash, flash progress bar |
| Thread Tools | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.webforumz.com/flash-and-multimedia-forum/8517-preload-flash-video.htm
|
||||
| Posted By | For | Type | Date | |
| ÀÏÎÐÒ: flash load video | Post #9 | Refback | Nov 21st, 2006 18:42 | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Loading video into flash | Penny | Flash & Multimedia Forum | 8 | Jul 25th, 2007 15:16 |
| Flash Video (.flv) - help needed | moraljustice | Flash & Multimedia Forum | 6 | Jun 7th, 2007 14:40 |
| Flash Video, NEED HELP! | skilladesigns | Flash & Multimedia Forum | 1 | Apr 25th, 2007 18:33 |
| Flash Video Tutorials | tdefreitas | Flash & Multimedia Forum | 3 | Oct 9th, 2006 21:46 |
| Preload flash file in one html and start showing in other | vikaspa | Introduce Yourself | 1 | Apr 19th, 2006 15:36 |