Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Unload this MovieClip???

Status
Not open for further replies.

natg504

MIS
Dec 5, 2005
13
US
I loaded a movieclip with the following code. How can I unload it when i move to a different frame? Do I have to loop through all the xml images again & use UnloadClip or is there a better way?


StencilGalleryXML = new XML();
StencilGalleryXML.onLoad = init;
StencilGalleryXML.load("stencils.xml");
StencilGalleryXML.ignoreWhite = true;

var MCL = new MovieClipLoader();

function init(success) {
if (success == true) {
imgDesc = "";
rootNode = StencilGalleryXML.firstChild;
nbrStencils = rootNode.childNodes.length;
currentStencil = rootNode.firstChild;
for (i=0; i<nbrStencils; i++) {
mcName = "stencil"+i;
loadImage(currentStencil.attributes.swfURL, mcName, currentStencil.firstChild.nodeValue, i+1);
currentStencil = currentStencil.nextSibling;
}
}
}

function loadImage(imgSrc, clipName, desc, ctr) {
this.createEmptyMovieClip("parent", this.getNextHighestDepth());
newClip = parent.createEmptyMovieClip(clipName, this.getNextHighestDepth());
newClip.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
MCL.loadClip(imgSrc, newClip.container_mc);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top