# XML: Text not visible when movie clip loaded from another timeline

**URL:** <https://forum.kirupa.com/t/xml-text-not-visible-when-movie-clip-loaded-from-another-timeline/116053>\
**Category:** Uncategorized\
**Created:** [July 14, 2004, 7:30am UTC](https://forum.kirupa.com/t/xml-text-not-visible-when-movie-clip-loaded-from-another-timeline/116053 "2004-07-14T07:30:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![motrintwiceaday](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@motrintwiceaday](https://forum.kirupa.com/u/motrintwiceaday)\
**Post date:** [July 14, 2004, 7:30am UTC](https://forum.kirupa.com/t/xml-text-not-visible-when-movie-clip-loaded-from-another-timeline/116053/1 "2004-07-14T07:30:45Z")

</div>

Hi,  
Eye’s strained out.:cyclops: Here’s a little background:  
1] I have a navigation that loads several .swfs into specific movie clips. One of the .swfs is an XML gallery pulling images and text data. The images show, but the text data do not. **Can someone help me so the text data show too? Please!!]** The .swf works fine alone; just doesn’t work when called from another .swf.

2] I suspected the variables’ path to be the culprit. Although, the XML gallery’s [COLOR=Blue]timeline = this;[/COLOR], leading me to believe the gallery should function independently from the navigation timeline.

If it helps any, I’ll paste the code of the XML gallery’s actionscript.  
[COLOR=Blue]  
portfolioInfo = new XML();  
portfolioInfo.ignoreWhite = true;

