# A script in this movie is causing Macromedia Flash Player to run slowly

**URL:** <https://forum.kirupa.com/t/a-script-in-this-movie-is-causing-macromedia-flash-player-to-run-slowly/157096>\
**Category:** Uncategorized\
**Created:** [July 29, 2005, 9:20pm UTC](https://forum.kirupa.com/t/a-script-in-this-movie-is-causing-macromedia-flash-player-to-run-slowly/157096 "2005-07-29T21:20:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emdiesse](https://avatars.discourse-cdn.com/v4/letter/e/c0e974/32.png) [@Emdiesse](https://forum.kirupa.com/u/Emdiesse)\
**Post date:** [July 29, 2005, 9:20pm UTC](https://forum.kirupa.com/t/a-script-in-this-movie-is-causing-macromedia-flash-player-to-run-slowly/157096/1 "2005-07-29T21:20:06Z")

</div>

A script in this movie is causing Macromedia Flash Player to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?  
[center][Yes] [No][/center]

I have searched and searched, checked and double checked, however, i can’t find the error.  
[AS]  
BytesLoaded = Math.round(this.getBytesLoaded());  
BytesTotal = Math.round(this.getBytesTotal());  
PercentDec = BytesLoaded/BytesTotal;  
TotalPercent = Math.round(PercentDec_100)  
this.Percent = Math.round(PercentDec_100)+"%";  
if (BytesLoaded == BytesTotal) {  
this.gotoAndPlay(3);  
}  
[AS]

I managed to narrow it down to this; I am pretty sure it is something with this:

[AS]  
if (BytesLoaded == BytesTotal) {  
this.gotoAndPlay(3);  
}  
[AS]

Does it need to be within an onClipEvnt handler?

By searching on kirupa, i have found that it is a result of an endless loop ussually.

I can’t see an endless loop?
