How do I remove eventListener on the main time line out of the loaded SWF?
nikolaig Jan 22, 2013 7:32 AMI have a set up where my main time line is keyframed out into labeled sections. In one of the labeled sections I load and SWF file using greensock SWF Loader. In the loaded SWF there is a command where I need to remove/addEventListeners on the main timeline of the flash file out of the loaded SWF.
The set up with "MovieClip(parent.parent.parent.parent)." works for navigation and loading and all other functions. However I get the error "1120: Access of unidetified property" if I want to use a line of code such as this:
//MovieClip(parent.parent.parent.parent).mainNav_buttonsGroup_mc.Applications_b tn_mc.removeEventListener(MouseEvent.ROLL_OVER, overHandler_Applications_btn);
Do I need to simply write up this EventListeners again in the loading SWF file (thus repeating them again as they are specified on the main time line already) or there is a better method to it?
appImgBtns_mc.testBtns2_mc.addEventListener(MouseEvent.CLICK, onClick_testBtns2);
function onClick_testBtns2(event:MouseEvent) :void {
/////////
////disabling the button onClick by removeEventListener
//MovieClip(parent.parent.parent.parent).mainNav_buttonsGroup_mc.Applications_btn_mc.removeEventListener(MouseEvent.ROLL_OVER, overHandler_Applications_btn);
//MovieClip(parent.parent.parent.parent).mainNav_buttonsGroup_mc.Applications_btn_mc.removeEventListener(MouseEvent.ROLL_OUT, outHandler_Applications_btn);
//MovieClip(parent.parent.parent.parent).mainNav_buttonsGroup_mc.Applications_btn_mc.removeEventListener(MouseEvent.CLICK, onClick_Applications_btn);
////coloring the button
MovieClip(parent.parent.parent.parent).Applications_btn_timeLine.play();
//Products_btn_mc
//MovieClip(parent.parent.parent.parent).mainNav_buttonsGroup_mc.Products_btn_mc.addEventListener(MouseEvent.ROLL_OVER, overHandler_Products_btn);
//MovieClip(parent.parent.parent.parent).mainNav_buttonsGroup_mc.Products_btn_mc.addEventListener(MouseEvent.ROLL_OUT, outHandler_Products_btn);
//MovieClip(parent.parent.parent.parent).mainNav_buttonsGroup_mc.Products_btn_mc.addEventListener(MouseEvent.CLICK, onClick_Products_btn);
//discoloring the button
MovieClip(parent.parent.parent.parent).Products_btn_timeLine.reverse();
MovieClip(parent.parent.parent.parent).sourceVar_AppPopUpsLoader_fromPrdcts="images/app_images/original/icysophistication_new_tl.swf";
MovieClip(parent.parent.parent.parent).gotoAndPlay("appPopUps_fromPrdcts");
}

