3 Replies Latest reply: Apr 12, 2012 4:33 AM by _spoboyle RSS

    unable to remove stage event listener from child swf

    Amit Shakya Community Member

      Hi all I have made index swf which is loading other child swf's into index these swf's are images.swf, portfolio.swf, about.swf etc.., I have made 2 public function in each swf which is construct or diconstruct.

      when i unload any swf then i play disconstruct public function of every child swf.. I stuck in when I remove stage event listener of every child swf then it shows error..

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

                at library_fla::MainTimeline/diconstruct()

       

      here my diconstruct function of all child swf

       

      function diconstruct(){

                pic.video.gotoAndStop(1)

                stage.removeEventListener(Event.RESIZE, sizeListener);

      }

       

       

      how i delete stage event listener of every child swf..???? I feel it is showing error because it is trying to remove event listener from index.swf