# Preload movies

**URL:** <https://forum.kirupa.com/t/preload-movies/37455>\
**Category:** Uncategorized\
**Created:** [December 10, 2003, 1:19pm UTC](https://forum.kirupa.com/t/preload-movies/37455 "2003-12-10T13:19:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danke](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Danke](https://forum.kirupa.com/u/Danke)\
**Post date:** [December 10, 2003, 1:19pm UTC](https://forum.kirupa.com/t/preload-movies/37455/1 "2003-12-10T13:19:47Z")

</div>

I’m trying to preload an imported movie, but it still somewhat fails.

The movie is not going to start until every single byte is loaded.  
Still when i try it online it starts running before it’s completely loaded.

The code for the preloader  
Starts:

loadMovie(“file”,target)

onClipEvent(enterFrame)  
{  
//textfield  
\_root.a = this.getBytesTotal();

if(this.getBytesLoaded() \< this.getBytesTotal())  
{  
if(\_global.sett == false)  
{  
this.stop();  
}  
\_root.a = this.getBytesLoaded() + “//” + this.getBytesTotal();  
}

if(this.getBytesTotal() \<= this.getBytesLoaded())  
{  
if(\_global.sett == false)  
{  
\_global.sett = true;  
this.play();  
}

\_root.a = “FINISHED!”  
}

}
