# onEventHandler question

**URL:** <https://forum.kirupa.com/t/oneventhandler-question/320552>\
**Category:** flash\
**Created:** [March 26, 2011, 7:05pm UTC](https://forum.kirupa.com/t/oneventhandler-question/320552 "2011-03-26T19:05:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![liner986](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@liner986](https://forum.kirupa.com/u/liner986)\
**Post date:** [March 26, 2011, 7:05pm UTC](https://forum.kirupa.com/t/oneventhandler-question/320552/1 "2011-03-26T19:05:12Z")

</div>

Hi,  
i have produced a code for an online gallery which loads an image into a movie clip called frame\_mc. on mouse click the loader big\_pic loads a requested photo and then displays it on frame\_mc (remove/add child etc).

function thumb2click(event:MouseEvent):void {  
big\_pic.load(img2Req);  
frame\_mc.removeChildAt(1);  
frame\_mc.addChild(big\_pic);  
caption\_txt.text = caption2;  
caption\_txt2.text = caption2\_2;  
}

function thumb3click(event:MouseEvent):void {  
big\_pic.load(img3Req);  
frame\_mc.removeChildAt(1);  
frame\_mc.addChild(big\_pic);  
caption\_txt.text = caption3;  
caption\_txt2.text = caption2\_3;  
}

Now im trying to add a transition effect to the photo change, such that when loading of big\_pic is finished, the transition animation is displayed. how would i write this event handler and wat commands do i need?
