# Moving on after external SWF is finished

**URL:** <https://forum.kirupa.com/t/moving-on-after-external-swf-is-finished/96158>\
**Category:** Uncategorized\
**Created:** [December 5, 2003, 4:24pm UTC](https://forum.kirupa.com/t/moving-on-after-external-swf-is-finished/96158 "2003-12-05T16:24:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onash](https://avatars.discourse-cdn.com/v4/letter/o/dec6dc/32.png) [@Onash](https://forum.kirupa.com/u/Onash)\
**Post date:** [December 5, 2003, 4:24pm UTC](https://forum.kirupa.com/t/moving-on-after-external-swf-is-finished/96158/1 "2003-12-05T16:24:13Z")

</div>

I am loading a movie into a container and positioning it. That part works fine. I am struggling with get Flash to evaluate the length of the loaded movieclip and moving to the nextFrame once it’s done.

Anythoughts?

//loading external swf into empty clip  
this.createEmptyMovieClip(“myContainer\_mc”, 2);  
myContainer\_mc.\_x = 0;  
myContainer\_mc.\_y = 200;  
myContainer\_mc.loadMovie(“child.swf”);  
stop();

//testing for loaded movie length  
this.onEnterFrame = function() {  
LMcurrentframe = (this.myContainer\_mc.getBytesLoaded());  
LMtotalframe = (this.myContainer\_mc.getBytesTotal());  
if (LMcurrentframe\>=LMtotalframe) {  
\_parent.nextFrame();  
this.unloadMovie();

```
}		

```

}
