# Scrollbar different in player 6 and 7

**URL:** <https://forum.kirupa.com/t/scrollbar-different-in-player-6-and-7/153026>\
**Category:** Uncategorized\
**Created:** [June 28, 2005, 8:27pm UTC](https://forum.kirupa.com/t/scrollbar-different-in-player-6-and-7/153026 "2005-06-28T20:27:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerryj](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jerryj](https://forum.kirupa.com/u/jerryj)\
**Post date:** [June 28, 2005, 8:27pm UTC](https://forum.kirupa.com/t/scrollbar-different-in-player-6-and-7/153026/1 "2005-06-28T20:27:11Z")

</div>

Hi,  
I made a scrollbar, dynamically attached to a dynamic textfield, and it looks fine when I publish in Flashplayer 6. When I switch to 7 however, the x\_position jumps to the \_x postion of the Textfield instead of the position I gave it (513). And I also made something to make the scrollbar invisible when there is not enough text, but in Flashplayer 7 I still can see an ‘inactive’ scrollbar.

Is it my coding that is maybe partly AS1.0 (I am terrible at that)? Or something with UI components and Flashplayer 7?

```auto
function makeArtikel(txt, c) {
	var my_xml = new XML();
	my_xml.ignoreWhite = true;
	my_xml.onLoad = function(ok) {
		if (ok) {
			
			var field = NA1MC.NA1;
			field.multiline = true;
			field.wordWrap = true;
			field.autoSize = false;
			field.selectable = false;
			field.html = true;
			field.htmlText = this.firstChild.childNodes[c].firstChild.nodeValue;
			field.setTextFormat(NA1fmt);
			NA1MC._x = NK1MC._x-10;
//HERE I MAKE THE SCROLLBAR:
			initialization = {_targetInstanceName:"NA1", horizontal:false};
			NA1MC.attachMovie("UIScrollBar", "myScrollbar", 1, initialization);
//HERE I SET THE _X POSITION FOR THE SCROLLBAR:
			NA1MC.myScrollBar._x = 513;
			field.maxscroll = 16;
		}
	};
	my_xml.load(txt);
	NA1MC.myScrollBar.setSize(NA1MC._height);
//HERE I DO THE INVISIBLE TRICK, REFERRING TO THE MAXSCROLL 5 LINES UP:
	onEnterFrame = function () {
		if (NA1MC.NA1.maxscroll<=1) {
			NA1MC.myScrollBar._visible = false;
		} else {
			NA1MC.myScrollBar._visible = true;
		}
	};
}

```

I hope someone can guide me, sorry if my coding is bad,

thank you,

Jerryj.
