Skip to main content
Inspiring
December 14, 2009
Question

Removing UI Loader from the stage

  • December 14, 2009
  • 1 reply
  • 1020 views

I have 5 GoToframe activated UI loaders that appear on stage when a btn is clicked. All work fine except when either video galleries are clicked (there are two) . After the video gallery appears on stage any button clicked after that adds the next UI loader but the video gallery remains playing.

Do I use a removeEventListener?

Do I use on all buttons?

Create separate functions?

Any help which code and where to put????

here is the code to one of the galleries

this.stop();

btnGallImg.addEventListener(MouseEvent.CLICK, vgall2);

function vgall2(evt:Event):void {

    gotoAndStop("gallery2");

}

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 14, 2009

you must explicitly stop the stream.

mentlityAuthor
Inspiring
December 14, 2009

Let me be more specific, one of the UI loaders loads gallery.swf which is a streaming video. I need to know if I need to remove the UI loader from the stage , the video stream or both.

If so can you show me hwo to do?

rdervbgb

kglad
Community Expert
Community Expert
December 14, 2009

you need to explicitly stop the video stream in the loaded swf.  how you do that depends on how the stream is started.

for example, if you're using an flvplayback component with instance name flv, and your uiloader has instance name uiLDR, you could use:

MovieClip(uiLDR.content).flv.stop()