# Load in external swf on click - button

**URL:** <https://forum.kirupa.com/t/load-in-external-swf-on-click-button/308421>\
**Category:** Uncategorized\
**Created:** [April 22, 2010, 3:17pm UTC](https://forum.kirupa.com/t/load-in-external-swf-on-click-button/308421 "2010-04-22T15:17:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DK1120](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@DK1120](https://forum.kirupa.com/u/DK1120)\
**Post date:** [April 22, 2010, 3:17pm UTC](https://forum.kirupa.com/t/load-in-external-swf-on-click-button/308421/1 "2010-04-22T15:17:50Z")

</div>

help please

was so easy in AS2 but seem really complicated in AS3, doh!

would someone please help?? I am trying to simply load in an external swf when I click a button. I have created a button on the stage called it ‘my\_button’

I can get the swf to load in automatically but I am not understanding the script for loading it in on a click…would someone pleae explain what script I need to have : (

this is the script I have for loading automatically

```auto
var loader_mc : Loader = new Loader();
var urlRequest : URLRequest = new URLRequest("photography.swf");
loader_mc.load(urlRequest);
addChild(loader_mc);

```

works great just would like to have it load in on a button click, can someone help

aaaarrrgghhhh!!!
