# Loading external swf and controling from the main file issue

**URL:** <https://forum.kirupa.com/t/loading-external-swf-and-controling-from-the-main-file-issue/324310>\
**Category:** flash\
**Created:** [August 13, 2011, 8:13pm UTC](https://forum.kirupa.com/t/loading-external-swf-and-controling-from-the-main-file-issue/324310 "2011-08-13T20:13:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![webtechms](https://avatars.discourse-cdn.com/v4/letter/w/8e8cbc/32.png) [@webtechms](https://forum.kirupa.com/u/webtechms)\
**Post date:** [August 13, 2011, 8:13pm UTC](https://forum.kirupa.com/t/loading-external-swf-and-controling-from-the-main-file-issue/324310/1 "2011-08-13T20:13:35Z")

</div>

Hi,

Please find the attached file.

I am loading a swf named ball.swf in the main.fla. the swf is loading but not playing the next frame that i want.

I wrote this way:–

import flash.display.Loader;  
import flash.net.URLRequest;  
import flash.events.MouseEvent;  
import flash.display.MovieClip;

var swfLoad:Loader= new Loader();  
var urlReq:URLRequest = new URLRequest(“ball.swf”);

//addChild(swfLoad);

swfLoad.load(urlReq);

movie\_loader.addChild(swfLoad);

//trace(movie\_loader)

////////////////////////////////////////////

b1Btn.addEventListener(MouseEvent.CLICK, playSwf);

function playSwf(e:MouseEvent)  
{  
trace(“btn Clicked”);  
MovieClip(this.parent.parent).movie\_loader.main.gotoAndPlay(“start”);  
}

Please help…

Thanks
