Hope I am not taking you in too deep or off course but I think you can have
one MovieCLipLoader. Place the code in a function and call it from the menu
movieclips passing the menu movieclip reference as an argument. Here is the
idea:
// For the menu buttons.
menu_1.menuName.onRelease = function()
{
// I am assuming menuName is a button or movieclip inside of menu_1?????
// The absolute pathe is _root.menu_1.menuName
// and you want to pass _root.menu_1 without an absolute reference
_root.loader(_parent) // Like menuName/.. and would be menu_1
}
//For the code initialization _root frame usually frame 1
//=====================================================
var my_mcl:MovieClipLoader = new MovieClipLoader();
// Create listener object:
var mclListener:Object = new Object();
loader = function (menu_mc)
{
mclListener.menu_mc = menu_mc // <<<<=======================
mclListener.onLoadError = function(target_mc, errorCode, status:Number)
{
trace("Error loading image: " + errorCode + " [" + status + "]");
};
mclListener.onLoadStart = function(target_mc):Void
{
trace("onLoadStart: " + target_mc);
};
mclListener.onLoadProgress = function(target_mc, numBytesLoaded,
numBytesTotal):Void
{
var numPercentLoaded:Number = numBytesLoaded / numBytesTotal * 100;
trace("onLoadProgress: " + target_mc + " is " + numPercentLoaded + "%
loaded");
this.menu_mc.numPercent = numPercentLoaded; // <<<<=======================
//_root.side_menu_1.numPercent = numPercentLoaded;
//numPercent = Math.round(numPercentLoaded)+"%";
};
mclListener.onLoadComplete = function(target_mc, status:Number):Void
{
trace("onLoadComplete: " + target_mc);
side_menu_1.gotoAndStop("loadedSWF");
};
my_mcl.addListener(mclListener);
my_mcl.loadClip("whatever1.swf", content_mc);
// un/load subNav button content
unloadSide();
}
--
Lon Hosford
www.lonhosford.com May many happy bits flow your way!
[quoted text, click to view] ">Vee<" <webforumsuser@macromedia.com> wrote in message
news:do6mhp$lmm$1@forums.macromedia.com...