# Dumb preloader

**URL:** <https://forum.kirupa.com/t/dumb-preloader/64995>\
**Category:** Uncategorized\
**Created:** [September 22, 2004, 3:26am UTC](https://forum.kirupa.com/t/dumb-preloader/64995 "2004-09-22T03:26:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlLife](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@rlLife](https://forum.kirupa.com/u/rlLife)\
**Post date:** [September 22, 2004, 3:26am UTC](https://forum.kirupa.com/t/dumb-preloader/64995/1 "2004-09-22T03:26:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 22, 2004, 4:19am UTC](https://forum.kirupa.com/t/dumb-preloader/64995/2 "2004-09-22T04:19:44Z")

</div>

```auto

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

```

i think that would do it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 22, 2004, 11:19am UTC](https://forum.kirupa.com/t/dumb-preloader/64995/3 "2004-09-22T11:19:06Z")

</div>

thanks very much!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 22, 2004, 4:05pm UTC](https://forum.kirupa.com/t/dumb-preloader/64995/4 "2004-09-22T16:05:58Z")

</div>

welcome

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 3:29am UTC](https://forum.kirupa.com/t/dumb-preloader/64995/5 "2004-09-30T03:29:42Z")

</div>

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.

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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 7:19am UTC](https://forum.kirupa.com/t/dumb-preloader/64995/6 "2004-09-30T07:19:09Z")

</div>

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

```

scotty(-:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 12:23pm UTC](https://forum.kirupa.com/t/dumb-preloader/64995/7 "2004-09-30T12:23:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 12:46pm UTC](https://forum.kirupa.com/t/dumb-preloader/64995/8 "2004-09-30T12:46:27Z")

</div>

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

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

```

scotty(-:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 1, 2004, 2:22am UTC](https://forum.kirupa.com/t/dumb-preloader/64995/9 "2004-10-01T02:22:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 1, 2004, 3:05am UTC](https://forum.kirupa.com/t/dumb-preloader/64995/10 "2004-10-01T03:05:16Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 1, 2004, 9:54am UTC](https://forum.kirupa.com/t/dumb-preloader/64995/11 "2004-10-01T09:54:37Z")

</div>

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

scotty(-:
