Dumb preloader

i guess i am the dumb one but. is there a way to make a if statement that only loads like 20% then it plays. i cant figure it out. always used things that wait for the whole movie to be loaded. i just want to give a head start of 20% to the movie.

rL


percentL= _root.getBytesLoaded();
percentT= _root.getBytesTotal();
comp= (percentL/percentT)*100;
if (comp=20){
	trace(comp);
}

i think that would do it.

thanks very much!

welcome

i just got a chance to take a look at this and here is what i came up with, but it does not seem to work.

percentL= _root.getBytesLoaded();
percentT= _root.getBytesTotal();
comp= (percentL/percentT)*100;
if (comp=90){
gotoAndPlay (2);
} else {
	gotoAndPlay (1);
}

if (comp==90){
gotoAndPlay (2);
}

scotty(-:

it still seems like it is just going without holding till 90 percent when i test it with bandwinth profile set to stream. is there maybe a better way to have the same result. all i need is a simple preloader that sits on frame one and holds the person there until a percent of the movie is loaded sort of like a buffer.

rL

Probably cause the value of comp never is exactly 90…
Try

if (comp>=90){
gotoAndPlay (2);
}

scotty(-:

it still does not work. do you know of any preloader that does this that you have seen. it does not need to be with this script. i justneed to be able to load a percent of the movie then have the movie go to frame 2

maybe it is not working because the content of my movie is a flv that i imported to the timeline. this project is a video, and i just want to make sure a percent of it is loaded before the viewer sees it,

But why not goto frame to if comp==100? (then you’re sure your flv is loaded)

scotty(-: