# Controlling Externally Loaded SWF in AS3

**URL:** <https://forum.kirupa.com/t/controlling-externally-loaded-swf-in-as3/328778>\
**Category:** flash\
**Created:** [June 15, 2012, 4:54pm UTC](https://forum.kirupa.com/t/controlling-externally-loaded-swf-in-as3/328778 "2012-06-15T16:54:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yanathin](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@yanathin](https://forum.kirupa.com/u/yanathin)\
**Post date:** [June 15, 2012, 4:54pm UTC](https://forum.kirupa.com/t/controlling-externally-loaded-swf-in-as3/328778/1 "2012-06-15T16:54:33Z")

</div>

I’m a little new to AS3 so there are a few things that I’m trying to learn from knowing AS2 before. One of them is loading external SWF files. Here’s what I have going on… On the first frame of my main container file, I have this:

> var iwgResults = new Loader();  
> iwgResults.load(new URLRequest(“win1.swf”));  
> iwgContainer.addChild(iwgResults);

This loads up “win1.swf” and places the “iwgResults” child in my “iwgContainer” movie clip I already have set up. This works wonderfully and loads it in the right spot. The problem comes when I want to send a simple gotoAndPlay action to the main timeline of win1.swf. This is what I currently have later on in the timeline of my main container file:

> iwgContainer.iwgResults.gotoAndPlay(2);

Obviously this isn’t how it’s done in AS3, but that’s what I remember from AS2. What do I have to do differently when I have to tell win1.swf to gotoAndPlay from the main container file? I’d really appreciate the help… Thanks!
