4 Replies Latest reply on Nov 21, 2009 3:30 PM by TobiasBeuving

    Video Display flv keeps playing after removing child

    Harvolev

      Hello, I made a custom class in AS3 in flex and in this class i have an mouse click event. when this event occurs I add a VideoDisplay object as such:

      vidScreen.x = 0;

      vidScreen.y = 15;

      vidScreen.width = this.width - this.borderThickness;

      vidScreen.height = this.height - (this.borderThickness + 15);

      vidScreen.source = "http://blablabla/msg0001.flv";

      vidScreen.play();

      I'm also using an override close function,
      all that the inherited function  does is:

       

      parent.removeChild(this);

      and my new override function calls this:

       


      super.closeMe(evnt);

      vidScreen.stop();                            //i've also tried putting this before calling super.closeMe()

      vidScreen.parent.removeChild(vidScreen);            //same as this.removeChild(vidScreen) just testing syntax

       

       

      The VideoDisplay and object instance seems to be removed ok, however i still get the audio from the flv playing until complete. I'm fairly new to flex development so i don't fully understand where to go to get the flv to stop playing before/after i remove the VideoDisplay object.

       

       

      Thanks for all your help