This content has been marked as final.
Show 5 replies
-
1. Re: Preload an external flv
YTCollege May 7, 2007 9:44 AM (in response to YTCollege)*bump*
Help? -
2. Re: Preload an external flv
JayCBRF4 May 7, 2007 12:21 PM (in response to YTCollege)What is the code you found? I assume it would go in frame 1 of your movie and then call the progress bar to load the external flv... -
3. Re: Preload an external flv
YTCollege May 8, 2007 5:23 AM (in response to JayCBRF4)I received the code from the Flash help and I assume it does go on the first frame. However, the code it gives draws the preloader using API, and I have had no luck with that. To do it where I make the preloader, is that much different? Here is the code I use to preload an internal file:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent * 100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
Can I modify this to preload an external flv, or even an external swf? -
4. Re: Preload an external flv
Balaakrs May 8, 2007 5:58 AM (in response to YTCollege)"same"- what you have to do is you have to calculate for net stream
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
this.createEmptyMovieClip("snd", 0);
snd.attachAudio(ns);
audio = new Sound(snd);
audio.setVolume(80);
videoDisplay.attachVideo(ns);
progressBar.onEnterFrame = function() {
loaded = ns.bytesLoaded;
total = ns.bytesTotal;
if (loaded == total && loaded>1000) {
loa._xscale = 100;
trace(loa._width);
delete this["onEnterFrame"];
} else {
loa._xscale = int(loaded/total*100);
}
}
don't use this code plainly, modify to your stting and mc names. If you get any doudts first look at my works and understand that then you do as per your needs.i have uploaded my flash video player. download and check . if you understand then no probs . else serch for another good programmer.
http://www.esnips.com/doc/c832914f-5a7c-4be3-b1dd-d73353d5d54a/player -
5. Re: Preload an external flv
YTCollege May 8, 2007 8:53 AM (in response to Balaakrs)It says it's a broken link.
