# Xml stock ticker

**URL:** <https://forum.kirupa.com/t/xml-stock-ticker/275263>\
**Category:** Uncategorized\
**Created:** [November 11, 2008, 10:19pm UTC](https://forum.kirupa.com/t/xml-stock-ticker/275263 "2008-11-11T22:19:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hansi](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hansi](https://forum.kirupa.com/u/hansi)\
**Post date:** [November 11, 2008, 10:19pm UTC](https://forum.kirupa.com/t/xml-stock-ticker/275263/1 "2008-11-11T22:19:26Z")

</div>

Hello

I’ve created an horizontal sliding stock ticker that uses a xml feeder provided from another site.  
The ticker is now working fine if preview it doing ctrl + enter or if I see the swf with the flash player.

The Problem comes when I want to preview it with F12 the browser shows me a warning that says something like this (the original text is in spanish)

“adobe flash player has stopped this opration bc it may be not secure …”

I also can not see the swf file when online

Here it is the code I’m using

/_var filename = “ticker.xml”;_/

var filename = “[http://xmldev.chicagoclimatex.com/market/data/xml/ccxEodSummary.xml](http://xmldev.chicagoclimatex.com/market/data/xml/ccxEodSummary.xml)”;  
var contentMain = this.createEmptyMovieClip(“contentMain”, this.getNextHighestDepth());  
var inc = 8;

//  
function loadXML(loaded) {  
if (loaded) {  
newsXML = this.firstChild;/_es marketdata_/  
var dates = newsXML.childNodes;/_son el date y todos los products_/  
var yPos = 0;  
var xPos = 150;  
var idex = 0;  
var myFmt1:TextFormat = new TextFormat();  
myFmt1.color = 0xffffff;  
myFmt1.size = 12;  
myFmt1.font = “Arial”;  
var myFmt2:TextFormat = new TextFormat();  
myFmt2.font = “Arial”;  
myFmt2.bold = true;  
myFmt2.size = 12;  
myFmt2.color = 0xffffff;

```
	for (var d = 2; d &lt; dates.length; d++) {
		contentMain.createTextField("year" + idex, idex, xPos*d, yPos, 30, 30);
		var myTxt = contentMain["year" + idex];
		myTxt.multiline = true;
		myTxt.autoSize = true;
		myTxt.html = true;
		myTxt.htmlText = dates[d].firstChild.firstChild;
		myTxt.setTextFormat(myFmt1);
		yPos += myTxt._height;
		idex++;
		yPos += (dateYspace - textYspace);
		
	}
	
		for (var d = 2; d &lt; dates.length; d++) {
		contentMain.createTextField("cierre" + idex, idex, xPos*d+32, yPos, 30, 30);
		var oTxt = contentMain["cierre" + idex];
		oTxt.multiline = true;
		oTxt.autoSize = true;
		oTxt.html = true;
		oTxt.htmlText = dates[d].firstChild.childNodes[4];
		oTxt.setTextFormat(myFmt2);
		yPos += oTxt._height;
		idex++;
		yPos = 0;
	}
	
		for (var d = 2; d &lt; dates.length; d++) {
		contentMain.createTextField("ccx" + idex, idex, xPos*d-56, yPos, 30, 30);
		var oTxt = contentMain["ccx" + idex];
		oTxt.multiline = true;
		oTxt.autoSize = true;
		oTxt.html = true;
		oTxt.htmlText = dates[d].attributes.market;
		oTxt.setTextFormat(myFmt1);
		yPos += oTxt._height;
		idex++;
		yPos = 0;
	}
	
		for (var d = 2; d &lt; dates.length; d++) {
		contentMain.createTextField("cfi" + idex, idex, xPos*d-27, yPos, 30, 30);
		var oTxt = contentMain["cfi" + idex];
		oTxt.multiline = true;
		oTxt.autoSize = true;
		oTxt.html = true;
		oTxt.htmlText = dates[d].attributes.instrument;
		oTxt.setTextFormat(myFmt1);
		yPos += oTxt._height;
		idex++;
		yPos = 0;
		
	}

} else {
	content = "file not loaded!";
}

```

}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(filename);

THANKS A LOT FOR YOUR HELP!
