# OnMetaData and Duration

**URL:** <https://forum.kirupa.com/t/onmetadata-and-duration/271077>\
**Category:** flash\
**Created:** [September 18, 2008, 5:38am UTC](https://forum.kirupa.com/t/onmetadata-and-duration/271077 "2008-09-18T05:38:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwiniquit](https://avatars.discourse-cdn.com/v4/letter/i/7993a0/32.png) [@iwiniquit](https://forum.kirupa.com/u/iwiniquit)\
**Post date:** [September 18, 2008, 5:38am UTC](https://forum.kirupa.com/t/onmetadata-and-duration/271077/1 "2008-09-18T05:38:23Z")

</div>

Is there any way to add parameters to onMetaData?

I have a variable in a movieclip that needs to hold the duration but I can’t figure out how to make it so the function see’s the movieclip.

Here’s the idea:

```auto
function runVideo():void 
{
    var totalLength:unit;
    theMovieClip.totalLength = 0;
}

function theMeta(data:Object):void
{
    theMovieClip.totalLength = data.duration;
}

```

So basically, how can I make it so theMovieClip.totalLength equals data.duration. I can’t have it be a global variable because there will be multiple of movieclips/videos using this function and variable.

Any help would be greatly appreciated!
