I have an xml loaded thumb scroller which stays on the screen when I exit the frames where it exists.
Here is the set up which I have tried to fix this issue. It was suggested that I put an mc on the frames with the image scroller and call it dummy_mc.
Then I put the code on the frames which are not supposed to have thumb scroller:
dummy_mc.visible = false;
function removeScrollerF2(e:Event=null):void{
if(scroller){//prevents a problem if you were to use the same navigation code after the scroller is removed
scroller.removeEventListener(Event.ENTER_FRAME, moveScrollerThumbs);
removeChild(scroller);
scroller=null; // if, when you want to re-create your scroller, it fails to be re-created, remove this line of code.
}
trace("dummy2_mc works on null");
}
dummy_mc.addEventListener(Event.REMOVED_FROM_STAGE,removeScrollerF2);
---------------------------------------------------------------------- -----------------------------------------------------
I have this argument error in the output panel:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at acolyte51c_AppsPopUpsThumbs_fla::mainsite_mc_2/removeScrollerF2()[aco lyte51c_AppsPopUpsThumbs_fla.mainsite_mc_2::frame73:399]
at flash.display::MovieClip/gotoAndPlay()
at acolyte51c_AppsPopUpsThumbs_fla::mainsite_mc_2/gotoFrame2()[acolyte51 c_AppsPopUpsThumbs_fla.mainsite_mc_2::frame73:372]
This is the frame73:399
removeChild(scroller);