# Reference from one child class to another?

**URL:** <https://forum.kirupa.com/t/reference-from-one-child-class-to-another/308757>\
**Category:** Uncategorized\
**Created:** [April 29, 2010, 1:53pm UTC](https://forum.kirupa.com/t/reference-from-one-child-class-to-another/308757 "2010-04-29T13:53:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Koki](https://avatars.discourse-cdn.com/v4/letter/k/5daacb/32.png) [@Koki](https://forum.kirupa.com/u/Koki)\
**Post date:** [April 29, 2010, 1:53pm UTC](https://forum.kirupa.com/t/reference-from-one-child-class-to-another/308757/1 "2010-04-29T13:53:16Z")

</div>

Hey everybody.

I have one custom class named **player** , which plays video from RTMP Server. It has property named \*\*cliptime:Number \*\*and it holds the video’s duration through the **metadata.duration** property.

I have other class named \*\*controlbar \*\*which holds the control bar for the video. I use **TweenMax.to** to move It’s video slider and I want the tween’s duration value to be the \*\*player \*\*class’ \*\*cliptime \*\*property. But I can’t get this value.

Both classes are child of \*\*framesCont \*\*class and are added to it. \*\*framesCont \*\*and \*\*controlbar \*\*extends Canvas class, and \*\*player \*\*extends Sprite if it matters.

P.S. I tried something like this:  
//In the player.as class:  
this.cliptime = metadata.duration; //\*\*cliptime \*\*variable holds the video’s duration

//In the controlbar.as class:  
time = Number(this.parent.getChildByName(‘player’).cliptime); //this is the variable which I’ll use to the \*\*myTween \*\*tween

myTween = new TweenMax(clipSlider, **time** , {x:830, paused:true, onUpdate:enlarge, onComplete:restart}); // this is the tween for the \*\*clipSlider \*\*video slider

Can anyone tell me how to reference from one child class to another?  
I hope I was clear enough…
