Jump to content
Search Community

How to call a function from a child MC

dougz test
Moderator Tag

Recommended Posts

Very basic TweenMax question here, but I can't find anything about it.

 

I need to have a button in a child movieclip that, when clicked, triggers a tween on a movieclip in the parent (root) timeline.

 

I've tried several (seemingly) logical options, but they are all throwing errors.

 

Here's one of the (incorrect) options, just to suggest what I'm trying to do:

close_btn.addEventListener(MouseEvent.CLICK,onClose);
function onClose(evt:MouseEvent):void{
	TweenMax.to(parent.what_btn, 5, {alpha:0});}

 

Can someone please post a simple AS3 example of how to do this?

 

Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...