Thursday, 8 August 2013

Error #2025: The displayObject must be a child from the caller

Error #2025: The displayObject must be a child from the caller

Hello i am having troubles with a presentation that has some videos on a
frame,I have made some buttons to watch each video and when i move to the
next frame it's ok,the video is "gone" and i can read the info on that
frame correctly but the problem is when i try to go forward, it just don't
move, like if it was stuck or something. This is the code that i have:
var video10:Video=new Video();
var conexion10:NetConnection= new NetConnection();
miguel_btn.addEventListener(MouseEvent.CLICK,video_miguel);
function video_miguel(event:MouseEvent):void
{
var mensaje10:String="MIGUEL ANZALDUA"
puesto_txt.text=mensaje10
var mensaje10_1:String="HR MEXICO"
puesto2_txt.text=mensaje10_1
conexion10.connect(null);
var display10:NetStream= new NetStream(conexion10);
display10.play("Miguel_1.flv");
video10.attachNetStream(display10);
video10.x= 150;
video10.y= 250;
stage.addChild(video10);
display10.addEventListener(AsyncErrorEvent.ASYNC_ERROR,nomostrar10);
function nomostrar10(event:AsyncErrorEvent):void
{
}
}
stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown10);
function handleKeyDown10(ke:KeyboardEvent):void {
if(ke.keyCode == 39)
{
stage.removeChild(video10);
}
}
I read some answers here but i cant figure it out. I really dont know what
can it be happening. Thank you.

No comments:

Post a Comment