Here is how to justify or align your text and set your text leading (line spacing) for all of your Flashblocks text.Open the movie clip "cmsOBJ scroll smooth" and change the actionscript to the following. Notice the code after " // adjust line spacing..."
| Code: : |
function init() {
mask_bound._width = _parent.w;
mask_bound._height = _parent.h;
scroller._x = mask_bound._width+(scroller.bar_width/2)-9;
scroller._y = 0;
container.createTextField("my_txt", 1, 0, 0, _parent.w-9, _parent.h);
container.my_txt.antiAliasType = "advanced";
container.my_txt.autoSize = "right";
container.my_txt.wordWrap = true;
container.my_txt.multiline = true;
container.my_txt.background = false;
container.my_txt.selectable = false;
container.my_txt.html = true;
container.my_txt.embedFonts = true;
container.my_txt.htmlText = _parent.theContent;
// adjust line spacing...
var my_fmt:TextFormat = new TextFormat();
my_fmt.leading = 10;
my_fmt.align = "justify";
container.my_txt.setTextFormat(my_fmt);
scroller.reload();
//trace("*****:"+this._parent.noScroll);
}
init();
|
Open the movie clip "cmsOBJ scroll sys" and change the actionscript to the following. Notice the code after " // adjust line spacing..."
| Code: : |
function init() {
txtBox._width = _parent.w-13;
txtBox._height = _parent.h;
txtBox.htmlText = _parent.theContent;
txtBox.selectable = false;
// adjust line spacing...
var my_fmt:TextFormat = new TextFormat();
my_fmt.leading = 10;
my_fmt.align = "justify";
txtBox.setTextFormat(my_fmt);
if (txtBox.maxscroll>1 and this._parent.noScroll != true) {
scroller._x = txtBox._width+txtBox._x+1;
scroller._y = txtBox._y;
scroller.bg._height = txtBox._height-scroller.u._height-scroller.d._height;
} else {
scroller._visible = false;
}
}
init();
|