Flashpaper Unloading

Hello,

I am loading an E-Book in Flashpaper (swf) file over another flash document using the loadmovie command. I have the sizing and layout just right, have figured out how to add and remove the buttons I want on FP, but I just don’t know how to set it so the close button appears when its open. You can’t go back to the flash behind it and have to restart it.

Could someone help a begginer, self taught person?

Here is the loading command in the main flash document:

on (release) {
loader.loadMovie(“fpviewer.swf”,1);
}

fpviewer is has the following action script in it:

function loadFlashPaper(path_s, dest_mc, width_i, height_i, loaded_o) {
var intervalID = 0;
var loadFunc = function(){
dest_mc._visible = false;
var fp = dest_mc.getIFlashPaper();
if (!fp) {
return;
} else if (fp.setSize(width_i, height_i) == false) {
return;
} else {
clearInterval(intervalID);
var pages_i = fp.getNumberOfPages();
ctrlHolder_mc.swapDepths(_root.control_mc);
dest_mc._visible = true; // Now show the document
_root.control_mc._visible = true; // Now show the controller
loaded_o.onLoaded(fp);
}
}
intervalID = setInterval(loadFunc, 100);
dest_mc.loadMovie(path_s);
}

fp.showUIElement(“PrevNext”, true);
fp.showUIElement(“Print”, true);
fp.showUIElement(“Find”, true);
fp.showUIElement(“Tool”, true);
fp.showUIElement(“Pop”, true);
fp.showUIElement(“Zoom”, true);
fp.showUIElement(“Page”, true);
fp.showUIElement(“Overflow”,true);
fp.enableScrolling(true);
myFlashPaper.showUIElement(close, true)
}
_root.control_mc._visible = true;
var theDocMC_mc = this.createEmptyMovieClip(“theDocMC”,100);
var ctrlHolder_mc = this.createEmptyMovieClip(“ctrlHolder”,200);
theDocMC_mc._x = 16;
theDocMC_mc._y = 10;
loadFlashPaper(“spec.swf”, theDocMC_mc, 875, 1000, 2);

I thank you in advance for your response.

David