# Flash question about detecting if a movie is loaded in a level

**URL:** <https://forum.kirupa.com/t/flash-question-about-detecting-if-a-movie-is-loaded-in-a-level/192740>\
**Category:** Uncategorized\
**Created:** [June 30, 2006, 4:55pm UTC](https://forum.kirupa.com/t/flash-question-about-detecting-if-a-movie-is-loaded-in-a-level/192740 "2006-06-30T16:55:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Line](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@Line](https://forum.kirupa.com/u/Line)\
**Post date:** [June 30, 2006, 4:55pm UTC](https://forum.kirupa.com/t/flash-question-about-detecting-if-a-movie-is-loaded-in-a-level/192740/1 "2006-06-30T16:55:21Z")

</div>

Flash question about detecting if a movie is loaded in a level.

I want to have it that on click of any button, that it should detect if swf/musicloader.swf is currently loaded in level 2.

If not it should load it.

Here’s my example of bad scripting of what I think it should logically look like (i dont know actionscript):  
on (release){  
ifMovieLoaded(“swf/musicloader.swf”, 2);  
do nothing  
if not loaded  
loadMovieNum(“swf/musicloader.swf”, 2);  
}

BTW the swf/ is the subdirectory where the .swf is located just in case you’re wondering why it’s there.

* * *

If possible, an even shorter version of the same request would be  
on (release){  
if not loaded(“swf/musicloader.swf”, 2);  
loadMovieNum(“swf/musicloader.swf”, 2);  
}

Because naturally if it’s loaded it will do nothing. I think AS is that smart right?

-Line
