Avatar of walker6o9
walker6o9
 asked on

FLV Pre-loader

Here's the loading code from a flash video player I wrote a while back--I was wondering if there is an easy way to either add a pre-loader, or add something that checks to see if it has loaded or its progress loading.

Here's how I call it:

moviePlayer = attachMovie("moviePlayer", "moviePlayer", 9000)
                  moviePlayer._x = -3
                  moviePlayer._alpha = 0
                  //myMovie._alpha = 0
                  pathFinalNum = int(pathNum) + 1
                  //moviePlayer.contentPath = myMovie.folderPath+"/fullMovies/"+pathFinalNum+".flv"
                  myPath = myMovie.folderPath+"/fullMovies/"+pathFinalNum+".mov"
                  moviePlayer.path = myPath
                  moviePlayer.returnButton._alpha = 0

And then inside moviePlayer I have an FLVPlayer called video and this code:

var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
video.play(path);
this.createEmptyMovieClip("flv_mc", this.getNextHighestDepth());
flv_mc.attachAudio(my_ns);
var audio_sound:Sound = new Sound(flv_mc);

Adobe Flash

Avatar of undefined
Last Comment
blue-genie

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
blue-genie

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23