Hello guys,
im having troubles editing my xml file.
I want to chage the color and size of the text which disply inn my news, but some how applieds just in the main news and in the content, doesnt apply.
My xml code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<newsList>
<news>
<date><![CDATA[<font color='#A40000'>Jan 7th 2010, 9:39pm</font>]]></date>
<title><![CDATA[online]]></title>
<topic><![CDATA[little hard]]></topic>
<description><![CDATA[First comment and information.<br><br>Second comment and information.<br><br>CThird comment and information.]]></description>
<source>pics/news/img1.jpg</source>
<url>http://www.google.com</url>
</news>
And thi swhat i have into my flash:
System.useCodepage = true;
Mouse.removeListener (mouseListener1);
Mouse.removeListener (mouseListener2);
blackLayer._visible = false;
bigBox._alpha = 0;
bigBox._visible = false;
background.backgroundFilter._alpha = 40;
var newsArray:Number;
function opennews () {
newslist = new XML ();
newslist.load ("xml/news.xml");
newslist.ignoreWhite = true;
var item_spacing = 140;
var item_cont = 1;
NewsUp.bt._visible = false;
NewsUp.back._alpha = 0;
NewsUp.arrowIco._alpha = 0;
NewsDown.bt._visible = false;
NewsDown.back._alpha = 20;
loadingNews._alpha = 100;
newslist.onLoad = function (success) {
if (success) {
if (this.getBytesLoaded () == this.getBytesTotal ()) {
ZigoEngine.doTween (loadingNews,'_alpha',0,1,"easeOutExpo");
var news:XMLNode = this.firstChild;
numberOfItems = news.childNodes.length;
ZigoEngine.doTween (NewsDown.back,'_alpha',100,1,"easeOutExpo",0,function () {
NewsDown.bt._visible = true;
});
for (i = 0; i < numberOfItems; i++) {
var itemDate = news.childNodes*.childNodes[0].childNodes[0].nodeValue;
var itemTitle = news.childNodes*.childNodes[1].childNodes[0].nodeValue;
var itemTopic = news.childNodes*.childNodes[2].childNodes[0].nodeValue;
var itemDescription = news.childNodes*.childNodes[3].childNodes[0].nodeValue;
var itemImage = news.childNodes*.childNodes[4].childNodes[0].nodeValue;
var itemURL = news.childNodes*.childNodes[5].childNodes[0].nodeValue;
//
var item_mc = anchorNews.attach.attachMovie ("caixaNews", "caixaNews" + item_cont, item_cont);
item_mc._y = Math.floor ((item_cont * item_spacing) - item_spacing);
item_cont++;
item_mc.xDate.htmlText = itemDate;
item_mc.xTitle.htmlText = itemTitle;
item_mc.xDescription.htmlText = itemTopic;
//item_mc.xImage.loadMovie (itemImage);
loadImages(itemImage, item_mc.xImage)
item_mc.xDate.html = true;
item_mc.xTitle.html = true;
item_mc.xDescription.html = true;
item_mc.bt.instance_date = itemDate;
item_mc.bt.instance_title = itemTitle;
item_mc.bt.instance_desc = itemDescription;
item_mc.bt.instance_image = itemImage;
item_mc.bt.instance_url = itemURL;
item_mc.bt.onRelease = function () {
ZigoEngine.doTween (background.backgroundFilter,'_alpha',70,1,"easeOutExpo");
blackLayer._visible = true;
bigBox._visible = true;
ZigoEngine.doTween (bigBox,'_alpha',100,2,"easeOutExpo");
bigBox.date.text = this.instance_date;
bigBox.title.text = this.instance_title;
bigBox.desc.htmlText = this.instance_desc;
//bigBox.image.loadMovie (this.instance_image);
loadImages(this.instance_image, bigBox.image)
bigBox.scroller._visible = (bigBox.desc.maxscroll > 1);
if (this.instance_url == undefined) {
bigBox.visitWebsite._visible = false;
}
else {
websiteURL = this.instance_url;
bigBox.visitWebsite._visible = true;
bigBox.visitWebsite.bt.onRelease = function () {
getURL (websiteURL, "_blank");
};
}
};
// for (j = 4; j < numberOfItems + 1; j++) {
// ZigoEngine.doTween (anchorNews.attach["caixaNews" + j],'_y, Blur_blurX, Blur_blurY',[Math.floor (1500), 0, 500],0,"easeOutExpo");
// }
newsArray = new Number (3);
myListenerload.onResize ();
positions ();
}
}
}
};
}
//
opennews ();
// - - - - - - - - - -
function loadImages (externalTarget:String, targetRoot:MovieClip) {
//
var mcLoader:MovieClipLoader = new MovieClipLoader ();
var listenerLoad:Object = new Object ();
//
listenerLoad.onLoadStart = function (target:MovieClip) {};
//
listenerLoad.onLoadProgress = function (target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {};
//
listenerLoad.onLoadInit = function (target:MovieClip):Void {
};
//
mcLoader.addListener (listenerLoad);
mcLoader.loadClip (externalTarget,targetRoot);
}
// - - - - - - - - - -
function positions () {
if(numberOfItems > 3){
NewsUp._visible = true;
NewsDown._visible = true;
upDownBar._visible = true;
//
NewsDown.bt.onRollOver = NewsDown.bt.onDragOver = function () {
ZigoEngine.doTween (NewsDown.arrowIco,'_tint',color,0.3,"easeOutExpo");
}
NewsDown.bt.onRollOut = NewsDown.bt.onDragOut = function () {
ZigoEngine.doTween (NewsDown.arrowIco,'_tint',0xCCCCCC,0.3,"easeOutExpo");
}
//
NewsDown.bt.onRelease = function () {
moveDown();
};
//
NewsUp.bt.onRollOver = NewsUp.bt.onDragOver = function () {
ZigoEngine.doTween (NewsUp.arrowIco,'_tint',color,0.3,"easeOutExpo");
}
NewsUp.bt.onRollOut = NewsUp.bt.onDragOut = function () {
ZigoEngine.doTween (NewsUp.arrowIco,'_tint',0xCCCCCC,0.3,"easeOutExpo");
}
//
NewsUp.bt.onRelease = function () {
moveUp ()
};
}
else{
NewsUp._visible = false;
NewsDown._visible = false;
upDownBar._visible = false;
}
}
mouseListener1 = new Object ();
mouseListener1.onMouseWheel = function (delta) {
if (delta > 0 && newsArray > 3) {
moveUp ();
//trace (delta);
}
};
Mouse.addListener (mouseListener1);
mouseListener2 = new Object ();
mouseListener2.onMouseWheel = function (delta) {
if (delta < 0 && numberOfItems > newsArray) {
moveDown ();
//trace (delta);
}
};
Mouse.addListener (mouseListener2);
function moveUp () {
trace ("newsArray "+newsArray);
trace ("numberOfItems "+numberOfItems);
newsArray = newsArray - 1;
ZigoEngine.doTween (anchorNews.attach["caixaNews" + (newsArray + 1)],'_y, Blur_blurX, Blur_blurY',[Math.floor (anchorNews.area._height + 1500), 0, 500],5,"easeOutExpo");
ZigoEngine.doTween (anchorNews.attach["caixaNews" + (newsArray)],'_y, Blur_blurX, Blur_blurY',[Math.floor (280), 0, 0],1,"easeOutExpo");
ZigoEngine.doTween (anchorNews.attach["caixaNews" + (newsArray - 1)],'_y, Blur_blurX, Blur_blurY',[Math.floor (140), 0, 0],1,"easeOutExpo");
ZigoEngine.doTween (anchorNews.attach["caixaNews" + (newsArray - 2)],'_y, Blur_blurX, Blur_blurY',[Math.floor (0), 0, 0],1,"easeOutExpo");
NewsDown.bt._visible = true;
ZigoEngine.doTween (NewsDown.arrowIco,'_alpha',100,1,"easeOutExpo");
alphaValDown = 100;
//
ZigoEngine.doTween (NewsDown.back,'_alpha',100,1,"easeOutExpo");
Mouse.addListener (mouseListener2);
//
if (newsArray == 3) {
NewsUp.bt._visible = false;
ZigoEngine.doTween (NewsUp.arrowIco,'_alpha',0,1,"easeOutExpo");
alphaValUp = 20;
//
Mouse.removeListener (mouseListener1);
ZigoEngine.doTween (NewsUp.back,'_alpha',0,1,"easeOutExpo");
}
}
function moveDown () {
trace ("newsArray "+newsArray);
trace ("numberOfItems "+numberOfItems);
newsArray = newsArray + 1;
ZigoEngine.doTween (anchorNews.attach["caixaNews" + (newsArray - 3)],'_y, Blur_blurX, Blur_blurY',[Math.floor (-1500), 0, 500],5,"easeOutExpo");
ZigoEngine.doTween (anchorNews.attach["caixaNews" + (newsArray - 2)],'_y, Blur_blurX, Blur_blurY',[Math.floor (0), 0, 0],1,"easeOutExpo");
ZigoEngine.doTween (anchorNews.attach["caixaNews" + (newsArray - 1)],'_y, Blur_blurX, Blur_blurY',[Math.floor (140), 0, 0],1,"easeOutExpo");
ZigoEngine.doTween (anchorNews.attach["caixaNews" + (newsArray)],'_y, Blur_blurX, Blur_blurY',[Math.floor (280), 0, 0],1,"easeOutExpo");
ZigoEngine.doTween (NewsUp.arrowIco,'_alpha',100,1,"easeOutExpo",0,function () {
NewsUp.bt._visible = true;
alphaValUp = 100;
});
ZigoEngine.doTween (NewsUp.back,'_alpha',100,1,"easeOutExpo",0,function () {
Mouse.addListener (mouseListener1);
});
if (numberOfItems == newsArray) {
NewsDown.bt._visible = false;
ZigoEngine.doTween (NewsDown.arrowIco,'_alpha',0,1,"easeOutExpo");
alphaValDown = 20;
//
Mouse.removeListener (mouseListener2);
ZigoEngine.doTween (NewsDown.back,'_alpha',0,1,"easeOutExpo");
}
}
I will appreciate any help you can give me.
Regards,
2xbo