The supplied DisplayObject must be a child of the caller.
All,
I have a flash video that is basically a slide show from frame to frame using actionscript. Except on one of the frames I have inserted a .flv.
The problem is once I get past the frame with the .flv, when I navigate backwards from any frame, I get this error.
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at DarylSpeakerSeries_fla::MainTimeline/NextSpecial()
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at DarylSpeakerSeries_fla::MainTimeline/PreviousSpecial()
stop()
import fl.video.FLVPlayback;
import flash.ui.Keyboard;
import flash.events.KeyboardEvent;
var vid1:FLVPlayback = new FLVPlayback();
vid1.source = "flvs/PriorityMatrixFinal.flv";
addChild(vid1);
vid1.width = 650;
vid1.height = 433;
vid1.x = 70;
vid1.y = 70;
stage.addEventListener(KeyboardEvent.KEY_DOWN, NextSpecial);
Next_btn.addEventListener(MouseEvent.CLICK, NextSpecial);
Previous_btn.addEventListener(MouseEvent.CLICK, PreviousSpecial);
function NextSpecial(event)
{
vid1.stop();
removeChild(vid1);
gotoAndPlay("after_priority_vid");
}
function PreviousSpecial(event)
{
vid1.stop();
removeChild(vid1);
gotoAndPlay("before_Priority_vid");
}
Thanks in advance,
Anthony
