Question
dynamic text formatting...
I'm pretty new to ActionScripting, and am trying to change
some of the formatting on some code...I've been stumbling through
tutorials and putting pieces together roughly. Is there a simply
way to change the font and justification of this text? code is as
follows:
var nWidth:Number = mcDisplayBackground._width;
var nHeight:Number = mcDisplayBackground._height;
var nX:Number = mcDisplayBackground._x;
var nY:Number = mcDisplayBackground._y;
var nInterval:Number;
this.createTextField("tArticle", this.getNextHighestDepth(), nX, nY, nWidth, nHeight);
tArticle.multiline = true;
tArticle.wordWrap = true;
tArticle.html - true
tArticle.textColor = 0xFFFFFF;
tArticle.htmlText = "Founded in 1989, CYW, Inc. has established itself as the leader in the construction fastener industry.";
mcScrollUp.onPress = function():Void {
nInterval = setInterval(scrollArticle, 50, "up");
};
mcScrollUp.onRelease = function():Void {
clearInterval(nInterval);
};
mcScrollDown.onPress = function():Void {
nInterval = setInterval(scrollArticle, 50, "down");
};
mcScrollDown.onRelease = function():Void {
clearInterval(nInterval);
};
function scrollArticle(sScrollDirection:String):Void {
if(sScrollDirection == "up") {
tArticle.scroll--;
}
else {
tArticle.scroll++;
}
updateAfterEvent();
}
Thanks!
var nWidth:Number = mcDisplayBackground._width;
var nHeight:Number = mcDisplayBackground._height;
var nX:Number = mcDisplayBackground._x;
var nY:Number = mcDisplayBackground._y;
var nInterval:Number;
this.createTextField("tArticle", this.getNextHighestDepth(), nX, nY, nWidth, nHeight);
tArticle.multiline = true;
tArticle.wordWrap = true;
tArticle.html - true
tArticle.textColor = 0xFFFFFF;
tArticle.htmlText = "Founded in 1989, CYW, Inc. has established itself as the leader in the construction fastener industry.";
mcScrollUp.onPress = function():Void {
nInterval = setInterval(scrollArticle, 50, "up");
};
mcScrollUp.onRelease = function():Void {
clearInterval(nInterval);
};
mcScrollDown.onPress = function():Void {
nInterval = setInterval(scrollArticle, 50, "down");
};
mcScrollDown.onRelease = function():Void {
clearInterval(nInterval);
};
function scrollArticle(sScrollDirection:String):Void {
if(sScrollDirection == "up") {
tArticle.scroll--;
}
else {
tArticle.scroll++;
}
updateAfterEvent();
}
Thanks!