# \[Flash8\] Calling functions from an externally loaded .swf

**URL:** <https://forum.kirupa.com/t/flash8-calling-functions-from-an-externally-loaded-swf/296800>\
**Category:** flash\
**Created:** [September 21, 2009, 1:34am UTC](https://forum.kirupa.com/t/flash8-calling-functions-from-an-externally-loaded-swf/296800 "2009-09-21T01:34:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prunetracy](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@prunetracy](https://forum.kirupa.com/u/prunetracy)\
**Post date:** [September 21, 2009, 1:34am UTC](https://forum.kirupa.com/t/flash8-calling-functions-from-an-externally-loaded-swf/296800/1 "2009-09-21T01:34:43Z")

</div>

Howdy guys, i’ve been spending the last few hours looking around for a more coherent answer as to how i should be executing functions from a .swf loader

basically, each time i hit a letter key on my keyboard, i want a new .swf to load. All of the external .swfs are looped, which is working fine, but for me to get this one to do what it should, i need to press another key to get it to advance to the next frame and play. Since i’m operating it from a loader, i can’t get the function to call.

so here’s my loader function:

```auto
on (keyPress "e") {
_root.createEmptyMovieClip("container", 1);
  
 // Container's positions on stage
   container._x = 0;
 container._y = 0;
 
 // Load external SWF
 container.loadMovie("heads.swf");

}

```

pretty simple. so when “heads.swf” comes up, i want to let it loop on the stop(); of frame 2, and then eventually hit and have it advance to frame 3 and play on:

```auto
 
on (keyPress "<Enter>") {
 nextFrame();
}

```

I’m really struggling with getting any further (i’m a n00b) so i’d love some help!

thanks guys,

-PT
