# Call function in function

**URL:** <https://forum.kirupa.com/t/call-function-in-function/321508>\
**Category:** flash\
**Created:** [April 21, 2011, 12:14pm UTC](https://forum.kirupa.com/t/call-function-in-function/321508 "2011-04-21T12:14:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wouter11](https://avatars.discourse-cdn.com/v4/letter/w/59ef9b/32.png) [@wouter11](https://forum.kirupa.com/u/wouter11)\
**Post date:** [April 21, 2011, 12:14pm UTC](https://forum.kirupa.com/t/call-function-in-function/321508/1 "2011-04-21T12:14:52Z")

</div>

Hi all,

I have a bit of a problem. Im starting in flash, and well now i want to call a function in a function. Because i’ve got multiple album arts and when the mouse over they have to zoomIn. Well i already got the zoomIn function but if i use that on my albums they both gonna zoom in if i add them in the same function. So i need to call the album art number first and then in this function add my zoomIn function but i can’t get it to work. Here is my part of the code:

```auto

import com.greensock.TweenLite;

addEventListener(MouseEvent.ROLL_OVER, Albumart1);
Cdcover1.addEventListener(MouseEvent.ROLL_OVER, zoomIn);
Cdcover1.addEventListener(MouseEvent.ROLL_OUT, zoomOut);

function Albumart1 (event:MouseEvent):void{
	//here is where i need to call my zoomIn function but i don't know how.
}

function zoomIn(event:MouseEvent):void{
   TweenLite.to(Cdcover1, 0.75, {scaleX:1.2, scaleY:1.2});
}

function zoomOut(event:MouseEvent):void{
   TweenLite.to(Cdcover1, 0.75, {scaleX:1, scaleY:1});
}

```

Greets
