HOW do I make .FLV start from scratch from externally loaded .swf?

With the assistance of a very kind member of another forum, I have got as far as getting an .FLV to load into my API via its own .SWF.

Please click on “Animalia - Verse from the Zoo” to load the VideoPlayer .swf which contains the .FLV

I will add more functionality when I’ve solved this. Now that I have a Video Player which closes, the next set of hurdles to overcome are these:

Click “Close” with the .FLV playing and the sound keeps playing because the .FLV is still playing. Click “Close” with the .FLV paused and when you call the player back, it plays from the same spot. So, my tiny brain says it’s an “add/removeChild” issue. Obviously when happy user clicks “Close” and then re-loads by clicking “Animalia”, happy user wants the video to play from scratch. That’s what I want, anyway. Not from where it left off after clicking “Close”. I’ve made several attempts at adding a “remove FLV” object to the function and Event Dispatch method, but what I did is wrong because the code I put in removed the .FLV permanently and when you call the player back by clicking on “Animalia”, the .FLV does not play at all. I’m going round in circles looking for the correct NetStream/removeChild/unload.nsplay/etc/etc … AS3 coding and where to put it.


My .FLV video load object on “NewPlayer.swf” is:

var myVideo:Video = new Video(360, 264);

var nc:NetConnection = new NetConnection();
var ns:NetStream = new NetStream(nc);
ns.client = new Object();

myVideo.x = 217;
myVideo.y = 20;

The event dispatch method in the .FLV .swf is:

closeBut.addEventListener(MouseEvent.MOUSE_DOWN, unloadThisSkin);

function unloadThisSkin(event:MouseEvent):void {

//FI: dispatch event here instead of making new function
this.parent.dispatchEvent(new Event(Event.CLOSE));

pauseBut.visible = false
playBut.visible = true

//FI: corrected below - sorry for the confusion- AnimalSkinLoader is detected properly
trace('Im looking for '+ AnimalSkinLoader +' and I am '+this);


The code that listens for this event in the main API .swf is:

Animalia2.addEventListener(MouseEvent.MOUSE_DOWN, loadFromAnimalia);

function loadFromAnimalia(event:MouseEvent):void {



//FI NOTE: here is the closing function:
function removeAnimalia(event:Event = null):void{
trace(‘removing animalia’);

My questions is:- What is the correct coding to get the VideoPlayer .swf to unload its .FLV completely, SO THAT when a user clicks “Close”. Either with or without the .FLV playing, everything closes completely and when re-loaded, the video plays from scratch? Many thanks to all! CC