# 2 text fields 1 scroll bar

**URL:** https://forum.kirupa.com/t/2-text-fields-1-scroll-bar/87017
**Category:** flash
**Created:** [April 17, 2005, 9:16pm UTC](https://forum.kirupa.com/t/2-text-fields-1-scroll-bar/87017 "2005-04-17T21:16:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Stonucca](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@Stonucca](https://forum.kirupa.com/u/Stonucca)
#### Post date: [April 17, 2005, 9:16pm UTC](https://forum.kirupa.com/t/2-text-fields-1-scroll-bar/87017/1 "2005-04-17T21:16:14Z")

</div>

Hi I have managed to get a scroll bar to move 1 text field is it possiable to get it to move 2 text fields

Heres the code

function addItems() {

myText.multiline = true;  
myText.wordWrap = true;  
myText.type = “dynamic”;  
myText.background = true;  
myText.backgroundColor = “0x000000”;  
myText.border = false;  
myText.html = true;

myText2.multiline = true;  
myText2.wordWrap = true;  
myText2.type = “dynamic”;  
myText2.background = true;  
myText2.backgroundColor = “0x000000”;  
myText2.border = false;  
myText2.html = true;

myText.htmlText = myData.myText;  
ScrollBar.setScrollTarget(myText);

myText2.htmlText = myData.myText2;  
ScrollBar.setScrollTarget(myText2);

formStyleFormat = new FStyleFormat;

formStyleFormat.scrollTrack = “0x000000”;  
formStyleFormat.highlight = “0x000000”;  
formStyleFormat.highlight3D = “0xffffff”;  
formStyleFormat.arrow = “0xffffff”;  
formStyleFormat.face = “0x000000”;  
formStyleFormat.background = “0x000000”;  
formStyleFormat.shadow = “0x666666”;  
formStyleFormat.darkshadow = “0x333333”;

formStyleFormat.addListener(ScrollBar);  
formStyleFormat.applyChanges();

textFormat = new TextFormat();  
textFormat.color = “0xffffff”;  
textFormat.bullet = false;  
textFormat.underline = false;  
textFormat.bullet = false;  
textFormat.size = 14;  
textFormat.font = “arial”;

myText.setTextFormat(textFormat);  
myText2.setTextFormat(textFormat);

}

any help much apprieciated

Ston
