# onReleaseOutside in not working in Child SWF

**URL:** https://forum.kirupa.com/t/onreleaseoutside-in-not-working-in-child-swf/311973
**Category:** flash
**Created:** [July 21, 2010, 1:44pm UTC](https://forum.kirupa.com/t/onreleaseoutside-in-not-working-in-child-swf/311973 "2010-07-21T13:44:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![vikramkute](https://avatars.discourse-cdn.com/v4/letter/v/90ced4/32.png) [@vikramkute](https://forum.kirupa.com/u/vikramkute)
#### Post date: [July 21, 2010, 1:44pm UTC](https://forum.kirupa.com/t/onreleaseoutside-in-not-working-in-child-swf/311973/1 "2010-07-21T13:44:01Z")

</div>

Hi Guys,

I have “sq\_mc” and “status\_txt” on Stage.

I am using equivalent of onReleaseOutside which is:  
this.stage.addEventListener (MouseEvent.MOUSE\_UP, mouseUpHandler);

It works fine. but when I open this SWF in another SWF it doesn’t work… !! ![](http://forum.kirupa.com/uploads/kirupa/525/d5236136df0858f4.gif)

when I press mouse on sq\_mc and release outside, counter stops.

but I want to stop the counter when I press mouse on sq\_mc and release outside where my SWF which contains sq\_mc is in another SWF in browser.

in simple ways…  
if path of SWF is “browser \>\> SWF” it works.

but if path is “browser \>\> SWF1 \>\> SWF2 \>\> SWF3” it wont works. ![](http://forum.kirupa.com/uploads/kirupa/2021/918d0e04cfe70cb9.gif)  
(in this SWF1 is preloader, SWF2 is SWF loaded in preloader, SWF3 is SWF which contains sq\_mc)

I have tried ADDED\_TO\_STAGE method. but that also doesn’t work.  
What am I doing wrong?

```auto
var excelClickTimer:Timer;
var i:int;
addEventListener (Event.ADDED_TO_STAGE,onAddedToStage);

function onAddedToStage (event:Event):void
{
    removeEventListener (Event.ADDED_TO_STAGE,onAddedToStage);
    stage.addEventListener (MouseEvent.MOUSE_UP, mouseUpHandler);//counter stops!! works well. 
    sq_mc.addEventListener (MouseEvent.MOUSE_DOWN, clickHandlerDownrows);// Click on this and release Mouse Outside swf. 
}

function mouseUpHandler (e:MouseEvent)
{
    excelClickTimer.stop ();
}
function mouseUpHandler1 (e:Event)
{
    excelClickTimer.stop ();
}

function clickHandlerDownrows (e:MouseEvent):void
{
    excelClickTimer = new Timer(100);
    excelClickTimer.addEventListener (TimerEvent.TIMER,select);
    excelClickTimer.start ();
}
function select (e:TimerEvent):void
{
    i += 1;
    status_txt.text=i.toString();
}

```
