Would love to find a way of combining what I’ve found in separated samples:
Dinamic external text loaded into a scrollable text field, applying CSS and with a smooth easing effect.
I’ve found two samples but code is not my best friend and cannot find out how to make the right combination.
Code for text with easing scroll:
[size=1]var clip = _root.mcCont.mc;
var anchoScroll = 5;
var suavizado = 5;
var contenidoTexto = “Becoming Lacto-Vegetarian or… the beginning of a life change from the root. The way we eat. It makes all the difference. How to achieve a higher state of conciousness. No meat, no fish, no eggs!”;
clip.texto.autoSize = true;
clip.texto.htmlText = contenidoTexto;
_root.generarScrollEasyn(nivel, clip, anchoScroll, 6);
[/size]
Code for the dinamic text with CSS
[size=1]var format = new TextField.StyleSheet();
var path = “style.css”;[/size]
[size=1]format.load(path);
format.onLoad = function(loaded) {
if (loaded) {
output.styleSheet = format;
myLoadVar = new LoadVars ();
myLoadVar.load(“uno.txt”)
myLoadVar.onLoad = function (success){
if (success == true) {
output.variable = “uno”
output.htmlText=myLoadVar.uno;
}
} [/size]
[size=1] } else {
output.text = “Error loading CSS file!”;
}
};
[/size]