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…