MovieClipLoader - Two Images?

MovieClipLoader - Two Images ?

Hi all,

I’m loading images from an xml file using a MovieClipLoader, the code loads two images at a time that I want next to each other. The problem is I want them to fade in both the same time, I’m using this code to do it.


list.onLoadInit = function() {
	imag1._alpha = 0;
	imag2._alpha = 0;
	imag2._x = imag1._x+imag1._width+10;
	if (imag2._x >= imag1._x+imag1._width+10) {
		loader.stop();
		loader._visible = false;
		fadeIn();
	}
};
function fadeIn() {
	imag1.onEnterFrame = function() {
		imag1._alpha += 20;
		if (imag1._alpha>=99) {
			imag1._alpha = 100;
			delete this.onEnterFrame;
		}
	};
	imag2.onEnterFrame = function() {
		imag2._alpha += 20;
		if (imag2._alpha>=99) {
			imag2._alpha = 100;
			delete this.onEnterFrame;
		}
	};
}

So I want to load them both in, and position them and fade them both in at the same time. At the moment it doesn’t always happen and you can see the second image move over after they have faded in. Hope this makes sense, here is the rest of the code, bit long sorry.


stop();
//
//loader, spinning graphic that just spins when loading
var loader:MovieClip = loader_mc;
loader._yscale = loader._xscale=60;
loader._visible = false;
loader.stop();
//
//Hide the nav to start
left_btn._visible = right_btn._visible=false;
//
var iNum:Number = 0;
var iArr:Array = new Array();
var imag1:MovieClip;
var imag2:MovieClip;
//
//Set up MovieClipLoader
var mc1:MovieClipLoader = new MovieClipLoader();
var list:Object = new Object();
mc1.addListener(list);
//
// set up XML 
var iXml:XML = new XML();
iXml.ignoreWhite = true;
iXml.onLoad = processXML;
//
// btn Release to load different images
fashion_btn.onRelease = function() {
	left_btn._visible = right_btn._visible=true;
	removeMovieClip(image_mc.leftImage);
	removeMovieClip(image_mc.rightImage);
	iXml.load("xml/fashion.xml");
	title_txt.text = "Fashion";
	iNum = 0;
};
travel_btn.onRelease = function() {
	left_btn._visible = right_btn._visible=true;
	removeMovieClip(image_mc.leftImage);
	removeMovieClip(image_mc.rightImage);
	iXml.load("xml/travel.xml");
	title_txt.text = "Travel";
	iNum = 0;
};
//
//the xml
function processXML(success) {
	if (success) {
		iArr = [];
		var rot = this.firstChild.firstChild;
		var tot = rot.childNodes.length;
		for (var i = 0; i<tot; i++) {
			iArr.push(rot.childNodes*.firstChild.nodeValue);
		}
		loadFirstSet();
	} else {
		trace("XML NOT LOADED");
	}
}
// create Movieclips, load first set of images
function loadFirstSet() {
	imag1 = image_mc.createEmptyMovieClip("leftImage", image_mc.getNextHighestDepth());
	imag2 = image_mc.createEmptyMovieClip("rightImage", image_mc.getNextHighestDepth());
	mc1.loadClip(iArr[iNum], imag1);
	mc1.loadClip(iArr[iNum+1], imag2);
	iNum += 2;
}
list.onLoadStart = function() {
	//set up props
};
list.onLoadProgress = function() {
	loader._visible = true;
	loader.play();
};
list.onLoadInit = function() {
	imag1._alpha = 0;
	imag2._alpha = 0;
	imag2._x = imag1._x+imag1._width+10;
	if (imag2._x >= imag1._x+imag1._width+10) {// trying to make sure 2nd image in the right place
		loader.stop();
		loader._visible = false;
		fadeIn();
	}
};
//
//trying to fade in images once the 2nd has been placed
function fadeIn() {
	imag1.onEnterFrame = function() {
		imag1._alpha += 20;
		if (imag1._alpha>=99) {
			imag1._alpha = 100;
			delete this.onEnterFrame;
		}
	};
	imag2.onEnterFrame = function() {
		imag2._alpha += 20;
		if (imag2._alpha>=99) {
			imag2._alpha = 100;
			delete this.onEnterFrame;
		}
	};
}
//
//nav to load pre images
left_btn.onRelease = function() {
	if (iNum>1) {
		mc1.loadClip(iArr[iNum-3], imag2);
		mc1.loadClip(iArr[iNum-4], imag1);
		iNum -= 2;
	}
};
//
//nav to load next images
right_btn.onRelease = function() {
	if (iNum<iArr.length-1) {
		mc1.loadClip(iArr[iNum], imag1);
		mc1.loadClip(iArr[iNum+1], imag2);
		iNum += 2;
	}
};


