# Buffer

**URL:** https://forum.kirupa.com/t/buffer/118489
**Category:** Uncategorized
**Created:** [August 5, 2004, 10:31pm UTC](https://forum.kirupa.com/t/buffer/118489 "2004-08-05T22:31:39Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![JuzzMan](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@JuzzMan](https://forum.kirupa.com/u/JuzzMan)
#### Post date: [August 5, 2004, 10:31pm UTC](https://forum.kirupa.com/t/buffer/118489/1 "2004-08-05T22:31:39Z")

</div>

Hello Again.

I posted a few threads on this subject before but I still haven’t had any luck achieving what I want to achieve.

I am trying to create a buffer that loads a percentage of a movie then starts playing at say 20%. So, the other 80% of the movie is being loaded in the background while the 20% at the start of is playing. A good example of this is:

[http://www.loantoolbox.com/flash/exclusive.html](http://www.loantoolbox.com/flash/exclusive.html)  
[SIZE=1](You need to click on one of the headings to see the buffer)[/SIZE]

I need the same thing to happen. I am using a movie playback controller similar to this also. The movie playback controller works fine I just need a bit of script that tells the movie to start playing at 20% instead of 100%.

Any help with this would be a great help because I am totally stumped :-/

---

<div class="post-metadata">

### Author: ![jedinitex](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jedinitex](https://forum.kirupa.com/u/jedinitex)
#### Post date: [August 5, 2004, 10:41pm UTC](https://forum.kirupa.com/t/buffer/118489/2 "2004-08-05T22:41:28Z")

</div>

i’m not sure but would this work?

```auto

if ((bytes_loaded)/5 == bytes_total) {
	this.gotoAndPlay(frame);
}

```

---

<div class="post-metadata">

### Author: ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)
#### Post date: [August 5, 2004, 10:43pm UTC](https://forum.kirupa.com/t/buffer/118489/3 "2004-08-05T22:43:45Z")

</div>

please keep your questions to one forum. Thanks.

---

<div class="post-metadata">

### Author: ![JuzzMan](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@JuzzMan](https://forum.kirupa.com/u/JuzzMan)
#### Post date: [August 5, 2004, 10:47pm UTC](https://forum.kirupa.com/t/buffer/118489/4 "2004-08-05T22:47:24Z")

</div>

Sorry about that. I will do in future!!! (Just trying to maximize viewers)

---

<div class="post-metadata">

### Author: ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)
#### Post date: [August 5, 2004, 10:50pm UTC](https://forum.kirupa.com/t/buffer/118489/5 "2004-08-05T22:50:51Z")

</div>

I know 😉 – its just frowned upon and creates clutter and redundancy. No biggie. Thanks for understanding :pleased:

---

<div class="post-metadata">

### Author: ![jedinitex](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jedinitex](https://forum.kirupa.com/u/jedinitex)
#### Post date: [August 5, 2004, 10:53pm UTC](https://forum.kirupa.com/t/buffer/118489/6 "2004-08-05T22:53:13Z")

</div>

Juzz, does that work or am i just way off?

---

<div class="post-metadata">

### Author: ![JuzzMan](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@JuzzMan](https://forum.kirupa.com/u/JuzzMan)
#### Post date: [August 5, 2004, 11:21pm UTC](https://forum.kirupa.com/t/buffer/118489/7 "2004-08-05T23:21:37Z")

</div>

Thanks for the Quick reply :}

_Ok, This is what I had._

if(percLoaded != 100){  
gotoAndPlay (\_currentframe-1);  
} else {  
\_parent.\_parent.play();  
}

_This is with your code added._

if ((bytes\_loaded)/5 == bytes\_total) {  
this.gotoAndPlay(\_currentframe-1);  
} else {  
\_parent.\_parent.play();  
}

They both had the same result. The movie just loaded as normal. The thing is I will need to tie it in with the movie playback controller.

See Thread:  
[http://www.kirupaforum.com/forums/showthread.php?p=560599#post560599](http://www.kirupaforum.com/forums/showthread.php?p=560599#post560599)

---

<div class="post-metadata">

### Author: ![jedinitex](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jedinitex](https://forum.kirupa.com/u/jedinitex)
#### Post date: [August 6, 2004, 2:33am UTC](https://forum.kirupa.com/t/buffer/118489/8 "2004-08-06T02:33:37Z")

</div>

sorry, that should be

```auto

if ((bytes_loaded) == **(bytes_total)/5**) {
this.gotoAndPlay(_currentframe-1);
} else {
_parent._parent.play();
}

```
