# XML not showing in Dynamic TextField ...PLEASE HELP

**URL:** <https://forum.kirupa.com/t/xml-not-showing-in-dynamic-textfield-please-help/284275>\
**Category:** flash\
**Created:** [March 17, 2009, 2:20pm UTC](https://forum.kirupa.com/t/xml-not-showing-in-dynamic-textfield-please-help/284275 "2009-03-17T14:20:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrealist](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jrealist](https://forum.kirupa.com/u/jrealist)\
**Post date:** [March 17, 2009, 2:20pm UTC](https://forum.kirupa.com/t/xml-not-showing-in-dynamic-textfield-please-help/284275/1 "2009-03-17T14:20:12Z")

</div>

I came across a cool tutorial on how to make a Carousel photo gallery and I am extending the tutorial by adding links to each of the photos to take the viewers to external websites.

When I compile the .FLA I can see the XML links with a trace … but I don’t know how to place them in the dynamic textField on my stage with an instances name “links”, for some reason when i use “links.htmlText=myXML;” the dynamic textField dummy text disappears… so I know everything is hooked up … i just don’t know how to get the links in the textfield area… if that makes sense?

If anyone can help me I would appreciate it … if you need any additional info please let me know… I will continue to work on it as well.

THANKS! 😛

package {

```
import com.gskinner.motion.GTween;
import com.leebrimelow.utils.Math2;
import com.theflashblog.fp10.SimpleZSorter;

import fl.motion.easing.Exponential;

import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.text.TextField;

public class Carousel extends Sprite {
	private var container:Sprite;
	private var loader:URLLoader;
	private var loader2:URLLoader;
	private var xmlLoader:URLLoader;
	private var anglePer:Number;

	public function Carousel() {
		init();
		loadXML();
		myXML();
	}
	private function loadXML():void {
		loader=new URLLoader(new URLRequest("images.xml"));
		loader.addEventListener(Event.COMPLETE, createCarousel);
	}

```

// the xml source for loading the links  
private function myXML():void {

```
		loader2=new URLLoader(new URLRequest("images.xml"));
		loader2.addEventListener(Event.COMPLETE, createLinks);

	}

```

//script for loading links into dynamic textfield  
private function createLinks(e:Event):void {  
var myXML=new XML(e.target.data);  
trace(myXML.urltxt);  
links.htmlText=myXML;  
}

```
	private function createCarousel(e:Event):void {
		var xml:XML=new XML(e.target.data);
		var list:XMLList=xml.image;
		anglePer = (Math.PI*2) / list.length();

		for (var i:int=0; i&lt;list.length(); i++) {
			var imc:imCon = new imCon();
			imc.buttonMode=true;
			imc.addEventListener(MouseEvent.CLICK, onClick);

			var l:Loader = new Loader();
			l.x=-250;
			l.y=-167;
			l.load(new URLRequest(list*.@src));
			imc.addChild(l);
			imc.scaleX=imc.scaleY=0.5;
			imc.angle = (i*anglePer) - Math.PI/ 2;
			imc.x=Math.cos(imc.angle)*450;
			imc.z=Math.sin(imc.angle)*450;
			imc.rotationY=36*- i;
			container.addChild(imc);
		}
	}

	private function onClick(e:MouseEvent):void {
		var tw:GTween = new GTween(container,0.8, {rotationY:Math2.toDeg(e.currentTarget.angle+Math.PI/2), z:100},
		  {ease: Exponential.easeInOut});

	}

	private function init():void {
		container=new Sprite ;
		container.x=350;
		container.y=250;
		container.z=400;
		addChild(container);

		cover.addEventListener(MouseEvent.CLICK,stageClick);
		this.addEventListener(Event.ENTER_FRAME,loop);
	}
	private function stageClick(e:MouseEvent):void {
		var tw:GTween=new GTween(container,0.8,{z:400},{ease:Exponential.easeInOut});
	}

	private function loop(e:Event):void {
		SimpleZSorter.sortClips(container);
	}
}

```

}
