El código ese ya te lo da. Capándolo:
Código :
function creaTexto() {
this.createEmptyMovieClip("clip_texto", this.getNextHighestDepth());
clip_texto.createTextField("txt", 1, posx, posy, ancho, alto);
clip_texto.txt.border = false;
clip_texto.txt.multiline = true;
clip_texto.txt.wordWrap = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0x000000;
xsize = (xsize == undefined) ? 10 : xsize;
my_fmt.size = xsize;
//texto falso...
clip_texto.txt.text = "Ser una estrella de rock es difícil... no, empezaré de nuevo. Las últimas conferencias de Flex en Parquesoft (De las que hablaré pronto) y otros viajes aparte han hecho que olvide hablarles de algunas cosas que pasan en nuestra comunidad Flashera y que vale la pena resaltar. La primera de ellas es la fundación de GarageFlash, el nuevo Flash User Group peruano que nos sorprende con conferencias bimensuales de temas relacionados con el medio. En su primera edición estará Oscar Trelles con 'Flash: Guía Practica de Supervivencia, Ilustrada'; luego vendrá Giancarlo Vargas de Bluemetal (Amigo incondicional de Cristalab) con 'Proceso Creativo y técnico para alcanzar los objetivos de un proyecto'. Suenan bastante divertidas, así que si eres de Perú, no olvides registrarte. Suerte a la gente de GarageFlash, que por cierto, fue fundada por Eldervaz, un compañero del foro (Que escapó de Clab con heridas casi mortales ¡Te encontraremos donde te escondas!)";
clip_texto.txt.text += clip_texto.txt.text;
//...
clip_texto.txt.setTextFormat(my_fmt);
}
//-----------------------------------
function creaMascara() {
this.createEmptyMovieClip("mascara", this.getNextHighestDepth());
anchox = (Stage.width - posx - 330 > 0) ? 300 : Stage.width - posx - 30;
mascara.beginFill(0x0000FF, 30);
mascara.moveTo(posx, posy);
mascara.lineTo(posx + anchox/2, posy);
mascara.lineTo(posx + anchox/2, posy + alto);
mascara.lineTo(posx, posy + alto);
mascara.lineTo(posx, posy);
mascara.endFill();
clip_texto.setMask(mascara);
}
//-----------------------------------
/*function creaScroll1() {
this.attachMovie("b_scroll", "b_scroll1", this.getNextHighestDepth());
this.attachMovie("b_scroll", "b_scroll2", this.getNextHighestDepth());
this.attachMovie("b_roll", "b_roll1", this.getNextHighestDepth());
b_scroll1._x = b_scroll2._x = b_roll1._x = clip_texto.txt._x + mascara._width + 10;
b_scroll1._y = clip_texto.txt._y;
b_scroll2._y = clip_texto.txt._y + clip_texto.txt._height - b_scroll2._height;
b_roll1._y = b_scroll1._y + b_roll1._height;
//
b_scroll1.onRelease = function() {
clip_texto.txt.scroll--;
controlaScoll1();
};
b_scroll2.onRelease = function() {
clip_texto.txt.scroll++;
controlaScoll1();
};
}*/
function creaScroll2() {
this.attachMovie("b_scroll", "b_scroll3", this.getNextHighestDepth());
this.attachMovie("b_scroll", "b_scroll4", this.getNextHighestDepth());
this.attachMovie("b_roll", "b_roll2", this.getNextHighestDepth());
b_scroll3._y = b_scroll4._y = b_roll2._y = clip_texto.txt._y + mascara._height + 5;
b_scroll3._x = clip_texto.txt._x;
b_scroll4._x = clip_texto.txt._x + mascara._width - b_scroll4._width;
b_roll2._x = b_scroll3._x + b_roll2._width;
//
b_scroll3.onRelease = function() {
clip_texto._x += 10;
clip_texto._x = (clip_texto._x > 0) ? 0 : clip_texto._x;
controlaScoll2();
};
b_scroll4.onRelease = function() {
clip_texto._x -= 10;
clip_texto._x = (clip_texto._width - mascara._width < mascara._x - clip_texto._x) ? -(clip_texto._width - mascara._width) : clip_texto._x;
controlaScoll2();
};
}
/*function controlaScoll1() {
lineas = clip_texto.txt.maxscroll;
dist = (b_scroll2._y - b_scroll2._height) - (b_scroll1._y + b_scroll1._height);
dist1 = dist / (lineas - 1);
b_roll1._y = b_scroll1._y + b_scroll1._height + dist1 * (clip_texto.txt.scroll - 1);
}*/
function controlaScoll2() {
pasos = Math.round((clip_texto._width - mascara._width) / 10);
paso = Math.round((mascara._x - clip_texto._x) / 10);
dist = (b_scroll4._x - b_roll2._width) - (b_scroll3._x + b_scroll3._width);
dist1 = dist / pasos;
trace(paso + " " + pasos);
b_roll2._x = b_scroll3._x + b_scroll3._width + dist1 * paso;
}
//-----------------------------------
/*Stage.align = "TL";
Stage.scaleMode = "noScale";
var listener:Object = new Object();*/
listener.onResize = function() {
alto = Stage.height - 130;
xscroll = clip_texto.txt.scroll;
removeMovieClip(clip_texto.txt);
removeMovieClip(b_scroll1);
removeMovieClip(b_scroll2);
removeMovieClip(b_roll1);
removeMovieClip(b_scroll3);
removeMovieClip(b_scroll4);
removeMovieClip(b_roll2);
removeMovieClip(mascara);
creaTexto();
creaMascara();
if (clip_texto.txt.maxscroll > 1) {
creaScroll1();
clip_texto.txt.scroll = xscroll;
my_fmt.size = xsize;
controlaScoll1();
}
if (clip_texto._width > mascara._width) {
creaScroll2();
controlaScoll2();
}
};
Stage.addListener(listener);
//-----------------------------------
//-----------------------------------
posx = 180;
posy = 105;
alto = Stage.height - 130;
ancho = 400;
creaTexto();
creaMascara();
(clip_texto.txt.maxscroll > 1) ? creaScroll1() : null;
(clip_texto._width > mascara._width) ? creaScroll2() : null;
//-----------------------------------
stop();
//-----------------------------------Pones un par de clips con nombres de vinculación b_scroll y b_roll en la biblioteca, y listo.