Hi all,

I’d really appreciate it of someone could tell me if this possible. Here is simpler code to show what I’m trying to work out.

I’m loading two images next to each other with a MovieClipLoader but I want both the images to fade in at the same time after they have loaded in. It works fine when testing locally, but if I try online the images can load different, one loading before the other or the images shifing over after they have faded in.

I want to try and do this with MovieClipLoader but if not I’ll have to go back to loadMovie


stop();
//
var iNum:Number = 0;
var iArr:Array = ["images/pic1.jpg", "images/pic2.jpg", "images/pic3.jpg", "images/pic4.jpg", "images/pic5.jpg", "images/pic6.jpg", "images/pic7.jpg", "images/pic8.jpg"];
var imag1:MovieClip;
var imag2:MovieClip;
//
//Set up MovieClipLoader
var mc1:MovieClipLoader = new MovieClipLoader();
var list:Object = new Object();
mc1.addListener(list);
//
loadFirstSet();
// create Movieclips, load first set of images
function loadFirstSet() {
	imag1 = image_mc.createEmptyMovieClip("leftImage", image_mc.getNextHighestDepth());
	imag2 = image_mc.createEmptyMovieClip("rightImage", image_mc.getNextHighestDepth());
	mc1.loadClip(iArr[iNum], imag1);
	mc1.loadClip(iArr[iNum+1], imag2);
	iNum += 2;
}
//
list.onLoadInit = function() {
	imag1._alpha = 0
	imag2._alpha = 0
	imag1._x = 0;
	imag2._x = imag1._x+imag1._width+15;
	fadeIn();
};
//
function fadeIn() {
	imag1.onEnterFrame = function() {
		imag1._alpha += 10;
		if (imag1._alpha>=99) {
			imag1._alpha = 100;
			delete this.onEnterFrame;
		}
	};
	imag2.onEnterFrame = function() {
		imag2._alpha += 10;
		if (imag2._alpha>=99) {
			imag2._alpha = 100;
			delete this.onEnterFrame;
		}
	};
}
//
left_btn.onRelease = function() {
	if (iNum>1) {
		mc1.loadClip(iArr[iNum-3], imag2);
		mc1.loadClip(iArr[iNum-4], imag1);
		iNum -= 2;
	}
};
right_btn.onRelease = function() {
	if (iNum<iArr.length-1) {
		mc1.loadClip(iArr[iNum], imag1);
		mc1.loadClip(iArr[iNum+1], imag2);
		iNum += 2;
	}
};


[quote=duckhill101;2323790]MovieClipLoader - Two Images ?

Hi all,

I’m loading images from an xml file using a MovieClipLoader, the code loads two images at a time that I want next to each other. The problem is I want them to fade in both the same time, I’m using this code to do it.

