Este es el codigo que he utilizado para el scroll, este esta aplicado en un frame:
Código :
function FNSCROLL(){
if(this.scrollText != undefined ){
if(this.scrollText.maxscroll==1){
if(this._visible) this._visible=false;
}
else{
if(!this._visible)this._visible=true;
}
this.slyder.clear();
this.slyder.lineStyle(1,0xFAC18A,100);
this.slyder.moveTo(0,0);
this.slyder.lineTo(0,this.scrollText._height-1);
this.rectwrapper._y=this.scrollText._height-this.rect wrapper._height;
if(this.pressUp){
if(this.scrollText.scroll>0){
this.scrollText.scroll-=1;
this.dragger._y = 10+int( (this.scrollText._height-30)*(this.scrollText.scroll-1) / this.scrollText.maxscroll );
}
}
if(this.pressDown){
if(this.scrollText.scroll<this.scrollText.maxscroll){
this.scrollText.scroll+=1;
this.dragger._y = 10+int( (this.scrollText._height-30)*(this.scrollText.scroll-1) / this.scrollText.maxscroll );
}
}
if(this.dragging){
var loc = this.dragger._y;
var yDragged = loc-10;
var newScroll = this.scrollText.maxscroll*yDragged /(this.scrollText._height-30);
this.scrollText.scroll=1+int(newScroll);
}
}
}Y este lo tengo aplicado en el scroll:
Código :
onClipEvent(load){
this.scrollText=_level0.myText1;
this.onEnterFrame=_level0.FNSCROLL;
}Creo que el codigo se lo tengo que poner a los botones que cargan el xml, como decirle al scroll reload o algo asi, es que no se mucho de codigo y estoy nivel aprendizaje, jajaja gracias
