# Limiting the speed while browsing a list and displaying pictures accordingly

**URL:** https://forum.kirupa.com/t/limiting-the-speed-while-browsing-a-list-and-displaying-pictures-accordingly/199921
**Category:** flash
**Created:** [September 7, 2006, 8:03am UTC](https://forum.kirupa.com/t/limiting-the-speed-while-browsing-a-list-and-displaying-pictures-accordingly/199921 "2006-09-07T08:03:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Jayme65](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@Jayme65](https://forum.kirupa.com/u/Jayme65)
#### Post date: [September 7, 2006, 8:03am UTC](https://forum.kirupa.com/t/limiting-the-speed-while-browsing-a-list-and-displaying-pictures-accordingly/199921/1 "2006-09-07T08:03:24Z")

</div>

In a kind of image browser where navigation is done through keyboard’s arrow keys, I get the case where the user keeps the finger pressed on the arrow key.  
There, the list scroll faster and the screenshot doesn’t have time to draw that the next item is already called.

I can see that in that case the CPU goes from an usual 1% when browsing “gently”…to about 20% when leaving the arrow key pressed and raging through the list of images.

I was thinking to:

1. Force the scroll rate to max out at 10 items per second  
or
2. Only show pictures if key downs are \> 10fps  
or
3. Find a function that would wait for the last image to be drawn before continuing in the list.

So, to summarize:

- how to skip drawing pictures if the list is browsed to fast…or
- how to force the script to wait for the current image to be drawn before passing to the next item…or
- anything else that would fix this 😉  
[FONT=Arial][/FONT]  
[FONT=Arial]Thanks for any kind help!![/FONT]

Here is the script part containing the PNG loader, I’ve the feeling that this is the place where such a “limiter” should take place:

```auto

MC_loader.loadClip(displayArray[masterindex]".png", "screenshot_mc.screenHolder_mc");
//
//
//
MC_loader = new MovieClipLoader();
preload = new Object();
MC_loader.addListener(preload);
//
preload.onLoadError = function(targetMC) {
   MC_loader.loadClip("noscreen.png", targetMC);
};
preload.onLoadInit = function(targetMC) {
   targetMC._x = (385-(targetMC._width))/2;
   targetMC._y = (385-(targetMC._height))/2;
};
 

```
