Hello,
I’ve been working off of a flash template and am having a few problems with the finishing touches on my website. The text in the links on my News page are too small to read, but I can’t figure out how to increase the font size. All of my text is retrieved from an xml file that looks something like this:
<news id="6" title="OUR FUTURE" date="2010" >
<shortDescr><![CDATA[WHERE DO WE GO FROM HERE]]></shortDescr>
<description><![CDATA[<TEXTFORMAT LEADING="0"><b>OUR FUTURE:</b><br></TEXTFORMAT><br>KB Recycling is a young company, but as attitudes change and environmental awareness increases we are consistently growing to meet that demand. At KB we are constantly working to expand our list of recyclables in order to reduce the amount of waste that makes it to the landfill. In the near future we expect to add glass pick up to our service as well as increase our capacity for aluminum, papers, plastics, and cardboard.
By the end of 2011 we would like to see at least half of Amarillo businesses and residents taking environmental action by recycling with KB. Furthermore, we are always looking for opportunities to expand towards the outlying panhandle areas and are in talks with several communities about extending our services to them. Contact us for more information on how you can get involved!]]></description>
</news>
All of the other text fields are set up with dynamic text boxes which were easy enough to manipulate. However, the links for this page are just loaded into a movie clip with an instance name of mcContent and the only thing inside this movie clip is an empty frame. I’ve tried to plug in a TextFormat(); just about everywhere I can think of, but it doesn’t seem to have any effect on the links. My knowledge of code is pretty limited, so I’ve been having a hell of a time… any help is appreciated.
Here is the code from the main page that I think deals with the links:
import mx.transitions.*;
import mx.transitions.easing.*;
import flash.geom.ColorTransform;
import actionscript.color.TweenColorTransform;
import flash.display.BitmapData;
var BData: BitmapData;
import actionscript.FastXML;
import actionscript.extra.Utils;
/////////////////////////////////////////////////////
var intervalLoadID:Number;
var duration:Number = 100;
_this = this;
firstLoad=true;
_this.numNews = 1;
newsSizeH = 97;
_btnFalse.useHandCursor = false;
if(_root.pathPage != undefined) {
pathPage = _root.pathPage;
pathXmlPage = _root.pathXmlPage;
}else{
pathPage = "";
pathXmlPage = "data/cgal.xml";
}
globalFXML = new FastXML();
globalFXML.load(_this.pathXmlPage);
globalFXML.onLoad = function(succes:Boolean):Void {
clearInterval(intervalLoadID);
if (this.status == 0 && succes) {
_this.lenNews = this.news.length;
_this.titleArr = new Array();
_this.dataArr = new Array();
_this.desShortArr = new Array();
_this.desArr = new Array();
for (var i:Number = lenNews-1; i>=0; i--){
_this.titleArr.push(this.news*.attributes.title);
_this.dataArr.push(this.news*.attributes.date);
_this.desShortArr.push(this.news*.shortDescr.value());
_this.desArr.push(this.news*.description.value());
}
_this.title.html = true;
_this.title.htmlText = this.title.value();
_this.createNews();
_this.loadNews(_this.numNews-1);
_this.nextFrame();
} else {
mainLoader._txt.text += ' ERROR';
}
}
intervalLoadID = setInterval(checkProgressXml, duration, globalFXML);
var createNews = function(){
var path:MovieClip = _this.news.mcContent;
for (var j:String in path){
path.removeMovieClip();
}
for (i=1; i<=_this.lenNews; i++){
var btn:MovieClip = path.attachMovie("aTh", "btn"+i, i, {_x:(0), _y:newsSizeH*(i-1)})
btn._index = i;
btn.title._txt.text = _this.titleArr[i-1];
btn.data._txt.text = _this.dataArr[i-1];
btn.des._txt.text = _this.desShortArr[i-1];
if (i == _this.lenNews){
_this.news.renewScroll();
}
btn.onRollOver = function(){
if (this._index != _this.numNews){
this.gotoAndPlay("over");
}
}
btn.onRollOut = btn.onReleaseOutside = function(){
if (this._index != _this.numNews){
this.gotoAndPlay("out");
}
}
btn.onRelease = function(){
if (_this.numNews != this._index){
_this.news.mcContent["btn"+_this.numNews].gotoAndStop(1);
_this.numNews = this._index;
_this.loadNews(_this.numNews-1);
}
}
}
_this.news.mcContent["btn"+_this.numNews].gotoAndStop("on");
};
Here is the code from inside the news mc (contains mcContent, a mask, and the scroll bar):
mcContent.setMask(mcMask);
//======================== Constants ==========================//
var dragX:Number = mcDragger._x;
var draggingHeight:Number = mcDragField._height-mcDragger._height;
var dragTopY:Number = mcDragger._y;
var dragBottY:Number = Math.ceil(mcDragField._y+draggingHeight);
var contentTopY:Number = mcContent._y;
var contentBottY:Number;
var _ratio:Number;
var _distance:Number;
var _positionCont:Number = dragTopY;
var _deceleration:Number = 10;
var _factor:Number = 2;
var _step:Number = 4;
renewScroll();
There is more code, but I think it mostly deals with the scroll and news content once a link has been clicked – let me know if you need more to look at. Thank you