# Huge lagging problem

**URL:** https://forum.kirupa.com/t/huge-lagging-problem/194612
**Category:** flash
**Created:** [July 24, 2006, 11:50pm UTC](https://forum.kirupa.com/t/huge-lagging-problem/194612 "2006-07-24T23:50:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gregmax17](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gregmax17/32/2243_2.png) [@gregmax17](https://forum.kirupa.com/u/gregmax17)
#### Post date: [July 24, 2006, 11:50pm UTC](https://forum.kirupa.com/t/huge-lagging-problem/194612/1 "2006-07-24T23:50:47Z")

</div>

I am loading an external .swf file onto my stage. This is the script I am using:

createEmptyMovieClip(“village\_holder”, 1);  
village\_holder.loadMovie(url, 0);

onEnterFrame = function() {  
var bytes\_loaded = village\_holder.getBytesLoaded();  
var bytes\_total = village\_holder.getBytesTotal();

```
if(bytes_loaded &gt; 0) {
    var percent_loaded = bytes_loaded/bytes_total;
    
    if(percent_loaded == 1) {            
        nextFrame();
    }
}

```

}

It loads everything great, but it lags so bad when it plays!!! Am I loading everything prperly? The external .swf file is just under 200 kb, but that should be ok, right? I would appreciate any help if there is a way to prevent lagging. maybe a way to ask for more ram from the computer?

I really need any help/input on this problem, thanks.
