# Need help in actionscript 3 function

**URL:** https://forum.kirupa.com/t/need-help-in-actionscript-3-function/294316
**Category:** Uncategorized
**Created:** [August 12, 2009, 11:00am UTC](https://forum.kirupa.com/t/need-help-in-actionscript-3-function/294316 "2009-08-12T11:00:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![daforumde](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@daforumde](https://forum.kirupa.com/u/daforumde)
#### Post date: [August 12, 2009, 11:00am UTC](https://forum.kirupa.com/t/need-help-in-actionscript-3-function/294316/1 "2009-08-12T11:00:52Z")

</div>

hi i need help in the following code

```auto
about.addEventListener(MouseEvent.CLICK, newPage);
hot_mc.addEventListener(MouseEvent.CLICK, newPage);
services_mc.addEventListener(MouseEvent.CLICK, newPage);
partner_mc.addEventListener(MouseEvent.CLICK, newPage);
contact_mc.addEventListener(MouseEvent.CLICK, newPage);

function newPage(e:MouseEvent):void
{   
   var btn1Outro:Tween = new Tween(container, "height", Strong.easeOut, 390, 0, 1, true);
   btn1Outro.addEventListener(TweenEvent.MOTION_FINISH, runBtn1Transition);
   currentPage = MovieClip(e.currentTarget);
   function runBtn1Transition (event:TweenEvent):void 
   {
      container.removeChild(currentPage.targetMC);
      //currentPage = MovieClip(e.currentTarget);
      container.addChild(currentPage.targetMC);
      var btn1Intro:Tween = new Tween(container, "height", Strong.easeOut, 0, 390, 1, true);
   }
}

```

here the problem lies in this line i think

```auto
currentPage = MovieClip(e.currentTarget);

```

here i want to access e from newPage function so how can i do this
