Hi there,
I have a function in stage and need to call it from a child I do I do it...
// In main stage var child_mc:mcChild = new mcChild(); addChild(child_mc);
function parentFunction():void { trace("Do something here"); }
// inside mcChild
button_mc.addEventListener(MouseEvent.CLICK, callParentFunction);
function callParentFunction(e:MouseEvent):void { // here I need to call the function that is in the main stage. // I tried // parent.parentFunction(); // and // root.parentFunction(); but nothing works... }
thanks in advance...