# If movie is loaded

**URL:** <https://forum.kirupa.com/t/if-movie-is-loaded/15858>\
**Category:** flash\
**Created:** [March 18, 2003, 8:46pm UTC](https://forum.kirupa.com/t/if-movie-is-loaded/15858 "2003-03-18T20:46:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lumsbr](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@lumsbr](https://forum.kirupa.com/u/lumsbr)\
**Post date:** [March 18, 2003, 8:46pm UTC](https://forum.kirupa.com/t/if-movie-is-loaded/15858/1 "2003-03-18T20:46:58Z")

</div>

Hi,

I want to verify if the movie.swf, that was loaded by a empty mc target, is already loaded. Something like this:

if (target.mymovie.isLoaded) {  
do something;  
}  
else {  
target.mymovie.loadMovie(“movie.swf”);  
}

Of course, isLoaded was invented by me (I think).

Thks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 18, 2003, 10:15pm UTC](https://forum.kirupa.com/t/if-movie-is-loaded/15858/2 "2003-03-18T22:15:11Z")

</div>

if(\_root.myMC.getBytesTotal() == \_root.myMC.getBytesLoaded())

Use that line of code 😉 It sees if your movieclip is equal in loading destinations. Gets the total bytes of the file… And gte the total bytes loaded up so far by the file and compares them to each other.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 19, 2003, 9:56am UTC](https://forum.kirupa.com/t/if-movie-is-loaded/15858/3 "2003-03-19T09:56:45Z")

</div>

hi,

playamarz is right, and there is one more way (the way you think) that is in MX you create a loder object. the same way you load XML.

Regards,  
ajoK  
[ajok@indiatimes.com](mailto:ajok@indiatimes.com)
