Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : Scroll 2 text by one scroll bar?


FlashAsh99
2/8/2004 11:20:20 PM
Jack
2/9/2004 12:00:21 AM

[quoted text, click to view]
scroll bar?

you can try this approach -

this.createTextField("tf1",1,10,10,100,200);
for(var n=0;n!=35;n++){
tf1.text += "Test1 "+n+newline;
}

this.createTextField("tf2",2,200,10,100,200);
for(var n=0;n!=35;n++){
tf2.text += "Test2 "+n+newline;
}

this.attachMovie("FScrollBarSymbol","scr1",3);
this.attachMovie("FScrollBarSymbol","scr2",4);
scr2._visible = false;

scr1._x = tf1._x+tf1._width;
scr1._y = tf1._y;
scr1.setSize(tf1._height);

scr1.setScrollTarget(tf1);
scr2.setScrollTarget(tf2);

this.onEnterFrame = function(){
scr2.setScrollPosition(scr1.getScrollPosition());
}

regards,
Jack

AddThis Social Bookmark Button