-
Can't destroy player ("my_player.destroy()" doesn't work)
I call the video like this:
var my_player:Object;
var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("http://www.youtube.com/v/TXrc6BwGCXE?version=3"));
my_loader.contentLoaderInfo.addEventListener(Event .INIT, onLoaderInit);
function onLoaderInit(e:Event):void{
addChild(my_loader);
my_player = my_loader.content;
my_player.addEventListener("onReady", onPlayerReady);
}
function onPlayerReady(e:Event):void{
my_player.setSize(535,328);
my_player.x=270;
my_player.y=30;
my_player.cueVideoById("xxx",0);
}
And inside a function I have:
my_player.destroy();
But it doesn´t work and it's driven med crazy!
Thz in advance
-
What sort of thing is your player? Does it have a destroy method?
-
It's showing a youtube movie. I don't know much about this, but everywhere I look, it says that I can use "destroy()"?
-
Why not remove the 'my_loader' object?
removeChild(my_loader);
-
OFF COURSE - it works:-)
Thank you so much!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|