# External .swf + MouseEvent + stage

**URL:** <https://forum.kirupa.com/t/external-swf-mouseevent-stage/242089>\
**Category:** flash\
**Created:** [October 22, 2007, 12:06pm UTC](https://forum.kirupa.com/t/external-swf-mouseevent-stage/242089 "2007-10-22T12:06:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan0](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@Dan0](https://forum.kirupa.com/u/Dan0)\
**Post date:** [October 22, 2007, 12:06pm UTC](https://forum.kirupa.com/t/external-swf-mouseevent-stage/242089/1 "2007-10-22T12:06:00Z")

</div>

Hey,  
I have my website as many .as classes. In these classes when I want to check the mouse is pressed I simple do:

```auto
addEventListener(MouseEvent.MOUSE_DOWN,funcDown);

```

However, I am loading in an external .swf into my website. In the external file I have:

```auto
addEventListener(Event.ENTER_FRAME,funcFrame);

```

which works fine. But when I want to check if the mouse is pressed the only way I can get it working in the .swf is to use:

```auto
stage.addEventListener(MouseEvent.MOUSE_DOWN,funcDown);

```

which works fine when its running by itself, but when loaded into the website the “stage” bit creates an error and the script fails to run.  
Im not sure what the work around is, or exactly what the problem is in accessing the stage class from an external file.

Thanks for reading and helping,  
Dan