ActionScript Code:
[LEFT]</p>
<p>list.[COLOR=#0000ff]onLoadInit[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    imag1.[COLOR=#0000ff]_alpha[/COLOR] = [COLOR=#000080]0[/COLOR];</p>
<p>    imag2.[COLOR=#0000ff]_alpha[/COLOR] = [COLOR=#000080]0[/COLOR];</p>
<p>    imag2.[COLOR=#0000ff]_x[/COLOR] = imag1.[COLOR=#0000ff]_x[/COLOR]+imag1.[COLOR=#0000ff]_width[/COLOR]+[COLOR=#000080]10[/COLOR];</p>
<p>    if [COLOR=#000000]([/COLOR]imag2.[COLOR=#0000ff]_x[/COLOR] >= imag1.[COLOR=#0000ff]_x[/COLOR]+imag1.[COLOR=#0000ff]_width[/COLOR]+[COLOR=#000080]10[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>        loader.[COLOR=#0000ff]stop[/COLOR]COLOR=#000000[/COLOR];</p>
<p>        loader.[COLOR=#0000ff]_visible[/COLOR] = [COLOR=#000000]false[/COLOR];</p>
<p>        fadeInCOLOR=#000000[/COLOR];</p>
<p>    [COLOR=#000000]}[/COLOR]</p>
<p>[COLOR=#000000]}[/COLOR];</p>
<p>function fadeInCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    imag1.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>        imag1.[COLOR=#0000ff]_alpha[/COLOR] += [COLOR=#000080]20[/COLOR];</p>
<p>        if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>            imag1.[COLOR=#0000ff]_alpha[/COLOR] = [COLOR=#000080]100[/COLOR];</p>
<p>            delete [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onEnterFrame[/COLOR];</p>
<p>        [COLOR=#000000]}[/COLOR]</p>
<p>    [COLOR=#000000]}[/COLOR];</p>
<p>    imag2.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>        imag2.[COLOR=#0000ff]_alpha[/COLOR] += [COLOR=#000080]20[/COLOR];</p>
<p>        if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>            imag2.[COLOR=#0000ff]_alpha[/COLOR] = [COLOR=#000080]100[/COLOR];</p>
<p>            delete [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onEnterFrame[/COLOR];</p>
<p>        [COLOR=#000000]}[/COLOR]</p>
<p>    [COLOR=#000000]}[/COLOR];</p>
<p>[COLOR=#000000]}[/COLOR]</p>
<p>
[/LEFT]

So I want to load them both in, and position them and fade them both in at the same time. At the moment it doesn’t always happen and you can see the second image move over after they have faded in. Hope this makes sense, here is the rest of the code, bit long sorry.

ActionScript Code:
[LEFT]</p>
<p>stopCOLOR=#000000[/COLOR];</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>[COLOR=#808080]//loader, spinning graphic that just spins when loading</p>[/COLOR]
<p>var loader:[COLOR=#0000ff]MovieClip[/COLOR] = loader_mc;</p>
<p>loader.[COLOR=#0000ff]_yscale[/COLOR] = loader.[COLOR=#0000ff]_xscale[/COLOR]=[COLOR=#000080]60[/COLOR];</p>
<p>loader.[COLOR=#0000ff]_visible[/COLOR] = [COLOR=#000000]false[/COLOR];</p>
<p>loader.[COLOR=#0000ff]stop[/COLOR]COLOR=#000000[/COLOR];</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>[COLOR=#808080]//Hide the nav to start</p>[/COLOR]
<p>left_btn.[COLOR=#0000ff]_visible[/COLOR] = right_btn.[COLOR=#0000ff]_visible[/COLOR]=[COLOR=#000000]false[/COLOR];</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>var iNum:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]0[/COLOR];</p>
<p>var iArr:[COLOR=#0000ff]Array[/COLOR] = [COLOR=#000000]new[/COLOR] [COLOR=#0000ff]Array[/COLOR]COLOR=#000000[/COLOR];</p>
<p>var imag1:[COLOR=#0000ff]MovieClip[/COLOR];</p>
<p>var imag2:[COLOR=#0000ff]MovieClip[/COLOR];</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>[COLOR=#808080]//Set up MovieClipLoader</p>[/COLOR]
<p>var mc1:[COLOR=#0000ff]MovieClipLoader[/COLOR] = [COLOR=#000000]new[/COLOR] [COLOR=#0000ff]MovieClipLoader[/COLOR]COLOR=#000000[/COLOR];</p>
<p>var [COLOR=#0000ff]list[/COLOR]:[COLOR=#0000ff]Object[/COLOR] = [COLOR=#000000]new[/COLOR] [COLOR=#0000ff]Object[/COLOR]COLOR=#000000[/COLOR];</p>
<p>mc1.[COLOR=#0000ff]addListener[/COLOR]COLOR=#000000[/COLOR];</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>[COLOR=#808080]// set up XML </p>[/COLOR]
<p>var iXml:[COLOR=#0000ff]XML[/COLOR] = [COLOR=#000000]new[/COLOR] [COLOR=#0000ff]XML[/COLOR]COLOR=#000000[/COLOR];</p>
<p>iXml.[COLOR=#0000ff]ignoreWhite[/COLOR] = [COLOR=#000000]true[/COLOR];</p>
<p>iXml.[COLOR=#0000ff]onLoad[/COLOR] = processXML;</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>[COLOR=#808080]// btn Release to load different images</p>[/COLOR]
<p>fashion_btn.[COLOR=#0000ff]onRelease[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    left_btn.[COLOR=#0000ff]_visible[/COLOR] = right_btn.[COLOR=#0000ff]_visible[/COLOR]=[COLOR=#000000]true[/COLOR];</p>
<p>    removeMovieClipCOLOR=#000000[/COLOR];</p>
<p>    removeMovieClipCOLOR=#000000[/COLOR];</p>
<p>    iXml.[COLOR=#0000ff]load[/COLOR]COLOR=#000000[/COLOR];</p>
<p>    title_txt.[COLOR=#0000ff]text[/COLOR] = [COLOR=#ff0000]“Fashion”[/COLOR];</p>
<p>    iNum = [COLOR=#000080]0[/COLOR];</p>
<p>[COLOR=#000000]}[/COLOR];</p>
<p>travel_btn.[COLOR=#0000ff]onRelease[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    left_btn.[COLOR=#0000ff]_visible[/COLOR] = right_btn.[COLOR=#0000ff]_visible[/COLOR]=[COLOR=#000000]true[/COLOR];</p>
<p>    removeMovieClipCOLOR=#000000[/COLOR];</p>
<p>    removeMovieClipCOLOR=#000000[/COLOR];</p>
<p>    iXml.[COLOR=#0000ff]load[/COLOR]COLOR=#000000[/COLOR];</p>
<p>    title_txt.[COLOR=#0000ff]text[/COLOR] = [COLOR=#ff0000]“Travel”[/COLOR];</p>
<p>    iNum = [COLOR=#000080]0[/COLOR];</p>
<p>[COLOR=#000000]}[/COLOR];</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>[COLOR=#808080]//the xml</p>[/COLOR]
<p>function processXMLCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>        iArr = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];</p>
<p>        var rot = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]firstChild[/COLOR];</p>
<p>        var tot = rot.[COLOR=#0000ff]childNodes[/COLOR].[COLOR=#0000ff]length[/COLOR];</p>
<p>        for [COLOR=#000000]([/COLOR][COLOR=#000000]var[/COLOR] i = [COLOR=#000080]0[/COLOR]; i<tot; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>            iArr.[COLOR=#0000ff]push[/COLOR]COLOR=#000000[/COLOR];</p>
<p>        [COLOR=#000000]}[/COLOR]</p>
<p>        loadFirstSetCOLOR=#000000[/COLOR];</p>
<p>    [COLOR=#000000]}[/COLOR] [COLOR=#0000ff]else[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>        trace[COLOR=#000000]([/COLOR][COLOR=#ff0000]“XML NOT LOADED”[/COLOR][COLOR=#000000])[/COLOR];</p>
<p>    [COLOR=#000000]}[/COLOR]</p>
<p>[COLOR=#000000]}[/COLOR]</p>
<p>[COLOR=#808080]// create Movieclips, load first set of images</p>[/COLOR]
<p>function loadFirstSetCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    imag1 = image_mc.[COLOR=#0000ff]createEmptyMovieClip[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“leftImage”[/COLOR], image_mc.[COLOR=#0000ff]getNextHighestDepth[/COLOR]COLOR=#000000[/COLOR][COLOR=#000000])[/COLOR];</p>
<p>    imag2 = image_mc.[COLOR=#0000ff]createEmptyMovieClip[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“rightImage”[/COLOR], image_mc.[COLOR=#0000ff]getNextHighestDepth[/COLOR]COLOR=#000000[/COLOR][COLOR=#000000])[/COLOR];</p>
<p>    mc1.[COLOR=#0000ff]loadClip[/COLOR][COLOR=#000000]([/COLOR]iArr[COLOR=#000000][[/COLOR]iNum[COLOR=#000000]][/COLOR], imag1[COLOR=#000000])[/COLOR];</p>
<p>    mc1.[COLOR=#0000ff]loadClip[/COLOR][COLOR=#000000]([/COLOR]iArr[COLOR=#000000][[/COLOR]iNum+[COLOR=#000080]1[/COLOR][COLOR=#000000]][/COLOR], imag2[COLOR=#000000])[/COLOR];</p>
<p>    iNum += [COLOR=#000080]2[/COLOR];</p>
<p>[COLOR=#000000]}[/COLOR]</p>
<p>list.[COLOR=#0000ff]onLoadStart[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    [COLOR=#808080]//set up props</p>[/COLOR]
<p>[COLOR=#000000]}[/COLOR];</p>
<p>list.[COLOR=#0000ff]onLoadProgress[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    loader.[COLOR=#0000ff]_visible[/COLOR] = [COLOR=#000000]true[/COLOR];</p>
<p>    loader.[COLOR=#0000ff]play[/COLOR]COLOR=#000000[/COLOR];</p>
<p>[COLOR=#000000]}[/COLOR];</p>
<p>list.[COLOR=#0000ff]onLoadInit[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    imag1.[COLOR=#0000ff]_alpha[/COLOR] = [COLOR=#000080]0[/COLOR];</p>
<p>    imag2.[COLOR=#0000ff]_alpha[/COLOR] = [COLOR=#000080]0[/COLOR];</p>
<p>    imag2.[COLOR=#0000ff]_x[/COLOR] = imag1.[COLOR=#0000ff]_x[/COLOR]+imag1.[COLOR=#0000ff]_width[/COLOR]+[COLOR=#000080]10[/COLOR];</p>
<p>    if [COLOR=#000000]([/COLOR]imag2.[COLOR=#0000ff]_x[/COLOR] >= imag1.[COLOR=#0000ff]_x[/COLOR]+imag1.[COLOR=#0000ff]_width[/COLOR]+[COLOR=#000080]10[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR][COLOR=#808080]// trying to make sure 2nd image in the right place</p>[/COLOR]
<p>        loader.[COLOR=#0000ff]stop[/COLOR]COLOR=#000000[/COLOR];</p>
<p>        loader.[COLOR=#0000ff]_visible[/COLOR] = [COLOR=#000000]false[/COLOR];</p>
<p>        fadeInCOLOR=#000000[/COLOR];</p>
<p>    [COLOR=#000000]}[/COLOR]</p>
<p>[COLOR=#000000]}[/COLOR];</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>[COLOR=#808080]//trying to fade in images once the 2nd has been placed</p>[/COLOR]
<p>function fadeInCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    imag1.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>        imag1.[COLOR=#0000ff]_alpha[/COLOR] += [COLOR=#000080]20[/COLOR];</p>
<p>        if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>            imag1.[COLOR=#0000ff]_alpha[/COLOR] = [COLOR=#000080]100[/COLOR];</p>
<p>            delete [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onEnterFrame[/COLOR];</p>
<p>        [COLOR=#000000]}[/COLOR]</p>
<p>    [COLOR=#000000]}[/COLOR];</p>
<p>    imag2.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>        imag2.[COLOR=#0000ff]_alpha[/COLOR] += [COLOR=#000080]20[/COLOR];</p>
<p>        if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>            imag2.[COLOR=#0000ff]_alpha[/COLOR] = [COLOR=#000080]100[/COLOR];</p>
<p>            delete [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onEnterFrame[/COLOR];</p>
<p>        [COLOR=#000000]}[/COLOR]</p>
<p>    [COLOR=#000000]}[/COLOR];</p>
<p>[COLOR=#000000]}[/COLOR]</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>[COLOR=#808080]//nav to load pre images</p>[/COLOR]
<p>left_btn.[COLOR=#0000ff]onRelease[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>        mc1.[COLOR=#0000ff]loadClip[/COLOR][COLOR=#000000]([/COLOR]iArr[COLOR=#000000][[/COLOR]iNum-[COLOR=#000080]3[/COLOR][COLOR=#000000]][/COLOR], imag2[COLOR=#000000])[/COLOR];</p>
<p>        mc1.[COLOR=#0000ff]loadClip[/COLOR][COLOR=#000000]([/COLOR]iArr[COLOR=#000000][[/COLOR]iNum-[COLOR=#000080]4[/COLOR][COLOR=#000000]][/COLOR], imag1[COLOR=#000000])[/COLOR];</p>
<p>        iNum -= [COLOR=#000080]2[/COLOR];</p>
<p>    [COLOR=#000000]}[/COLOR]</p>
<p>[COLOR=#000000]}[/COLOR];</p>
<p>[COLOR=#808080]//</p>[/COLOR]
<p>[COLOR=#808080]//nav to load next images</p>[/COLOR]
<p>right_btn.[COLOR=#0000ff]onRelease[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>    if COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p>        mc1.[COLOR=#0000ff]loadClip[/COLOR][COLOR=#000000]([/COLOR]iArr[COLOR=#000000][[/COLOR]iNum[COLOR=#000000]][/COLOR], imag1[COLOR=#000000])[/COLOR];</p>
<p>        mc1.[COLOR=#0000ff]loadClip[/COLOR][COLOR=#000000]([/COLOR]iArr[COLOR=#000000][[/COLOR]iNum+[COLOR=#000080]1[/COLOR][COLOR=#000000]][/COLOR], imag2[COLOR=#000000])[/COLOR];</p>
<p>        iNum += [COLOR=#000080]2[/COLOR];</p>
<p>    [COLOR=#000000]}[/COLOR]</p>
<p>[COLOR=#000000]}[/COLOR];</p>
<p> </p>
<p>
[/LEFT]

[/quote]

Call your fadeIn function on load complete of firstSet images.