Ti consiglio vivamente di usare un file esterno o TXT o XML!!
http://www.theinvaders.it/h2/testo_inv.swf
come questo !!!
ti riassumo i passaggi
due pulsanti (Pulsante1,Pulsante2) SONO MOVIECLIP non pulsanti !!!
code:
Pulsante1
on(press){
if(this.hitTest(_root._xmouse,_root._ymouse,true)) {
gotoAndStop(2);
scroll = true
}
}
on (release) {
gotoAndStop(1);
scroll = false
}
onClipEvent(enterFrame){
if(scroll){
prop = (_parent.barra._height - _parent.box._height) / _parent.txt.maxscroll;
if ((_parent.box._y + _parent.box._height + prop) >= (_parent.barra._height + _parent.barra._y)){
_parent.box._y = _parent.barra._y + _root.barra._height - _root.box._height;
} else {
//_parent.box._y += prop
_parent.txt.scroll--;
}
}
}
Pulsante2
on(Press){
if(this.hitTest(_root._xmouse,_root._ymouse,true)) {
gotoAndStop(2);
scroll = true
}
}
on(Release){
gotoAndStop(1);
scroll = false
}
onClipEvent(enterFrame){
if(scroll){
prop = (_parent.barra._height - _parent.box._height) / _parent.txt.maxscroll;
if ((_parent.box._y + _parent.box._height + prop) >= (_parent.barra._height + _parent.barra._y)){
_parent.box._y = _parent.barra._y + _root.barra._height - _root.box._height;
} else {
//_parent.box._y += prop
_parent.txt.scroll++;
}
}
}
crei un campo di testo dinamico e lo chiami txt (lo metti nella area Variable!)
tutto qui !!