timeline = this;//original code  
var set\_interval = 1;// This value must not be changed!  
var thumbs\_per\_set=5;// Here you can set the number of images per page. Dont use 1, any other number ok!  
var from\_image=0;  
var to\_image=thumbs\_per\_set;  
previous.enabled=false;  
previous.\_visible=false;  
next.enabled=false;  
next.\_visible=false;  
//trace(this);  
this.createEmptyMovieClip(“mask”, 2);  
//trace(image\_mc.\_x);  
mask.\_x = image\_mc.\_x;  
mask.\_y = image\_mc.\_y;  
mask.beginFill (0xFF0000, 100);  
mask.lineStyle(0, 0, 0);  
mask.lineTo(image\_mc.\_width, 0);  
mask.lineTo(image\_mc.\_width, image\_mc.\_height);  
mask.lineTo(0, image\_mc.\_height);  
mask.lineTo(0, 0);  
endFill();  
image\_mc.setMask(mask);  
MovieClip.prototype.useHandCursor = true;  
[//loaderHolder.loadBar.setMask](https://loaderHolder.loadBar.setMask)(mask3);

// Function when xml is done loading:  
portfolioInfo.onLoad = function() {

```
menu_mc.attachMovie("loading_set_clip","loading_set_clip", 1);
menu_mc.loading_set_clip._y = 10;
portfolioTag = this.firstChild;
count=portfolioTag.childNodes.length;
remaindar_testing = count % thumbs_per_set;
if (remaindar_testing == 0){total_sets = count / thumbs_per_set;}
else {total_sets = Math.floor(count / thumbs_per_set)+1};
timeline.createEmptyMovieClip("contain",1);
for (child=0;child&lt;count;child++){	
	currentPicture = portfolioTag.childNodes[child];
	Thumb = contain.createEmptyMovieClip("thumb"+child, child);
	pic = Thumb.createEmptyMovieClip("thumb_image"+child, 0);
	pic.loadMovie(currentPicture.attributes.THUMB);
	Thumb._visible=false;
	if (child == count - 1){initial_set_preload(pic);}
}

```

};

movieClip.prototype.initial\_set\_preload = function (mc) {  
this.onEnterFrame = function() {  
var l = mc.getBytesLoaded();  
var t = mc.getBytesTotal();

```
			if (l&gt;0 && l&gt;=t) {
				
				contain.removeMovieClip();
				loading_set_clip.easeTo(0, 20, 15, "leaving",0);
				menu_mc.loading_set(from_image,to_image);
				Set = set_interval+" / "+total_sets;
				if (count&lt;=thumbs_per_set){
					next._visible=false;
				}else{
					next._visible=true;
					next.enabled=true;
				}
				delete this.onEnterFrame;
			}
		};

```

};

next.onPress = next.onDragOver=function () {

```
previous.enabled=true;
previous._visible=true;
set_interval++;
Set = set_interval+" / "+total_sets;
menu_mc.removing_set(from_image,to_image);
	
if (to_image &lt; count){
	var temp = count - to_image;
	if (temp &lt; thumbs_per_set) {
		from_image = to_image;
		to_image += temp;
		menu_mc.loading_set(from_image,to_image);
	}
	else {
		from_image = to_image;
		to_image += thumbs_per_set;
		menu_mc.loading_set(from_image,to_image);
	}
	
}
if (to_image == count){
	next.enabled=false;
	next._visible=false;
}

```

};  
previous.onPress = previous.onDragOver=function () {  
next.enabled=true;  
next.\_visible=true;  
set\_interval–;  
Set = set\_interval+" / "+total\_sets;  
menu\_mc.removing\_set(from\_image,to\_image);

```
if (from_image &gt; 0){
	to_image = from_image;
	from_image -= thumbs_per_set;
	menu_mc.loading_set(from_image,to_image);
}
if (from_image == 0) {
	previous.enabled=false;
	previous._visible=false;
}

```

};

MovieClip.prototype.loading\_set= function(from,to) {  
var counter = 0; //distance…location  
for (child=from; child\<to; child++) {

```
	currentPicture = portfolioTag.childNodes[child];
	currentThumb = menu_mc.createEmptyMovieClip("thumbnail"+child, child);
	currentThumb._x = (counter*40);
	currentThumb._y = (child*0)+40;
	
	image = currentThumb.createEmptyMovieClip("thumbnail_image", 0);
	image.loadMovie(currentPicture.attributes.THUMB);
	
	currentThumb.NAME = currentPicture.attributes.NAME;
	currentThumb.IMAGE = currentPicture.attributes.IMAGE;
	currentThumb.PROJECT = currentPicture.attributes.PROJECT;// * modified for envisuals
	currentThumb.DESCRIPTION = currentPicture.attributes.DESCRIPTION;// * modified for envisuals
	currentThumb.TEXT = currentPicture.attributes.TEXT;
	
	currentThumb.onRollOver = currentThumb.onDragOver=function () {
		showName_txt.text = this.Name;
		this.attachMovie("blink","blink",1001);
		this.blink._height=24;
		this.blink._width=32;
	};
	
	currentThumb.onRollOut = currentThumb.onDragOut=function () {
		showName_txt.text = "";
		this.blink.removeMovieClip();
		this.blinkRelease.removeMovieClip();
	};
	
	currentThumb.onPress = currentThumb.onDragOver=function () {
		
		if (current_thumb != this) {
			current_thumb = this;
			to_x=image_mc._x;
			to_y=250;
			image_mc.easeTo_image(to_x,to_y,7,0, this.image, "down");
			this.attachMovie("blinkRelease","blinkRelease",1000);
		    this.blinkRelease._height=24;
	    	this.blinkRelease._width=32;
			info_txt.text = "Text Loading...";
			info_txt_project.text = (this.PROJECT);
			info_txt_description.text = (this.DESCRIPTION);
			
			timeline.loadVariables(this.TEXT, this.PROJECT, this.DESCRIPTION);
		}
	};
	
	menu_mc["thumbnail"+child].easeTo(40*counter, 15, 7, "coming",100);
	counter++;
}

```

};

MovieClip.prototype.removing\_set= function(from,to) {  
var counter=0;

```
for (child=from; child&lt;to; child++) {
	menu_mc["thumbnail"+child].easeTo(40*counter, 40, 15, "leaving",0);
	counter++;

}

```

};

loadPic = function (pic) {

```
image_mc.loadMovie(pic);
mask._visible=false;
preload(image_mc,1);

```

};

MovieClip.prototype.preload = function(mc, location) {

```
var loader_x=205;
var loader_y=140;

status=false;
this.onEnterFrame = function() {
	var l = mc.getBytesLoaded();
	var t = mc.getBytesTotal();
	var getPercent = l/t;

	var percent = getPercent*100;		
	LoaderHolder.loadBar._width += (percent - LoaderHolder.loadBar._width) / 20;

	if (l&gt;0 && l&gt;=t) {

		LoaderHolder.loadBar._width = 100;
		LoaderHolder.easeTo(loader_x, 170, 15, "leaving",0);
		image_mc.setMask(mask);
		mask._visible=true;
		mc.easeTo_image(to_x,0,7,100,image,"up");
		mc._visible = 1;
		delete this.onEnterFrame;
	}
	
	else {
		if (status==false) {
			status=true;
			this.attachMovie("LoaderHolder", "LoaderHolder", 1);
			LoaderHolder._alpha=0;
			LoaderHolder._x=loader_x;
			LoaderHolder._y=loader_y+20;
			LoaderHolder.loadBar._width = 0;
			LoaderHolder.easeTo_image(loader_x,loader_y,6,100,image,"up");
			
		}
	}
		
};

```

};

MovieClip.prototype.easeTo\_image = function(x, y, speed, fading\_to, image, dir) {  
//image\_mc.setMask(mask2);  
if (dir == “down”){  
this.onEnterFrame = function() {  
//set move to location  
[//this.enabled=false](https://this.enabled=false);  
this.eX = Math.round(x-this.\_x);  
this.eY = Math.round(y-this.\_y);  
//ease to location  
this.\_alpha = this.\_alpha+(fading\_to-this.\_alpha)/6;  
this.\_x += this.eX/speed;  
this.\_y += this.eY/speed;  
//if the eX and eY variables are both equal to 0  
if (!this.eX && !this.eY) {  
//place the clip at the final destination point  
this.\_x = x;  
this.\_y = y;

```
			loadPic(image);
			
			//stop running the onEnterFrame
			delete this.onEnterFrame;
			//this.removeMovieClip();
		}
	};
}else if (dir == "up") {
	this.onEnterFrame = function() {
		//set move to location
		//this.enabled=false;
		this.eX = Math.round(x-this._x);
		this.eY = Math.round(y-this._y);
		//ease to location
		this._alpha = this._alpha+(fading_to-this._alpha)/6;
		this._x += this.eX/speed;
		this._y += this.eY/speed;
		//if the eX and eY variables are both equal to 0
		if (!this.eX && !this.eY) {
			//place the clip at the final destination point
			this._x = x;
			this._y = y;
			//stop running the onEnterFrame
			delete this.onEnterFrame;
			//this.removeMovieClip();
		}
	};
}

```

};  
MovieClip.prototype.easeTo = function(x, y, speed, where\_to, fading\_to) {  
if (where\_to==“leaving”){  
this.onEnterFrame = function() {  
//set move to location  
this.enabled=false;  
this.eX = Math.round(x-this.\_x);  
this.eY = Math.round(y-this.\_y);  
//ease to location  
this.\_alpha = this.\_alpha+(fading\_to-this.\_alpha)/6;  
this.\_x += this.eX/speed;  
this.\_y += this.eY/speed;  
//if the eX and eY variables are both equal to 0  
if (!this.eX && !this.eY) {  
//place the clip at the final destination point  
this.\_x = x;  
this.\_y = y;  
//stop running the onEnterFrame  
delete this.onEnterFrame;  
this.removeMovieClip();  
}  
};  
}  
else {  
this.\_alpha=0;  
this.enabled=false;  
this.onEnterFrame = function() {  
//set move to location  
this.eX = Math.round(x-this.\_x);  
this.eY = Math.round(y-this.\_y);  
//ease to location  
this.\_alpha = this.\_alpha+(fading\_to-this.\_alpha)/6;  
this.\_x += this.eX/speed;  
this.\_y += this.eY/speed;  
//if the eX and eY variables are both equal to 0  
if (!this.eX && !this.eY) {  
//place the clip at the final destination point  
this.\_x = x;  
this.\_y = y;  
//stop running the onEnterFrame  
this.enabled=true;  
delete this.onEnterFrame;  
}  
};  
}  
};

portfolioInfo.load(“xmlstuff/portfolio\_config.xml”);  
//stop();[/COLOR]

Thanks. I’ll rest myEYE for now.  
e
