-
invoke function in as3
Hi,
Simple with as2... but i can't with as3..
How can i invoke a function in a parent mc... from one of its childs mc??
I've a child MC with 2 frames... in the second one i want to invoke a funtion mostrarHorario(), that is located in the parent MC of this...
Please... help me
thanks.
-
I think it's something like 'this.parent.functionName()', but I could be wrong.
-
We should put this on a t-shirt or something.
Code:
MovieClip(parent).functionName();
The issue is that the parent property is typed as DisplayObjectContainer which doesn't have the function you are trying to find, and is not dynamic either. Casting to MovieClip lets you try to call arbitrary properties because MovieClip is dynamic. If your parent is NOT a MovieClip, you will have to cast to whatever it actually is.
-
thanks,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|