# Simple action upon completion of loaded MC

**URL:** <https://forum.kirupa.com/t/simple-action-upon-completion-of-loaded-mc/198400>\
**Category:** Uncategorized\
**Created:** [August 24, 2006, 6:48pm UTC](https://forum.kirupa.com/t/simple-action-upon-completion-of-loaded-mc/198400 "2006-08-24T18:48:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xonlocust](https://avatars.discourse-cdn.com/v4/letter/x/439d5e/32.png) [@xonlocust](https://forum.kirupa.com/u/xonlocust)\
**Post date:** [August 24, 2006, 6:48pm UTC](https://forum.kirupa.com/t/simple-action-upon-completion-of-loaded-mc/198400/1 "2006-08-24T18:48:27Z")

</div>

hello-  
i’m trying do what seems like it should be simple, yet i am struggling. on my main timeline frame 1 - i load in an external .swf created in after effects. i would like this swf to play all the way through, then upon completion advance the main timeline to frame 2. here’s my AS on \_root.frame 1 that seems to immediately advance to \_root.frame 2. if i take out the onEnterFrame info, the MC loads in fine.

```auto

stop();
_root.holder.loadMovie("swfclip.swf");
_root.holder.onEnterFrame = function() {
   // your statements here
   if (_root.holder._currentframe==_root.holder._totalframes) {
    trace("last frame");
    _root.gotoAndStop(2);
}
}

```

thanks much in advance!
