Hello friendly Flashers...
I have a movieClip with a button that I created inside of my display class Thumbnail.as and I have a button function that interacts with it inside of my ui class ThumbnailController.as.
The current problem I'm having is that; in my ui class I can't target the movieClip playGlow which was created inside of my display class.
Code that creates the playGlow button inside my display class (Thumbnail.as)
public function playBtns():void {
playThumb = new PlayThumb;
playThumb.x = 642;
playThumb.y = 22;
playThumb.alpha = 1;
playGlow = new PlayGlow;
playGlow.x = 628;
playGlow.y = 8;
playGlow.alpha = 1;
}
public function buildRow ():void{
thumbNailRow.addChild(thumbLoader);
thumbNailRow.addChild(thumbTitle);
thumbNailRow.addChild(thumbText);
thumbNailRow.addChild(playGlow);
thumbNailRow.addChild(playThumb);
playThumb.addEventListener(MouseEvent.ROLL_OVER, rowRollOver);
addChild(thumbNailRow);
}
Now the code inside of my ui class (ThumbnailController.as)
public function rowRollOver(e:MouseEvent):void
{
dispatchEvent(new Event(Event.CHANGE, true ));
TweenPlugin.activate([TintPlugin]);
TweenLite.to(playGlow, .4, {alpha:.5, tint:0x99cc00});
}
This is the problem line: TweenLite.to(playGlow, .4, {alpha:.5, tint:0x99cc00});
It will only work when like this: TweenLite.to(this, .4, {alpha:.5, tint:0x99cc00});
But if I use this, the entire thumbNailRow movieClip will tint, I just want to tint the playGlow movieClip which is inside of thumbNailRow, but I don't know how to target that specifically. I get the 1120: Access of undefined property playGlow otherwise.
How can I pass the instance of playGlow into my ui class so I can target that movieClip with my tint tween?