# Function onImageData

**URL:** <https://forum.kirupa.com/t/function-onimagedata/308332>\
**Category:** Uncategorized\
**Created:** [April 21, 2010, 5:47am UTC](https://forum.kirupa.com/t/function-onimagedata/308332 "2010-04-21T05:47:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FaraSD](https://avatars.discourse-cdn.com/v4/letter/f/b5ac83/32.png) [@FaraSD](https://forum.kirupa.com/u/FaraSD)\
**Post date:** [April 21, 2010, 5:47am UTC](https://forum.kirupa.com/t/function-onimagedata/308332/1 "2010-04-21T05:47:42Z")

</div>

Hello.

I am using a SildeShowPro for my project.  
I am trying to write an event listener to the onImageData event and create a conditional that will listen to the final image based on it’s number id.  
Basicly I neet my movie to go to frame 60 after my gallery loads in its last image (number 10).

Now, since I am not really familiar with the subject here is what I put together and it does not work…:

iData = new Object();  
iData.onImageData = function(eventObject):Void {  
if (eventObject.data.currentImage == 10) {  
gotoAndPlay(60);  
}  
}  
my\_ssp.addEventListener(“onImageData”, iData);

Can someone have a look and tell me where I went wrong??

Any input is appreciated. Thanks.
