About External Text+Scroll+CSS
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:
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);
Code for the dinamic text with CSS
var format = new TextField.StyleSheet();
var path = "style.css (http://www.lacto-vegetarian.com/estilo.css)";
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;
}
}
} else {
output.text = "Error loading CSS file!";
}
};
#If you have any other info about this subject , Please add it free.# |