# Loading a SWF and setting .onpress

**URL:** <https://forum.kirupa.com/t/loading-a-swf-and-setting-onpress/165797>\
**Category:** flash\
**Created:** [October 14, 2005, 12:10am UTC](https://forum.kirupa.com/t/loading-a-swf-and-setting-onpress/165797 "2005-10-14T00:10:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoboLlama](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@RoboLlama](https://forum.kirupa.com/u/RoboLlama)\
**Post date:** [October 14, 2005, 12:10am UTC](https://forum.kirupa.com/t/loading-a-swf-and-setting-onpress/165797/1 "2005-10-14T00:10:17Z")

</div>

Is there a way to load a SWF and then turn it into a clickable button?

I’ve tried this:

loadMovie(“test.swf”, \_root.movieholder);  
\_root.movieholder.onPress = clicked;  
function clicked()  
{  
//Do stuff  
}

But this doesn’t make test.swf clickable. I think because it’s setting .onPress for \_root.movieholder, not for test.swf.

I’ve also tried:

loadMovieNum(“test.swf”, 5);  
Nut for some reason I cannot access \_level5

Any ideas?
