EventListener function in parent class
I have class ShowCase that inherite from my class ContentMC (that inherite from MovieC开发者_运维知识库lip). In the class ShowCase I have an EventListner that calls a function in the parent class ContentMC. But I get an error that says "Access of undefined property restoreMenuItem".
This is my eventlistner in ShowCase.as.
showcaseItem.addEventListener("CONTENTMCCLOSED", restoreMenuItem);
Here I get the error, it doesn't find the function restoreMenuItem.
The function restoreMenuItem is in ContenMC and looks like this.
public function restoreMenuItem(evt:Event):void
{
}
How do I call this function that's in the parent?
Thanks, Vincent
Use super statement.
showcaseItem.addEventListener("CONTENTMCCLOSED", super.restoreMenuItem);
精彩评论